How franndeli/blooming works
Project Type and Purpose
• Full‐stack web application (“Blooming”) for real‐time monitoring of elementary and early middle school students’ emotional well‐being.
• Backend: Node.js + Express REST API with Sequelize ORM over an SQL database.
• Frontend: Angular SPA with custom WebGL graphics engine for interactive emotional state visualization.
• Target users: administrators, teachers, center managers, students (viewing simple experiences).
File Structure Analysis
• Top-level:
• backend/: controllers/, models/, routes/, middleware/, helpers/, database/ → standard MVC pattern.
• frontend/: Angular workspace with modules (auth, commons, components, graphics, pages, services), assets (styles, images, shaders, libs).
• Backend:
• controllers/*.js handle HTTP requests.
• routes/*.js map paths → controllers.
• models/*.js define DB entities and associations.js wires them.
• middleware/* handle JWT validation, role checks, hashing, input validation.
• helpers/jwt.js and middleware/validar-jwt.js implement authentication.
• Frontend:
• app-routing.module.ts and feature routing modules separate auth, admin, teacher, student, center areas.
• services/*.service.ts wrap HTTP calls to REST endpoints.
• graphics/ implements a scene graph and WebGL engine (arbol_escena, gestor_recursos, motor).
• assets/libs include third-party JS/CSS (Bootstrap, jQuery, ApexCharts, SimpleBar).
• components and pages folders organize UI by feature (admin, profesores, alumnos, centros, etc.).
Key Architectural Patterns
• Backend: MVC + layered middleware for cross-cutting concerns (auth, validation).
• Frontend: Modular Angular architecture with feature modules, component-based UI, service-based data layer.
• WebGL subsystem: custom graphics engine internal to the front end, decoupled via services.
a. Main Components
• Client Browser (Angular SPA)
• REST API Server (Node.js + Express)
• SQL Database (MySQL/PostgreSQL via Sequelize)
• Authentication Service (JWT issuance/validation)
• WebGL Engine (inside SPA)
• Static Assets CDN or Server (served by Express or external)
b. Interactions
1. User interacts with Angular UI → Angular services invoke HTTP(S) requests to REST API endpoints.
2. REST API middleware validates JWT, checks roles.
3. Controllers perform business logic and use Sequelize models to query/update the SQL database.
4. Responses (JSON) flow back to Angular services → components update UI, graphics engine renders scenes.
5. Static assets (images, shaders, JS libs) served to client at build time or via CDN.
c. Important Patterns
• Stateless REST API with JWT-based auth.
• ORM layer abstracts SQL schemas.
• Angular lazy-loaded feature modules for admin/teacher/student flows.
• MVC separation in backend, component/service separation in frontend.
d. Key Technologies
• Node.js, Express, Sequelize on the server.
• Angular CLI, TypeScript, WebGL (custom engine) on the client.
• Third-party libs: Bootstrap, ApexCharts for data visualization, SimpleBar for scrollbars.