How tranquangthanh902-source/tranquangthanh_24ct1_cnpm works
Thư Viện Số is an Express/EJS library-management web application backed by SQLite. Users browse public book search, while authenticated staff manage accounts, books, readers, loans and returns, and view dashboard and statistical reports. The graph separates route handlers, rendered screens, and persistent state. Source excerpts support the listed dispatches, database operations, and rendering; some README capabilities, such as responsive styling and print reporting, are represented through their existing UI paths rather than detailed implementation links.
Main entry points: server.js Express server · init.js Library database · index.js Landing and dashboard · auth.js Login and registration
Components 18
Web runtime
- Express server
server.js - Landing and dashboard
routes/index.js - Landing and dashboard screens
views - Library database
database/init.js
Access and accounts
- Authentication gate
middleware/auth.js - Login and registration
routes/auth.js - Account screens
views
Library catalog
- Book management
routes/books.js - Book screens
views/books - Reader management
routes/readers.js - Reader screens
views/readers
Circulation
- Borrow and return
routes/borrow.js - Loan screens
views/borrow
Discovery and reporting
- Public book search
routes/search.js - Search screen
views/search.ejs - Statistics and reports
routes/reports.js - Report screen
views/reports
Other components
- Visitor or staff
Connections 24
- Visitor or staff → Express server: sends requests
- Express server → Login and registration: dispatches
- Express server → Landing and dashboard: dispatches
- Express server → Public book search: dispatches
- Express server → Authentication gate: guards admin routes
- Express server → Book management: dispatches
- Express server → Reader management: dispatches
- Express server → Borrow and return: dispatches
- Express server → Statistics and reports: dispatches
- Express server → Library database: initializes
- Login and registration → Library database: reads and writes
- Login and registration → Account screens: renders
- Landing and dashboard → Library database: reads statistics
- Landing and dashboard → Landing and dashboard screens: renders
- Book management → Library database: reads and writes
- Book management → Book screens: renders
- Reader management → Library database: reads and writes
- Reader management → Reader screens: renders
- Borrow and return → Library database: updates loan state
- Borrow and return → Loan screens: renders
- Public book search → Library database: queries books
- Public book search → Search screen: renders
- Statistics and reports → Library database: queries statistics
- Statistics and reports → Report screen: renders