B2B lesson plan infrastructure for Taleemabad internal teams.
Dars exposes lesson plan creation and rendering as a service. Teams building apps for specific regions can integrate LP functionality by:
- Installing
@dars/clientor@dars/reactfrom npm - Pointing it at the Dars API with their API key
server/ FastAPI backend service
packages/
dars-client/ TypeScript API client (@dars/client)
dars-react/ React components (@dars/react)
supabase/ Database migrations (Supabase CLI)
bruno/ API request collection (Bruno)
docs/
superpowers/specs/ Design specs
superpowers/plans/ Implementation plans
adr/ Architecture Decision Records
- Python 3.12+
- uv (install via
curl -LsSf https://astral.sh/uv/install.sh | shorpip install uv) - Supabase CLI (
brew install supabase/tap/supabaseor see supabase.com/docs/guides/cli)
cp .env.example .env
# Fill in .env with your Supabase credentials and LP Assistant keyAdd your Supabase project ref to .env (DB_DEV_REF=...), then:
make db-link # link CLI to the dev project (one-time per machine)
make db-push # apply migrationscd api && uv sync --extra devmake devAPI available at http://localhost:8000 Swagger docs at http://localhost:8000/docs
make testRequires Node.js 18+ and pnpm (npm install -g pnpm).
# Build TypeScript API client
cd packages/dars-client && pnpm install && pnpm build
# Build React components
cd packages/dars-react && pnpm install && pnpm buildAPI requests are defined in bruno/ and can be run from VS Code using the Bruno extension.
Setup:
- Install the Bruno VS Code extension
- Open
bruno/as the collection in Bruno - Select the
devenvironment - Fill in your secrets in the environment —
adminSecret(from.env) andapiKey(from creating a client)
Environments: Bruno separates vars by environment (dev, prod, etc.). The dev environment is gitignored since it contains secrets — each developer fills in their own. baseUrl defaults to http://localhost:8000.
Available requests:
health— health checkadmin/create-client— provision a new B2B client (requiresadminSecret)lesson-plans/create— generate a lesson planlesson-plans/list— list lesson planslesson-plans/get— get a single lesson plan by IDlesson-plans/me— get current client info
Use the admin/create-client request in Bruno, or via curl:
curl -X POST http://localhost:8000/admin/clients \
-H "X-Admin-Secret: <ADMIN_SECRET from .env>" \
-H "Content-Type: application/json" \
-d '{"name": "Punjab Team"}'Returns an API key — store it safely, it is shown only once.