Local development & environment
Clone, .env.local, npm run dev:local — or Supabase + vercel dev for production parity.
There are two ways to run the repo. Start with local mode unless you specifically need Supabase Auth and cloud data.
Local mode (default for contributors)
No Supabase account. Boards live in a SQLite file under the repo’s .local/ folder (gitignored). There is no sign-in—the app uses a fixed local user.
- Clone and install
``bash git clone https://github.com/orholam/kanban_ai.git cd kanban_ai/frontend npm install ``
- Configure env — copy the example file and add your OpenAI key:
``bash cp env.local.example .env.local ` In .env.local, set OPENAI_API_KEY=sk-.... Keep VITE_LOCAL_MODE=true` as in the example.
Never prefix API keys with VITE_. That would bundle secrets into client JavaScript. Only VITE_SUPABASE_* belong in the browser when using Supabase below.
- Run one command
``bash npm run dev:local ` Open http://localhost:5173. Vite proxies /api to a local process on port 3000 (SQLite + OpenAI proxy). The schema is applied on first run from frontend/scripts/local-schema.sql`.
Account settings, hosted Analytics, and Feedback are stubbed in local mode because they rely on Supabase.
Production-like dev (Supabase + Vercel API routes)
Use this when you need real login, RLS, and the same stack as production.
Where — What
frontend/.env.local — VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY, and do not set VITE_LOCAL_MODE to true
Same file or shell — OPENAI_API_KEY for /api/openai
Then run two terminals from frontend/:
npx vercel dev --listen 3000npm start
Open http://localhost:5173. Without something on port 3000, AI features that call /api/openai will fail.
Troubleshooting
Symptom — Likely cause
401 from Supabase — Wrong anon key or URL
500 on /api/openai — Missing OPENAI_API_KEY for the process on port 3000
CORS / wrong host — Use the Vite URL; don’t call the API origin directly during dev
Empty board after login — RLS or project data in Supabase