How prodip-shadow/alumnet works
Purpose and topology
This is a full-stack alumni/community platform: authentication, alumni profiles and migration, social posts and threaded interactions, connections, opportunities, events, projects, skills, departments/faculty, verification, payments, notifications, and an AI assistant. The frontend is a Next.js application; the backend is a Node.js HTTP API with realtime notification support.
Runtime entry points
• Backend startup is Backend/server.js, which delegates application assembly to Backend/src/app.js.
• The browser application uses the Next.js App Router root at frontend/src/app/layout.jsx; the main community/home route is frontend/src/app/(common)/page.jsx.
• Authentication screens are independently routed at frontend/src/app/login/page.jsx and frontend/src/app/register/page.jsx.
API composition and domain boundary
The backend follows route → controller → model/service layering. Route modules expose HTTP resource boundaries, controllers coordinate request handling, and models represent persistence operations.
• Auth and account lifecycle: Backend/src/routes/auth.route.js, Backend/src/controllers/auth.controller.js, Backend/src/models/user.model.js.
• Alumni identity and onboarding/migration: Backend/src/routes/alumni.route.js, Backend/src/routes/alumniMigration.route.js, Backend/src/models/alumni.model.js.
• Institutional and professional catalog domains: Backend/src/routes/department.route.js, Backend/src/routes/opportunity.route.js, Backend/src/routes/project.route.js.
Social graph and feed
Posts are the central community-content aggregate, with separately modeled comments, replies, likes, and user connections rather than a monolithic feed model.
• Feed content: Backend/src/routes/post.route.js, Backend/src/controllers/post.controller.js, Backend/src/models/post.model.js.
• Conversation/engagement: Backend/src/routes/comment.route.js, Backend/src/routes/reply.route.js, Backend/src/models/commentLike.model.js.
• Relationship graph: Backend/src/routes/connection.route.js, Backend/src/controllers/connection.controller.js, Backend/src/models/connection.model.js.
• The frontend renders and creates feed content through frontend/src/components/home/PostCard.jsx and frontend/src/components/home/CreatePostCard.jsx.
Security and request controls
Authentication is enforced at the middleware layer, with role-based authorization and rate limiting as separate cross-cutting controls. Upload handling is also isolated before controllers/services process media.
• Backend/src/middlewares/auth.middleware.js
• Backend/src/middlewares/role.middleware.js
• Backend/src/middlewares/rateLimit.middleware.js
• Backend/src/middlewares/upload.middleware.js
Persistence, external services, and async interaction
The system uses a SQL database, defined by Backend/sql/schema.sql and connected through Backend/src/config/db.js. Cloudinary is the media-storage integration, configured and wrapped in Backend/src/config/cloudinary.js and Backend/src/services/cloudinary.service.js. AI requests cross an explicit service boundary via Backend/src/services/aiAssistant.service.js. Notifications have both service and socket delivery paths: Backend/src/services/notification.service.js and Backend/src/sockets/notification.socket.js.
Frontend state and backend access
The frontend maintains authenticated user/session state in frontend/src/context/AuthContext.jsx. Browser API calls are centralized in frontend/src/lib/axios.js, creating the main client/server boundary. Shared navigation is frontend/src/components/shared/Navbar.jsx; home composition includes frontend/src/components/home/Sidebar.jsx.
Main entry points: auth.middleware.js Request controls · schema.sql SQL database · post.route.js Posts · app.js Application assembly
Components 19
Next.js frontend
- App Router root
frontend/src/app/layout.jsx - Community home
frontend/src/app/(common)/page.jsx - Login and registration
frontend/src/app/login/page.jsx - Session state
frontend/src/context/AuthContext.jsx - API client
frontend/src/lib/axios.js - Feed composition · Creates and renders community posts.
frontend/src/components/home/PostCard.jsx - Shared navigation
frontend/src/components/shared/Navbar.jsx
Node.js API
- Server startup
Backend/server.js - Application assembly
Backend/src/app.js - Request controls · Authentication, roles, rate limits, and uploads run before handlers.
Backend/src/middlewares/auth.middleware.js - Accounts and alumni · Auth, profiles, onboarding, and alumni migration.
Backend/src/routes/auth.route.js - Institutional catalog · Departments, opportunities, and projects.
Backend/src/routes/department.route.js - Posts · Central community-content aggregate.
Backend/src/routes/post.route.js - Comments and reactions · Threaded comments, replies, and likes.
Backend/src/routes/comment.route.js - Connections · User relationship graph.
Backend/src/routes/connection.route.js - Notifications · Persists and delivers realtime notifications.
Backend/src/services/notification.service.js - AI assistant
Backend/src/services/aiAssistant.service.js
Data and integrations
- SQL database · Schema-backed application data store.
Backend/sql/schema.sql - Cloudinary · Uploads are managed through the Cloudinary service.
Backend/src/services/cloudinary.service.js
Connections 25
- App Router root → Community home: renders
- App Router root → Login and registration: routes
- Community home → Feed composition: composes
- Community home → Shared navigation: uses
- Login and registration → Session state: establishes session
- Session state → API client: supplies credentials
- Feed composition → API client: reads and creates posts
- API client → Application assembly: HTTP requests
- Server startup → Application assembly: starts
- Application assembly → Request controls: applies
- Request controls → Accounts and alumni: guards
- Request controls → Posts: guards
- Request controls → Institutional catalog: guards
- Request controls → Connections: guards
- Posts → Comments and reactions: supports discussion
- Posts → Notifications: emits activity
- Connections → Notifications: emits activity
- Accounts and alumni → SQL database: persists
- Institutional catalog → SQL database: persists
- Posts → SQL database: persists
- Comments and reactions → SQL database: persists
- Connections → SQL database: persists
- Notifications → SQL database: stores notifications
- Request controls → Cloudinary: uploads media
- Application assembly → AI assistant: serves assistant requests