Quickstart
Local setup, environment groups, and the main commands used to work on HermesAI.
Stack baseline
HermesAI currently runs on:
- Next.js 16 App Router
- React 19
- TypeScript
- Tailwind CSS v4
- Clerk for authentication
- Postgres + Drizzle ORM for durable relational state
- Upstash Redis for mutable runtime state
- Polar for billing
- Vercel AI SDK / AI Gateway for model routing
Source-of-truth
The root README.md remains the exhaustive environment inventory. This page mirrors it but trims to the practical groupings — when they disagree, the README wins.
Prerequisites
Node.js 20+
The runtime version pinned by Next.js 16.
pnpm 10+
Package manager. Lockfile is `pnpm-lock.yaml`.
Postgres
Local instance or a Supabase Postgres URL for the application runtime.
Upstash Redis
REST URL + token for runtime mutable state.
Clerk
Application credentials, sign-in/sign-up URLs, and the webhook signing secret.
Polar
Access token plus the webhook secret for billing event sync.
Local setup
Install dependencies
pnpm installWire up .env.local
Copy .env.example and fill in the groups described below. The minimum viable set is auth + database + Redis + AI Gateway.
Verify the catalog and database
pnpm db:check
pnpm catalog:validateEnvironment groups
The full surface is long. The easiest way to reason about it is by capability area.
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYCLERK_SECRET_KEYCLERK_WEBHOOK_SIGNING_SECRET- Clerk sign-in / sign-up URLs and fallback redirect URLs
SUPABASE_DATABASE_URLorDATABASE_URLSUPABASE_URLorNEXT_PUBLIC_SUPABASE_URLSUPABASE_SERVICE_ROLE_KEYSUPABASE_STORAGE_PUBLIC_BUCKETSUPABASE_STORAGE_ARCHIVE_BUCKETOBJECT_STORAGE_PROVIDERBLOB_READ_WRITE_TOKEN
UPSTASH_REDIS_REST_URLUPSTASH_REDIS_REST_TOKENREDIS_URLorKV_URLwhen resumable chat streams are enabled
POLAR_ACCESS_TOKENPOLAR_WEBHOOK_SECRETPOLAR_SERVER- Plan product IDs for Free, Plus, Pro, Business, and Enterprise
AI_GATEWAY_API_KEYHERMES_AI_PROVIDER_MODE- Azure variables when running in direct Azure mode
- Model override and prompt-version variables when testing provider behavior
Verified commands
pnpm dev
pnpm build
pnpm startpnpm typecheck
pnpm test
pnpm lintpnpm db:generate
pnpm db:migrate
pnpm db:check
pnpm db:studiopnpm catalog:build
pnpm catalog:validate
pnpm catalog:coverage
pnpm catalog:auditProject layout
Things to keep straight
Architectural reality
- The tenant product and the platform admin are intentionally separate.
- The current architecture is not a BullMQ-style durable worker system.
- The source catalog lives in checked-in JSON and is only synced into Postgres through the explicit admin sync route.
- Public product claims should stay aligned to the surfaces already implemented in
src/app.