Generative Universal Assistant for Resourceful Development
GUARD is a scaffolded AI learning environment for educators. Instead of treating the chat model as the product, it treats the educator's thinking process as the product: each lab guides the user through reflection, prompt composition, generation, and critical evaluation inside a split-panel workspace.
GUARD helps educators practice using AI critically through structured labs:
Plan a Class ActivityCreate a Learning AssessmentDesign a Rubric
Each lab is broken into guided iterations. Users answer Socratic scaffolding questions, watch those answers assemble into a prompt template, send the prompt to a live model, and then evaluate the output for alignment, rigor, and common AI failure modes.
- Split-panel lab interface with scaffolding on the left and live chat on the right
- Four-phase workflow per iteration:
Reflect -> Compose -> Generate -> Evaluate - Three built-in educator labs with domain-specific prompts and evaluation checklists
- Prompt assembly that turns reflection answers into an editable prompt template
- Streaming chat responses via OpenRouter-compatible models
- Optional BYOK flow on the Settings page for model choice
- Additional context upload support for
pdf,docx,txt, andmdfiles - Session persistence in browser storage so users can resume work locally
- Session history with autosave and side-by-side comparison during later iterations
- Next.js 16 App Router
- React 19
- TypeScript
- Tailwind CSS 4
- Zustand for client state and persistence
- OpenAI SDK pointed at the OpenRouter API
pdf-parseandmammothfor file ingestion
Install dependencies:
npm installRun the app:
npm run devOpen http://localhost:3000.
Chat requests require an OpenRouter API key from one of these sources:
OPENROUTER_API_KEYin your local environment- A BYOK key entered in the app's Settings page
Example .env:
OPENROUTER_API_KEY=sk-or-v1-...Without either of those, /api/chat will return an error.
- Start from the landing page and choose one of the three labs.
- Answer the reflection questions in the left panel.
- Review or edit the assembled prompt in the compose phase.
- Send the prompt to the model and inspect the streamed response.
- Work through the evaluation checklist and reflection prompts.
- Continue into the next iteration or complete the lab.
The Settings page lets users store a BYOK OpenRouter key in sessionStorage and choose from curated model options or a custom OpenRouter model ID.
GUARD is intentionally browser-local for user state:
- Chat messages, active lab session, selected model, and BYOK key are stored in
sessionStorage - Session history is stored in
localStorage - History keeps up to 20 sessions
This means saved work is tied to the same browser and device. Clearing browser data removes it.
The scaffolding panel supports optional context uploads to enrich prompts.
- Supported types:
pdf,docx,txt,md - Maximum file size:
20 MB - Uploaded files are parsed through
/api/parse-fileand normalized into plain text
/- landing page and lab selection/lab/[labId]- guided lab workspace/settings- BYOK and model selection/history- resume or review saved sessions/api/chat- streaming chat proxy to OpenRouter/api/parse-file- text extraction for uploaded files
app/
api/
history/
lab/[labId]/
settings/
components/
chat/
landing/
layout/
scaffolding/
content/
activity-planning.ts
assessment-creation.ts
rubric-design.ts
hooks/
stores/
lib/
npm run dev
npm run build
npm run start
npm run lint- The default model constant is
arcee-ai/trinity-large-preview:free. - On hosted deployments, a shared OpenRouter key can be supplied through environment configuration.
netlify.tomlcurrently contains a redirect from the old Netlify domain toguard.ai-pathfinder.eu.