How onlineu/nhakhotolam works
NhaKhoToLam is an inventory web application: staff sign in, search or browse items, and store them; managers can also delete items. The browser calls a Flask server, which handles Cognito authentication and forwards inventory actions to a Lambda handler. The handler validates requests, enforces device and role access, and delegates item operations to DynamoDB helpers; sorting and binary search support listing and lookup. The graph follows the sampled source and README; unsampled infrastructure and deployment wiring are not represented.
Main entry points: lambda_function.py Action handler · app.js Browser UI · server.py Flask API · db.py Inventory and security data access
Components 13
Web application
- Browser UI
Source Code/App/GUI/app.js - Staff page
Source Code/App/GUI/staff.html - Manager page
Source Code/App/GUI/admin.html - Flask API
Source Code/App/GUI/server.py
Backend actions
- Action handler
Source Code/App/Algo/lambda_function.py - Input validation
Source Code/App/Algo/validation.py
Data and algorithms
- Inventory and security data access
Source Code/App/Algo/db.py - DynamoDB
- Sort and search
Source Code/App/Algo/sorting.py
Access control
- Device security
Source Code/App/Algo/security.py
Other components
- Staff
- Manager
- Cognito
Connections 13
- Staff → Browser UI: uses
Source Code/App/GUI/app.js - Manager → Browser UI: uses
Source Code/App/GUI/app.js - Staff page → Browser UI: loads
- Manager page → Browser UI: loads
- Browser UI → Flask API: calls API
Source Code/App/GUI/app.js - Flask API → Cognito: authenticates
Source Code/App/GUI/server.py - Flask API → Action handler: invokes actions
Source Code/App/GUI/server.py - Action handler → Input validation: validates with
Source Code/App/Algo/lambda_function.py - Action handler → Device security: checks access
Source Code/App/Algo/lambda_function.py - Action handler → Inventory and security data access: reads and writes
Source Code/App/Algo/lambda_function.py - Action handler → Sort and search: sorts and searches
Source Code/App/Algo/lambda_function.py - Device security → Inventory and security data access: checks and records
Source Code/App/Algo/security.py - Inventory and security data access → DynamoDB: reads and writes
Source Code/App/Algo/db.py