Monorepo for the Loop AI project. Frontend lives in frontend/, backend in backend/.
- Frontend: React, TypeScript, Vite, Tailwind CSS, Radix UI, Zustand, React Router, TanStack Query, Supabase (auth).
- Backend: FastAPI, Uvicorn, Supabase (Postgres + Auth), Redis, RQ (background jobs).
- LLM: OpenRouter (streaming chat completions).
- Supabase setup: See docs/SUPABASE_SETUP.md for full setup (CLI, migrations, bucket, env).
- Run API (from
backend/):uvicorn app.main:app --reload --port 4000 - Run worker (from
backend/):python worker.py - Requires Redis running and a root
.env(copy frombackend/.env.exampleor root.env.example). The root.envmust include:- Supabase:
SUPABASE_URL,SUPABASE_ANON_KEY,SUPABASE_SERVICE_ROLE_KEY REDIS_URL(e.g.redis://localhost:6379)- OpenRouter:
OPENROUTER_API_KEY(get one at openrouter.ai/keys) so the LLM works. Optional:OPENROUTER_MODEL,OPENROUTER_MAX_TOKENS,OPENROUTER_TEMPERATURE(seebackend/.env.example).
- Supabase:
cd frontend
npm install
npm run devApp runs at http://localhost:8080.
Set up frontend/.env from frontend/.env.example: VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY, and VITE_API_URL=http://localhost:4000 (and VITE_BACKEND_WS_URL=ws://localhost:4000/ws if using streaming). You can sync from the root .env with node scripts/sync-env.js (see docs/GETTING_STARTED.md).
Other scripts (from frontend/): npm run build, npm run preview, npm run lint, npm run test.