How arjun010011/main-project works
Project type and purpose
• This is a full-stack Next.js 13 web application for an educational testing platform.
• It provides:
• Student and teacher authentication (email/password + Google OAuth)
• Teacher-led test creation, live test orchestration, analytics
• Student-focused test participation and result tracking
File structure
• app/
• (auth)/private/{studentDashboard,teacherDashboard}/… – Authenticated UI routes and layout
• (auth)/signin & (auth)/signup – Public auth pages
• api/auth/* – Serverless routes for signup, signin, logout, Google OAuth
• api/classRoom/* – Classroom and test management REST endpoints (create, fetch, live test, analytics, etc.)
• Pages for About, Contact, Features, Pricing
• Shared UI components under app/components
• components/ui/ – Low-level design system (buttons, cards, dropdowns)
• lib/
• prisma.js – ORM client for primary database
• firebase.js – Firebase init (e.g., for push notifications or auth hooks)
• store/userStore.js – Client-side state management
• prisma/schema.prisma – Data model for PostgreSQL or compatible SQL database
• utils/supabaseClient.js – Supabase real-time client for live test events
• next.config.mjs, tsconfig/jsconfig, ESLint, PostCSS – Configuration for build/deploy
README insights
• Bootstrapped with create-next-app, deployed on Vercel
• Uses next/font for optimized font loading
Elements
• Blue rectangles for UI components/pages
• Green for serverless functions/API routes
• Gray clouds for external services (Google OAuth, Vercel hosting)
• Annotations for data flow: e.g., “JWT token”, “session cookie”, “Prisma query”
Essential architectural elements without over-splitting
• Client-side state store (userStore.js) as part of the Presentation Layer
• Supabase client in both Application and Presentation layers for real-time subscription/publish