Deployment
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:migrate2. 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:
| Variable | Value |
|---|---|
APP_URL | https://<your-domain>, no trailing slash |
DATABASE_URL | Injected by the Neon integration (pooled) |
WEBRIZEN_SSO_ISSUER | https://accounts.webrizen.com/api/auth |
WEBRIZEN_SSO_CLIENT_ID / WEBRIZEN_SSO_CLIENT_SECRET | From step 3 |
WEBRIZEN_SSO_SESSION_SECRET | 32+ random characters: openssl rand -base64 32 |
KV_REST_API_URL / KV_REST_API_TOKEN | Injected by the Upstash integration |
CHRONON_ADMIN_EMAILS | Comma-separated admin emails |
NEXT_PUBLIC_REPO_URL | Link 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/healthreturns{"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.