How nehuen233/controltech works
ControlTech is a multi-institution school-lab management system. Users sign in, then manage their institution’s labs, equipment, software, maintenance and alerts; SUPERADMIN users manage institutions and subscription payments. The React app routes users to these workflows and calls the Express API; backend controllers enforce access and persist data in MySQL. The README also documents first-time institution setup, payment status and suspension behavior. Some subsystems are represented by their existing directories because their implementation files were not sampled.
Main entry points: index.js API routes · db.js MySQL database · App.jsx App navigation · api.js API client
Components 26
Web application
- App navigation
frontend/src/App.jsx - Session context
frontend/src/AuthContext.jsx - API client
frontend/src/api.js - Setup wizard
frontend/src/pages/PrimerosPasos/index.jsx - Lab management
frontend/src/pages/Laboratorios.jsx - Equipment management
frontend/src/pages/Equipos.jsx - Maintenance UI
frontend/src/pages/Mantenimientos.jsx - Live alerts
frontend/src/components/Alertas.jsx - Platform screens
frontend/src/pages
API and identity
- Express server
backend/src/server.js - API routes
backend/src/routes/index.js - Authentication
backend/src/middlewares/auth.js - User administration
backend/src/controllers/usuariosController.js - Access controls
backend/src/utils/acceso.js - Action history
backend/src/utils/historial.js
Lab operations
- Lab records
backend/src/controllers/laboratoriosController.js - Equipment records
backend/src/controllers/equiposController.js - Software and licenses
backend/src/controllers/softwareController.js - Maintenance records
backend/src/controllers/mantenimientosController.js - Alerts and events
backend/src/controllers/alertasController.js
Institutions and billing
- Institution administration
backend/src/controllers/institucionController.js - Payment management
backend/src/controllers/pagosController.js - Billing lifecycle
backend/src/utils/cobros.js
Persistence
- MySQL database
backend/src/config/db.js - Schema and migrations
backend/src/config/esquema.js
Other components
- School user
Connections 43
- School user → App navigation: uses
- App navigation → Session context: checks session
frontend/src/App.jsx - App navigation → Setup wizard: routes to
frontend/src/App.jsx - App navigation → Lab management: routes to
frontend/src/App.jsx - App navigation → Equipment management: routes to
frontend/src/App.jsx - App navigation → Maintenance UI: routes to
frontend/src/App.jsx - App navigation → Live alerts: uses
frontend/src/App.jsx - App navigation → Platform screens: routes to
frontend/src/App.jsx - Session context → API client: requests session
frontend/src/AuthContext.jsx - Setup wizard → API client: sends setup data
frontend/src/pages/PrimerosPasos/index.jsx - Lab management → API client: requests data
frontend/src/pages/Laboratorios.jsx - Equipment management → API client: requests data
frontend/src/pages/Equipos.jsx - Maintenance UI → API client: requests data
frontend/src/pages/Mantenimientos.jsx - Live alerts → API client: opens stream
frontend/src/api.js - API client → Express server: sends API requests
frontend/src/api.js - Express server → API routes: mounts
- Express server → Billing lifecycle: starts checks
backend/src/server.js - API routes → Authentication: applies auth
backend/src/routes/index.js - API routes → User administration: dispatches to
backend/src/routes/index.js - API routes → Lab records: dispatches to
backend/src/routes/index.js - API routes → Equipment records: dispatches to
backend/src/routes/index.js - API routes → Software and licenses: dispatches to
backend/src/routes/index.js - API routes → Maintenance records: dispatches to
backend/src/routes/index.js - API routes → Alerts and events: dispatches to
backend/src/routes/index.js - API routes → Institution administration: dispatches to
backend/src/routes/index.js - API routes → Payment management: dispatches to
backend/src/routes/index.js - Authentication → MySQL database: checks identity
backend/src/middlewares/auth.js - User administration → MySQL database: reads and writes
backend/src/controllers/usuariosController.js - Lab records → MySQL database: reads and writes
backend/src/controllers/laboratoriosController.js - Equipment records → MySQL database: reads and writes
backend/src/controllers/equiposController.js - Equipment records → Access controls: checks lab access
backend/src/controllers/equiposController.js - Maintenance records → MySQL database: reads and writes
backend/src/controllers/mantenimientosController.js - Maintenance records → Alerts and events: resolves and notifies
backend/src/controllers/mantenimientosController.js - Alerts and events → MySQL database: reads and writes
backend/src/controllers/alertasController.js - Institution administration → MySQL database: reads and writes
backend/src/controllers/institucionController.js - Institution administration → Billing lifecycle: uses billing rules
backend/src/controllers/institucionController.js - Payment management → MySQL database: reads and writes
backend/src/controllers/pagosController.js - Payment management → Billing lifecycle: applies payment rules
backend/src/controllers/pagosController.js - Billing lifecycle → MySQL database: reviews accounts
backend/src/utils/cobros.js - Billing lifecycle → Alerts and events: emits notices
backend/src/utils/cobros.js - Schema and migrations → MySQL database: checks schema
backend/src/config/esquema.js - User administration → Action history: records actions
backend/src/controllers/usuariosController.js - Payment management → Action history: records actions
backend/src/controllers/pagosController.js