How builequochung2k5/builequochung2k5k23cnt3_builequochung_doantotnghiep works
LibriFlow is a library-circulation application: staff manage books and copies, create and return loans, while readers access account and borrowing history; administrators review statistics and forecasts. The React client sends requests to the Express API, which applies authentication and domain rules before accessing MySQL. Forecasting uses a reader’s daily loan counts and returns a seven-day prediction. The README documents the main user workflows and client/server connection; some feature modules were not sampled, so their internal call paths are not asserted here.
Main entry points: App.jsx App and routing · ket-noi-http.js HTTP API client · app-factory.js Express app and routes · sach.service.js Books and copies services
Components 29
React application
- App and routing
Frontend/src/ung-dung/App.jsx - HTTP API client
Frontend/src/thu-vien/api/ket-noi-http.js
Identity and access
- Sign-in and account
Frontend/src/chuc-nang/xac-thuc/TrangDangNhap.jsx - Authentication routes
Backend/src/routes/xac-thuc.routes.js - Authentication handlers
Backend/src/controllers/xac-thuc.controller.js - Authentication service
Backend/src/services/xac-thuc.service.js - User and auth models
Backend/src/models/xac-thuc.model.js - Token and permission checks
Backend/src/middlewares/xac-thuc.js
Catalog management
- Book management
Frontend/src/chuc-nang/sach/TrangQuanLySach.jsx - Public API query
Frontend/src/chuc-nang/api-cong-khai/dich-vu-cong-khai.js - Catalog routes
Backend/src/routes/sach.routes.js - Books and copies services
Backend/src/services/sach.service.js - Copy handlers
Backend/src/controllers/ban-sao-sach.controller.js - Catalog validation
Backend/src/utils/kiem-tra-sach.js - ISBN normalization
chung/isbn.mjs
Circulation
- Borrow and return
Frontend/src/chuc-nang/muon-tra/TrangMuonTra.jsx - Reader history
Frontend/src/chuc-nang/doc-gia/TrangLichSuMuon.jsx - Loan routes
Backend/src/routes/phieu-muon.routes.js - Loan and return rules
Backend/src/services/phieu-muon.service.js - Usage and loan history
Backend/src/services/lich-su-su-dung.service.js
Analytics and platform
- Statistics and forecasts
Frontend/src/chuc-nang/phan-tich/TrangDuBao.jsx - Statistics and forecast routes
Backend/src/routes/du-bao.routes.js - Forecast algorithm
Backend/src/utils/thuat-toan-du-bao.js
API and persistence
- Express app and routes
Backend/src/app-factory.js - MySQL database
Backend/src/config/co-so-du-lieu.js
Other components
- Library staff
- Reader
- Administrator
- Public API consumer
Connections 34
- Library staff → App and routing: uses
README.md - Reader → App and routing: uses
README.md - Administrator → App and routing: uses
README.md - App and routing → Sign-in and account: routes to
- App and routing → Book management: routes to
- App and routing → Borrow and return: routes to
- App and routing → Statistics and forecasts: routes to
- Sign-in and account → HTTP API client: sends requests
- Book management → HTTP API client: sends requests
Frontend/src/chuc-nang/sach/TrangQuanLySach.jsx - Borrow and return → HTTP API client: sends requests
- Reader history → HTTP API client: loads history
- Statistics and forecasts → HTTP API client: requests insights
- Public API consumer → Public API query: queries
- Public API query → HTTP API client: sends requests
- HTTP API client → Express app and routes: calls API
README.md - Express app and routes → Authentication routes: registers
Backend/src/app-factory.js - Express app and routes → Catalog routes: registers
Backend/src/app-factory.js - Express app and routes → Loan routes: registers
Backend/src/app-factory.js - Express app and routes → Statistics and forecast routes: registers
Backend/src/app-factory.js - Authentication routes → Authentication handlers: dispatches
Backend/src/routes/xac-thuc.routes.js - Authentication handlers → Authentication service: calls
Backend/src/controllers/xac-thuc.controller.js - Authentication service → User and auth models: reads and writes
Backend/src/services/xac-thuc.service.js - Authentication routes → Token and permission checks: guards routes
Backend/src/routes/xac-thuc.routes.js - Catalog routes → Books and copies services: dispatches
- Copy handlers → Books and copies services: calls
Backend/src/controllers/ban-sao-sach.controller.js - Books and copies services → Catalog validation: uses rules
- Catalog validation → ISBN normalization: normalizes ISBN
Backend/src/utils/kiem-tra-sach.js - Loan routes → Loan and return rules: dispatches
- Loan and return rules → Usage and loan history: records activity
- Statistics and forecast routes → Forecast algorithm: uses date rules
Backend/src/routes/du-bao.routes.js - Statistics and forecast routes → MySQL database: reads history
- User and auth models → MySQL database: persists users
- Books and copies services → MySQL database: reads and writes
- Loan and return rules → MySQL database: reads and writes