Skip to content

Sebstep/pathfinder-guard

Repository files navigation

Getting Started

Install dependencies and run the local dev server:

pnpm install
pnpm dev

Open 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.

Environment variables

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 override
  • OPENROUTER_API_KEY is mandatory for server-side requests made from the /api/* routes.
  • OPENROUTER_SITE_URL is forwarded in the HTTP-Referer header, which OpenRouter recommends for attribution.
  • OPENROUTER_MODEL lets you swap the default model without touching code. You may also set OPENROUTER_BASE_URL if routing through a proxy.

Restart pnpm dev after editing environment variables.

Authentication

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 redirect

The 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.

Available scripts

  • 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.

Tech notes

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published