How deepaselvakumarm/mern-curd works
This is a small Express/Mongoose student account and profile app. A browser signs up or logs in, then uses a session to submit a student form and view the account and form together. The main runtime entry point is app.js, which configures sessions and mounts the auth routes. The graph focuses on that runtime; server.js and servers.js appear to be alternate implementations. Relationships for route handlers are based on the excerpted routes/auth.js; views are included based on its render calls.
Main entry points: auth.js Auth Routes · app.js Session State · student.js Student Model · studentForm.js Student Form Model
Components 12
Application Runtime
- Express App
app.js - Auth Routes
routes/auth.js - Session State
app.js
Student Workflow
- Sign Up
routes/auth.js - Log In
routes/auth.js - Student Form
routes/auth.js - Profile View
routes/auth.js - EJS Templates
views
Student Data
- Student Model
models/student.js - Student Form Model
models/studentForm.js - MongoDB
Other components
- Browser
Connections 20
- Browser → Express App: sends requests
- Express App → Auth Routes: mounts routes
app.js - Express App → Session State: configures sessions
app.js - Express App → MongoDB: connects to
app.js - Auth Routes → Sign Up: dispatches
routes/auth.js - Auth Routes → Log In: dispatches
routes/auth.js - Auth Routes → Student Form: dispatches
routes/auth.js - Auth Routes → Profile View: dispatches
routes/auth.js - Sign Up → Student Model: creates student
routes/auth.js - Sign Up → Session State: sets user ID
routes/auth.js - Log In → Student Model: finds student
routes/auth.js - Log In → Session State: sets user ID
routes/auth.js - Student Form → Session State: reads user ID
routes/auth.js - Student Form → Student Form Model: saves submission
routes/auth.js - Profile View → Session State: reads user ID
routes/auth.js - Profile View → Student Model: fetches student
routes/auth.js - Profile View → Student Form Model: fetches form
routes/auth.js - Auth Routes → EJS Templates: renders templates
routes/auth.js - Student Model → MongoDB: stores records
- Student Form Model → MongoDB: stores records