How mahenoorsalat/aws-hack works
Project type and purpose
• This is a full-stack Next.js web application using the App Router (the presence of app/layout.js and per-route page.js files).
File structure
• Top level
– app/ – the Next.js “App Router” directory containing React Server Components and route segments.
– Config files: next.config.mjs, postcss.config.mjs, jsconfig.json.
– Package files: package.json, package-lock.json.
• Inside app/
– layout.js – root layout component (common header, footer, Providers).
– globals.css – global styles.
– page.js – home page.
– Subdirectories matching URL segments:
• SignIn/page.js & SignUp/page.js – authentication pages.
• StudentDashboard/, StudentHistory/, StudentSetting/ – student-specific views.
• TeacherDashboard/, TeacherHistory/, TeacherSettings/ – teacher-specific views.
• StudentAssistant/page.js – specialized assistant tool.
README for additional insights
• Confirms Next.js 13+ App Router, optimized font loading, Vercel-friendly.
a. Main components
1. Browser / Client (React on the client for page transitions & CSR)
2. Next.js Application Server (Node.js/Edge functions hosting React Server Components & serverless API routes)
3. External Services
– Database (e.g., PostgreSQL, MongoDB, or a managed SaaS DB)
– Optional third-party APIs (e.g., email service, font CDN)
4. CDN / Edge Network (for static assets under public/ and for caching)
b. Relationships and interactions
– The Browser sends HTTP requests to Next.js server for SSR/SSG pages and to client-side React for subsequent route transitions.
– Next.js resolves routes using the file system (app/SignIn/page.js etc.), fetches or mutates data via serverless API routes or direct database calls.
– API routes or server functions interact with the database and authentication service.
– Static assets are served from the CDN.
c. Architectural patterns & design principles
– File-based routing (App Router)
– Hybrid rendering: SSR for first-load, CSR for page transitions
– Separation of concerns: shared layout.js for common UI, per-route components for feature isolation
– Potential use of serverless “API routes” for backend logic
d. Key technologies & frameworks
– Next.js 13+ (App Router, React Server Components)
– React 18
– CSS Modules / global CSS with PostCSS
– Vercel (deployment & edge) or Node.js hosting
– Any external auth/DB libraries you integrate (e.g., firebase, @supabase/supabase-js)