Operations

Production Checklist

What to confirm before putting City into production.

Before launch, confirm at least the following:

Security

  • DOWNCITY_FEDERATION_ADMIN_SECRET_KEY exists only in trusted environments.
  • Clients only receive user_token, not provider keys.
  • DOWNCITY_FEDERATION_TOKEN_SIGNING_KEY is configured in City.
  • Admin env endpoints only accept trusted requests.

Stability

  • Every service that should be exposed has been registered through base.use(service).
  • AI models have been registered through Provider.model() + AIService.use() and include the required actions.
  • Critical provider env values have been configured.
  • The city table uses an explicit database URL.
  • before hooks block over-quota users.
  • after hooks record usage and error clues.

Multi-city setup

  • city_id clearly separates cities.
  • Usage records include city_id, user_id, and model.
  • Different cities have default quota strategies.

Rollback

  • Provider keys can be rotated quickly.
  • Model definitions can be paused or replaced quickly through code deployment.
  • Service errors are captured by onError or your logging system.