How abelitoxdj/portal-escuela-normal works
Portal Académico is a role-based school portal for students, guardians, and administrators. Users sign in, then view academic and school information or manage records through the web interface and REST API; the server enforces sessions and role/CSRF checks and persists data in MySQL. The README also documents password recovery by optional SMTP. Unsampled modules are included where the README or source index establishes their role, but links are limited to relationships visible in excerpts or explicitly documented.
Main entry points: index.js Express app and sessions · auth.js Authentication routes · api.js Student and school API · admin.js Administration API
Components 16
Web interface
- Login and recovery UI
public/login.js - Portal interface
public/app.js - Portal page
public/index.html - Login page
public/login.html
Application server
- Express app and sessions
server/index.js - Authentication routes
server/routes/auth.js - Session and CSRF checks
server/middleware/auth.js
School operations
- Student and school API
server/routes/api.js - Administration API
server/routes/admin.js - Academic records and schedule
server/routes/api.js - School record management
server/routes/admin.js
Persistence and messaging
- MySQL connection pool
server/db.js - Recovery email sender
server/mailer.js
Other components
- Students, guardians, admins
- MySQL / MariaDB
- SMTP service
Connections 24
- Students, guardians, admins → Login page: opens
- Express app and sessions → Login page: serves
server/index.js - Express app and sessions → Portal page: serves after login
server/index.js - Login page → Login and recovery UI: loads script
- Portal page → Portal interface: loads script
- Login and recovery UI → Authentication routes: posts credentials
public/login.js - Portal interface → Student and school API: requests school data
public/app.js - Portal interface → Administration API: submits admin changes
public/app.js - Express app and sessions → Authentication routes: mounts routes
server/index.js - Express app and sessions → Administration API: mounts routes
server/index.js - Express app and sessions → Student and school API: mounts API
server/index.js - Express app and sessions → Session and CSRF checks: uses CSRF check
server/index.js - Authentication routes → Session and CSRF checks: uses auth checks
server/routes/auth.js - Administration API → Session and CSRF checks: uses role checks
server/routes/admin.js - Student and school API → Session and CSRF checks: uses login checks
server/routes/api.js - Authentication routes → MySQL connection pool: queries users
server/routes/auth.js - Student and school API → MySQL connection pool: queries school records
server/routes/api.js - Administration API → MySQL connection pool: manages records
server/routes/admin.js - Express app and sessions → MySQL connection pool: configures session store
server/index.js - MySQL connection pool → MySQL / MariaDB: connects to
server/db.js - Authentication routes → Recovery email sender: sends recovery email
server/routes/auth.js - Recovery email sender → SMTP service: sends via SMTP
server/mailer.js - Student and school API → Academic records and schedule: serves records
server/routes/api.js - Administration API → School record management: manages records
server/routes/admin.js