Skip to main content

Getting started

How to install rekkal, configure its environment variables, and run it locally.

Prerequisites

  • Node.js 20 or newer.
  • pnpm — the package manager for this repo. Install with npm install -g pnpm or see pnpm.io/installation.

Install

The Claude Code skills under .claude/skills/ are committed to the repo, so they already arrive with git clone — no separate skills step is required (see agent-skills.md).

Environment variables

Copy the example file and fill in real values:
Every variable the app reads is listed in .env.example with a placeholder value — treat that file as the authoritative list. It covers Supabase (NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY, SUPABASE_SERVICE_ROLE_KEY), Stripe (STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, NEXT_PUBLIC_STRIPE_PRICE_PRO, plus NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY — optional, reserved for client-side Stripe.js), Resend (RESEND_API_KEY, RESEND_FROM), the answer engines (PERPLEXITY_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY), the cron routes’ CRON_SECRET, the rate limiter’s RATE_LIMIT_ADDRESS_SECRET, the two host origins (NEXT_PUBLIC_APP_URL and the optional NEXT_PUBLIC_MARKETING_URL — see hosts.md; both default to http://localhost:3000, so local development needs neither), and the local-only REKKAL_ONBOARDING_FIXTURE and REKKAL_DASHBOARD_FIXTURE. The engine keys are rekkal’s own, never a customer’s, and none of them is required locally: an engine with no key is skipped rather than failing the run, and pnpm test is green with an empty environment because the fixture adapter replays recorded payloads through the real parsers. See analytics-pipeline.md. RATE_LIMIT_ADDRESS_SECRET is required to click through onboarding at all, fixture or not: the rate limit buckets on the calling address and stores a keyed hash of it rather than the address, so without the key it refuses (“We could not check your usage. Try again in a moment.”) instead of falling back to plaintext or to one shared bucket. Any string works locally; pnpm test supplies its own, which is why the suite stays green with an empty environment. Rotating it resets every in-flight address window. See onboarding.md. Onboarding generation calls OPENAI_API_KEY. To click through it locally without one, set REKKAL_ONBOARDING_FIXTURE=1 — it replays a bundled payload through the production parser, and is ignored when NODE_ENV=production, so it never belongs in a deployed environment. See onboarding.md. The signed-in dashboard has the same kind of switch for a machine with no seeded rollup rows, REKKAL_DASHBOARD_FIXTURE=1, under the same production guard — see dashboard.md. .env* files are gitignored — never commit real secrets. When you introduce a new variable, add its name and a placeholder to .env.example in the same change.

Database schema

The schema lives as versioned SQL in supabase/migrations/ — the auth/billing foundation plus the analytics tables, all under Row Level Security. Apply it to your Supabase project with the Supabase CLI (supabase db push, or supabase migration up locally). See supabase.md for what the schema contains and how types are kept in sync.

Run locally

Open http://localhost:3000. The dev server hot-reloads on file changes.

Scripts

Next steps