Install dependencies and run the local dev server:
pnpm install
pnpm devOpen http://localhost:3000 to view the educator workspace that now includes routed tools for lesson planning, text feedback, and case study creation.
Before requesting AI-generated drafts, configure the required OpenRouter credentials.
Create a .env.local file and supply at least the following:
OPENROUTER_API_KEY=sk-or-...
OPENROUTER_SITE_URL=http://localhost:3000 # optional but recommended
OPENROUTER_MODEL=openai/gpt-5-mini # optional overrideOPENROUTER_API_KEYis mandatory for server-side requests made from the/api/*routes.OPENROUTER_SITE_URLis forwarded in theHTTP-Refererheader, which OpenRouter recommends for attribution.OPENROUTER_MODELlets you swap the default model without touching code. You may also setOPENROUTER_BASE_URLif routing through a proxy.
Restart pnpm dev after editing environment variables.
User accounts are now powered by Supabase Auth. Provide the following environment variables in .env.local:
SUPABASE_URL=https://obpeivftsqcpghgxxojc.supabase.co
SUPABASE_ANON_KEY=pk-...
SUPABASE_EMAIL_REDIRECT_URL=https://yourdomain.com/login # optional email-confirm redirectThe anon key powers both registration and login, while the optional redirect URL controls where Supabase sends users after they click the confirmation link (defaults to whatever you configure in the Supabase dashboard). If you prefer, you can expose the anon URL/key as NEXT_PUBLIC_SUPABASE_*; the code will pick up either name. The service-role key is no longer required for self-serve registration—keep it outside the app unless you have separate admin tooling.
Visit /register to create an account or /login to sign in. With email confirmation enabled in Supabase, new users must confirm their inbox before they can log in; once verified, Supabase manages the session cookies that our middleware reads.
pnpm dev– run Next.js in development mode with the sidebar shell and tool routes.pnpm build– create a production build (run before PRs).pnpm start– serve the production build locally.pnpm lint– run ESLint using the Next.js preset.
- The sidebar and UI primitives use shadcn/ui with Tailwind CSS (v4).
- Lesson plan, text feedback, and case study forms submit to typed API routes that forward the payload to OpenRouter and return Markdown-friendly drafts.
- Shared OpenRouter logic lives in
lib/openrouter.ts; update this helper if you need to change headers or request parameters globally.