Getting Started
Clone the repo, install dependencies, and run the MetaNow Console apps locally.
Prerequisites
| Tool | Minimum version | Notes |
|---|---|---|
| Node.js | 20 | Check with node -v |
| pnpm | 10 | Check with pnpm -v |
| PostgreSQL | 15 | Must have the pgvector extension available |
| Redis | 6 | Used by BullMQ job queues |
Clone and install
git clone https://cloud2.cloud-blueberry.com/internal-projects/metanow-console.git
cd metanow-console
pnpm installpnpm install runs postinstall hooks automatically, including fumadocs-mdx for the docs app.
Environment variables
Copy the example file and fill in the required values:
cp .env.example .envRequired variables
| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string with pgvector |
CORS_ORIGIN | URL of the web app (e.g. http://localhost:3001) |
BETTER_AUTH_SECRET | Random string, at least 32 characters |
BETTER_AUTH_URL | URL of the server (e.g. http://localhost:8000) |
REDIS_URL | Redis connection string |
STRIPE_SECRET_KEY | Stripe secret key (from Stripe Dashboard → Developers) |
STRIPE_WEBHOOK_SECRET | Stripe webhook signing secret |
OPENAI_API_KEY | Used by the embedding service for vector generation |
HETZNER_S3_ENDPOINT | Hetzner Object Storage endpoint URL |
HETZNER_S3_BUCKET | Bucket name |
HETZNER_S3_ACCESS_KEY | Object storage access key |
HETZNER_S3_SECRET_KEY | Object storage secret key |
AI provider (at least one required)
| Variable | Description |
|---|---|
AI_PROVIDER | anthropic (default) or gemini |
ANTHROPIC_API_KEY | Required when AI_PROVIDER=anthropic |
GEMINI_API_KEY | Required when AI_PROVIDER=gemini |
If the preferred provider key is missing, the factory falls back to the other available key. If neither is set, the server boots with the NoopAiProvider — generation calls return empty results without error.
Optional variables
| Variable | Default | Description |
|---|---|---|
PORT | 8000 | NestJS server port |
NODE_ENV | development | development, production, or test |
GOOGLE_CLIENT_ID | — | Enables Google OAuth sign-in |
GOOGLE_CLIENT_SECRET | — | Required if GOOGLE_CLIENT_ID is set |
AI_RATE_LIMIT_TTL | 3600 | AI rate limit window in seconds (per org) |
AI_RATE_LIMIT_MAX | 20 | Max AI calls per org per window |
SENTRY_DSN | — | Required in production; optional in development |
Database setup
Run the migrations against a fresh PostgreSQL database. The pgvector extension must be installed in the database before running migrations:
CREATE EXTENSION IF NOT EXISTS vector;Then:
pnpm db:migrateTo seed the database with initial data:
pnpm db:seedStart the development servers
pnpm devTurbo starts all apps in parallel:
| App | Port |
|---|---|
apps/web — Next.js frontend | 3001 |
apps/server — NestJS API | 8000 |
apps/fumadocs — this documentation | 4000 |
To start only one app:
pnpm --filter web dev # web only
pnpm --filter server dev # server only
pnpm --filter fumadocs dev # docs onlyGenerate the OpenAPI spec and API client
After any change to a NestJS controller or DTO, regenerate the spec and the typed client:
pnpm generate-spec # writes openapi.json at repo root
pnpm openapi-ts # regenerates packages/api-client/src/*.gen.tsTo regenerate the API reference pages in this documentation:
pnpm --filter fumadocs generate:apiType checking
pnpm check-typesTurbo runs tsc --noEmit across all packages.
Linting and formatting
pnpm check # lint + format with auto-fix
pnpm lint # lint onlyMetaNow Console uses Biome for linting and formatting across the entire monorepo.