How nicolas-glith/controle-equipamentos works
This is a school equipment checkout and inventory web app. Staff select equipment, quantity, responsible teacher, period and lesson; the browser submits a withdrawal or return, and the API validates stock and records the movement in PostgreSQL. The UI also refreshes availability, active loans and history; administrators can log in and manage records. The excerpts show the main server’s transaction and query behavior, plus a separate, smaller Express app and database-pool configuration. Some routes and database schema details are unsampled, so the graph focuses on documented capabilities and visible calls.
Main entry points: server.js Main API server · database.sql PostgreSQL data · index.html Web page · script.js UI interactions
Components 14
Browser interface
- Web page
public/index.html - UI interactions
public/js/script.js
HTTP application
- Main API server
server.js - Inventory availability
server.js - Active withdrawals
server.js - Movement history
server.js - Alternate Express app
src/app.js
Movement and administration
- Movement registration
server.js - Stock validation
server.js - Admin operations
server.js
Persistence
- PostgreSQL data
database/database.sql - Configured DB pool
src/config/database.js
Other components
- School staff
- Administrator
Connections 19
- School staff → Web page: uses
README.md - Administrator → UI interactions: manages records
README.md - Web page → UI interactions: loads script
- UI interactions → Main API server: calls API
public/js/script.js - Main API server → Inventory availability: routes inventory
server.js - Main API server → Active withdrawals: routes active loans
server.js - Main API server → Movement history: routes history
server.js - Main API server → Movement registration: routes movements
server.js - Main API server → Admin operations: routes admin actions
server.js - Movement registration → Stock validation: validates stock
server.js - Movement registration → PostgreSQL data: writes records
server.js - Stock validation → PostgreSQL data: checks balances
server.js - Inventory availability → PostgreSQL data: queries availability
server.js - Active withdrawals → PostgreSQL data: queries balances
server.js - Movement history → PostgreSQL data: queries history
server.js - Admin operations → PostgreSQL data: edits records
server.js - Alternate Express app → Configured DB pool: queries through
src/app.js - Alternate Express app → Web page: serves fallback page
src/app.js - Configured DB pool → PostgreSQL data: connects to