How thanuk-sys/smart-student-portal-mern works
Smart Student Portal is a role-based student information portal: students and administrators sign in, then view or manage academic and campus information. The client routes authenticated users into portal pages and uses a shared state layer; the API authenticates requests and serves snapshots or administrative operations backed by MongoDB. Admins can manage students, marks, subjects, timetables, and uploaded documents; students can view their portal and update permitted profile data. The graph follows documented routes and sampled imports/calls; unsampled page-to-data details are not inferred.
Main entry points: App.jsx Route application · index.js Express application · admin.js Admin operations · auth.js JWT and guards
Components 24
Portal client
- Route application
client/src/App.jsx - Sign-in page
client/src/pages/login.jsx - Portal shell
client/src/components/portal/AppShell.jsx - Global search
client/src/components/portal/GlobalSearch.jsx - Dashboard
client/src/pages/dashboard.jsx - Student records
client/src/pages/students.jsx - Marks and results
client/src/pages/marks.jsx - Timetable
client/src/pages/timetable.jsx - Syllabus
client/src/pages/syllabus.jsx - Library
client/src/pages/library.jsx - Notices
client/src/pages/notices.jsx - Profile
client/src/pages/profile.jsx
Authentication
- Login and session
server/src/routes/auth.js - JWT and guards
server/src/auth.js
Portal API
- API client
client/src/lib/api.js - Express application
server/src/index.js
Academic services
- Portal snapshot
server/src/routes/state.js - Admin operations
server/src/routes/admin.js - Demo data
server/src/seed.js
Persistence
- Domain models
server/src/models.js - MongoDB connection
server/src/db.js - Uploaded files
Other components
- Student or admin
- MongoDB
Connections 29
- Student or admin → Route application: uses
- Route application → Sign-in page: routes to
client/src/App.jsx - Route application → Dashboard: routes to
client/src/App.jsx - Route application → Student records: routes to
client/src/App.jsx - Route application → Marks and results: routes to
client/src/App.jsx - Route application → Timetable: routes to
client/src/App.jsx - Route application → Syllabus: routes to
client/src/App.jsx - Route application → Library: routes to
client/src/App.jsx - Route application → Notices: routes to
client/src/App.jsx - Route application → Profile: routes to
client/src/App.jsx - Route application → Portal shell: renders
client/src/App.jsx - Portal shell → Global search: renders
client/src/components/portal/AppShell.jsx - API client → Express application: calls API
- Express application → Login and session: mounts
server/src/index.js - Express application → Portal snapshot: mounts
server/src/index.js - Express application → Admin operations: mounts
server/src/index.js - Login and session → JWT and guards: verifies and signs
server/src/routes/auth.js - Login and session → Domain models: queries
server/src/routes/auth.js - Portal snapshot → JWT and guards: guards routes
server/src/routes/state.js - Portal snapshot → Domain models: reads and writes
server/src/routes/state.js - Admin operations → JWT and guards: guards routes
server/src/routes/admin.js - Admin operations → Domain models: manages records
server/src/routes/admin.js - Express application → MongoDB connection: connects
server/src/index.js - MongoDB connection → MongoDB: opens connection
- Express application → Demo data: seeds if empty
server/src/index.js - Demo data → Domain models: populates
server/src/seed.js - Demo data → JWT and guards: hashes passwords
server/src/seed.js - Express application → Uploaded files: serves uploads
server/src/index.js - Admin operations → Uploaded files: stores and removes files