How hpuno/nha-tro-sinh-vien works
This is a Vietnamese room-rental management web application with separate public and admin entry points. The verified request flow is Express startup → route → controller → Pug page; startup also initializes relational table definitions. The README contains no capability detail, and the sampled controllers implement only page rendering, so the graph does not imply unverified management operations. Domain nodes reflect the model filenames in the tree; wiring among those domains is omitted where source was not sampled.
Main entry points: initData.model.js Table initialization · index.js Express startup · home.router.js Home route · dashboard.router.js Dashboard route
Components 16
Web application
- Express startup
index.js - Client routes
router/client/index.router.js - Home route
router/client/home.router.js - Home controller
controller/client/home.controller.js - Home page
view/client/page/home/index.pug - Admin routes
router/admin/index.router.js - Dashboard route
router/admin/dashboard.router.js - Dashboard controller
controller/admin/dashboard.controller.js - Dashboard page
view/admin/page/dashboard/index.pug
Rental domain
- Rental entities
models - Tenants and staff
models - Services and billing
models
Persistence
- Table initialization
models/initData.model.js - MySQL pool
config/database.js
Other components
- Visitor
- Admin user
Connections 15
- Express startup → Client routes: mounts routes
- Express startup → Admin routes: mounts routes
- Visitor → Home route: requests home
- Client routes → Home route: mounts route
- Home route → Home controller: dispatches
- Home controller → Home page: renders
- Admin user → Dashboard route: requests dashboard
- Admin routes → Dashboard route: mounts route
- Dashboard route → Dashboard controller: dispatches
- Dashboard controller → Dashboard page: renders
- Express startup → Table initialization: initializes tables
- Table initialization → Rental entities: invokes definitions
- Table initialization → Tenants and staff: invokes definitions
- Table initialization → Services and billing: invokes definitions
- Rental entities → MySQL pool: executes SQL