chronondocs
DeploymentMenu

Deployment

Chronon runs on free tiers: Vercel for the app, Neon for Postgres and Upstash for rate-limit counters.

1. Database: Neon

Create a free Postgres database on Neon and copy the pooled connection string (the host contains -pooler). Run the migrations from your machine:

DATABASE_URL="postgres://…-pooler…/neondb?sslmode=require" pnpm db:migrate

2. Rate limits: Upstash Redis

Serverless functions don't share memory, so counters live in Redis. In Vercel go to Storage → Create Database → Upstash for Redis (free plan) and connect it to the project; it injects KV_REST_API_URL and KV_REST_API_TOKEN, which Chronon reads. Without Redis, each instance counts on its own and the limits become much looser.

Neon can be added from Storage the same way; it injects DATABASE_URL.

3. Sign-in: Webrizen SSO

In Webrizen SSO, go to Platform admin → Applications → Register application:

  • Redirect URI: https://<your-domain>/api/auth/webrizen/callback
  • Sign-out redirect: https://<your-domain>

4. Vercel

Import the repository into Vercel (framework: Next.js) and set these environment variables:

VariableValue
APP_URLhttps://<your-domain>, no trailing slash
DATABASE_URLInjected by the Neon integration (pooled)
WEBRIZEN_SSO_ISSUERhttps://accounts.webrizen.com/api/auth
WEBRIZEN_SSO_CLIENT_ID / WEBRIZEN_SSO_CLIENT_SECRETFrom step 3
WEBRIZEN_SSO_SESSION_SECRET32+ random characters: openssl rand -base64 32
KV_REST_API_URL / KV_REST_API_TOKENInjected by the Upstash integration
CHRONON_ADMIN_EMAILSComma-separated admin emails
NEXT_PUBLIC_REPO_URLLink to the public repository

Add your domain under Settings → Domains, then visit /dashboard to create the first account.

Operating it

  • Admin: people listed in CHRONON_ADMIN_EMAILS (with a verified email in Webrizen SSO) see /dashboard/admin, where they can change a user's tier or suspend them.
  • Health check: GET /api/health returns {"ok":true} without touching the database.
  • Free-tier budget: each API request costs a handful of Redis commands and, at most once a minute per key and instance, one database query. Key lookups are cached in memory for 60 seconds.
  • Vercel Hobby is for non-commercial use, which matches Chronon. Its built-in DDoS protection sits in front of everything above.