How aura-web-app/frontend works
AURA is a student learning platform whose visible workflow spans account access, study tools, course learning, and AI tutoring. The sampled AI chat API authenticates users, applies usage limits, dispatches to a selected model, and returns a response; sampled pages also show a local study timer and course experience. Other protected learning areas are present in the route tree, but their implementation and wiring were not sampled, so they are represented without speculative connections.
Main entry points: route.ts Chat API · createclient.tsx Supabase client · app/page.tsx Landing page · signup/page.tsx Sign up
Components 25
Student experience
- Landing page
app/page.tsx - AI tutor page
app/(common)/ai/page.tsx - AI pricing
app/(common)/ai/pricing/page.tsx - Product demo
app/(common)/demo/page.tsx
Accounts and access
- Sign up
app/signup/page.tsx - Login
app/login/page.tsx - Email verification
app/api/email/route.ts - Email existence check
app/api/check/route.ts - Protected access
app/middleware.tsx
Learning tools
- Dashboard
app/(protected)/dashboard/page.tsx - Courses and wallet
app/(protected)/courses/page.tsx - Study timer
app/(common)/timer/page.tsx - Study calendar
app/(protected)/calendar/page.tsx - Exam practice
app/(protected)/exam/page.tsx - Mistake notebook
app/(protected)/mistake-nb/page.tsx - Past questions
app/(protected)/pyqs/page.tsx - Student profile
app/(protected)/profile/page.tsx
AI tutoring
- Chat API
app/api/ai/chat/route.ts - Usage API
app/api/ai/usage/route.ts - Model providers
lib/ai/model.ts - AI message types
types/ai.ts
Platform services
- Usage tracking
lib/supabase/usage.tsx - Supabase client
lib/supabase/createclient.tsx
Other components
- Student
- Supabase
Connections 26
- Student → Landing page: opens
app/page.tsx - Student → Login: signs in
app/login/page.tsx - Login → Supabase client: authenticates with
app/login/page.tsx - Student → Sign up: registers
- Sign up → Email verification: requests verification
- Email verification → Supabase: verifies email
app/api/email/route.ts - Email existence check → Supabase: checks users
app/api/check/route.ts - Landing page → Login: links to
app/page.tsx - Landing page → Sign up: routes to
app/page.tsx - Student → AI tutor page: uses tutor
- Student → Study timer: tracks study
- Student → Courses and wallet: views courses
- Courses and wallet → Supabase client: reads session
app/(protected)/courses/page.tsx - Student → Dashboard: views progress
- Student → Study calendar: plans study
- Student → Exam practice: practices exams
- Student → Mistake notebook: reviews mistakes
- Student → Past questions: practices questions
- Student → Student profile: manages profile
- AI tutor page → Chat API: submits chat
- Chat API → Supabase client: validates token
app/api/ai/chat/route.ts - Chat API → Usage tracking: checks and increments
app/api/ai/chat/route.ts - Usage API → Supabase client: validates token
app/api/ai/usage/route.ts - Usage API → Usage tracking: reads usage
app/api/ai/usage/route.ts - Chat API → Model providers: dispatches model call
app/api/ai/chat/route.ts - Chat API → AI message types: uses message types
app/api/ai/chat/route.ts