How iiits/alumni-portal works
Main Components
• Next.js Frontend: Represented by everything in the “app” directory along with dedicated pages like:
– Interaction pages (e.g., events, jobs, referrals)
– Profile pages (for individual profiles and “me”)
– Static miscellaneous pages (contact us, FAQs, alumni details)
– Authentication pages (login, signup, verify email, logout)
• API Layer: Found under “app/api”, which is subdivided into multiple endpoints for:
– Authentication (login, logout, signup, verify email)
– Domain-specific endpoints (alumnidetails, events, jobs, referrals, referralsubmissions, user)
– Health check endpoint (for monitoring service status)
• UI Components: In the “components” directory, these include reusable elements such as Navbar, Footer, and specialized page components (LandingPage, EventsPage, JobsPage, etc.).
• Utility & State Management: The “lib” directory contains API utilities (axios, types) and a store (state management for user and possibly other global states).
• Configuration & Assets:
– Next.js configuration files (next.config.ts, tsconfig.json, tailwind.config.ts, etc.)
– Public assets (gifs, svgs)
– Style sheets (globals.css) and other tooling files (e.g., ESLint and Husky hooks)
Relationships and Interactions
• The Next.js “app” directory uses folder‑based routing to render client and server components.
• The API routes are integrated with the Next.js framework to handle serverless function calls. They serve as the back-end logic for processing requests from the frontend.
• The UI components built under “components” are used by the pages in the “app” directory to render visual elements.
• The “lib” module provides common functionalities (like API calls with axios and state management) accessed by both pages (for client‑side interactions) and potentially API routes.
Architectural Patterns & Key Technologies
• Next.js App Router: Enables file‑based routing and renders server/client components.
• API Endpoints as Serverless Functions: Each endpoint (e.g., /api/auth, /api/jobs, etc.) represents a micro‑service‑like structure inside the same repository.
• Separation of Concerns:
– The “app” directory for UI and routing.
– The “api” sub‑folders for business logic and backend processing.
– The “components” directory for reusable UI elements ensuring modularity.
– “lib” for shared utilities and state management.
• Tools and Frameworks:
– Next.js as the framework.
– Tailwind CSS (via tailwind.config.ts) for styling.
– Optional integrations with external services (deployment on Vercel is encouraged).
– GitHub Actions (workflows under .github/workflows) and Husky hooks for CI/CD and pre‑commit checks.
– Clear labels for each core component (Frontend, API, UI Components, Utilities, Configurations).