How gabrielal-najjar/noesis works
Purpose and topology
This is a quiz application with an Angular single-page client, a Node.js backend API, file-backed persistence, Docker deployment, and a separate static prototype (“maquette”). Users can select/configure profiles, create quizzes and questions, play quiz attempts, and view statistics.
Runtime entry points
• Angular bootstraps from front-end/src/main.ts; module and route composition are in front-end/src/app/app.module.ts and front-end/src/app/app-routing.module.ts.
• The backend starts its HTTP server through backend/app/index.js, with server construction separated in backend/app/build-server.js.
• Containers are composed for normal and end-to-end execution through ops/docker-compose.yml and ops/docker-compose-e2e.yml; the frontend is served by Nginx (front-end/nginx.conf).
Client application shell and navigation
The Angular application is organized around routed page components and a shared root shell. Major user journeys cover homepage/navigation, quiz browsing/creation/play, profile setup/selection, and statistics.
• Root and routes: front-end/src/app/app.component.ts, front-end/src/app/app-routing.module.ts
• Quiz play page: front-end/src/app/components/quiz/quiz-page/quiz-page.component.ts
• User/profile and stats pages: front-end/src/app/components/user/user-profile-selection-page/user-profile-selection-page.component.ts, front-end/src/app/components/user/user-stats-page/user-stats-page.component.ts
Quiz authoring and play flow
Quiz authoring is a nested component workflow: quiz creation/configuration contains question configuration, then question/answer editing. Play renders questions and answers, supports hints/reminders, and finishes on an end page.
• Creation and editing: front-end/src/app/components/quiz/quizCreation/quizCreationPage.component.ts, front-end/src/app/components/quiz/quizConfigurator/quizCreationConfigurator.component.ts, front-end/src/app/components/quiz/questionConfigurator/questionConfigurator.component.ts
• Play and result UI: front-end/src/app/components/quiz/quiz-page/quiz-page.component.ts, front-end/src/app/components/quiz/quiz-page-end/quiz-page-end.component.ts
• Client-side orchestration is split between API-facing and logic services: front-end/src/app/services/quiz-service.service.ts, front-end/src/app/services/quiz-creation.service.ts, front-end/src/app/services/quiz-logic.service.ts.
Backend API boundary
The backend exposes resource-oriented API modules for users, quizzes, nested questions/answers, and quiz attempts. Each resource has route registration plus a manager layer, which isolates HTTP handling from domain/persistence operations.
• API aggregation: backend/app/api/index.js
• Quiz resource stack: backend/app/api/quizzes/index.js, backend/app/api/quizzes/manager.js
• Nested content and attempts: backend/app/api/quizzes/questions/manager.js, backend/app/api/quizzes/questions/answers/manager.js, backend/app/api/quizAttempt/manager.js
• User endpoints: backend/app/api/users/index.js, backend/app/api/users/manager.js
Domain models and persistence
Backend models define the persistent entities: quizzes, questions, answers, residents/users, configuration, and statistics. A shared base model likely centralizes data access semantics and validation/error boundaries. Persistence is JSON data files under backend/database, rather than an external database.
• Model assembly and core entities: backend/app/models/index.js, backend/app/models/quiz-model.js, backend/app/models/stats-model.js
• Shared model/error boundary: backend/app/utils/base-model.js, backend/app/utils/errors/validation-error.js
• Persistent datasets: backend/database/quiz.data.json, backend/database/question.data.json, backend/database/stats.data.json
Stats and attempt data flow
During quiz completion, the client’s quiz logic and API service submit/retrieve attempt data through the attempt endpoint. Backend attempt handling updates or reads stats-domain records; the frontend maps those into profile-statistics views, charts, history, and detail components.
• Client stats services: front-end/src/app/services/user-stats.service.ts, front-end/src/app/services/user-stats-service.service.ts
• Stats presentation: front-end/src/app/components/user/user-stats-layout-container/user-stats-layout-container.component.ts, front-end/src/app/components/user/user-stats-charts/user-stats-charts.component.ts
• Backend boundary/data: backend/app/api/quizAttempt/index.js, backend/app/models/stats-model.js
Infrastructure and prototype boundary
Dockerfiles exist for standard and Playwright-enabled frontend/backend images. Playwright end-to-end scenarios exercise the composed system. The maquette Python/static HTML-CSS tree is a design prototype and appears separate from the production Angular/API runtime.
• Images: backend/Dockerfile, front-end/Dockerfile, backend/Dockerfile.playwright
• System tests: ops/run-e2e.sh, front-end/e2e/scenarios/create-quiz-scenario.spec.ts
• Prototype: maquette/matrio.py, maquette/src/pages/index.html
Main entry points: app-routing.module.ts App shell & routes · quizzes/index.js Resource routes · quiz-page.component.ts Quiz play & result · models/index.js Domain models
Components 19
Angular client
- Angular bootstrap
front-end/src/main.ts - App shell & routes
front-end/src/app/app-routing.module.ts - Quiz authoring · Nested quiz, question, and answer configuration UI.
front-end/src/app/components/quiz/quizCreation/quizCreationPage.component.ts - Quiz play & result
front-end/src/app/components/quiz/quiz-page/quiz-page.component.ts - Profiles & statistics
front-end/src/app/components/user/user-stats-layout-container/user-stats-layout-container.component.ts - Quiz client services
- Stats client services
Node.js API
- HTTP server entry
backend/app/index.js - Server builder
backend/app/build-server.js - API router
backend/app/api/index.js - Resource routes · Users, quizzes, nested content, and attempts.
backend/app/api/quizzes/index.js - Domain managers · Separates route handling from domain and persistence operations.
backend/app/api/quizzes/manager.js - Domain models · Quiz, user, configuration, and statistics entities.
backend/app/models/index.js - Model base & validation
backend/app/utils/base-model.js - JSON datasets · File-backed quizzes, questions, and statistics.
backend/database/quiz.data.json
Deployment & testing
- Nginx frontend
front-end/nginx.conf - Docker Compose · Normal and end-to-end container topology.
ops/docker-compose.yml - Playwright E2E · Exercises composed quiz creation flows.
front-end/e2e/scenarios/create-quiz-scenario.spec.ts
Static prototype
Separate from the production runtime.
- Maquette prototype · Independent design prototype.
maquette/matrio.py
Connections 21
- Angular bootstrap → App shell & routes: boots
- App shell & routes → Quiz authoring: routes to
- App shell & routes → Quiz play & result: routes to
- App shell & routes → Profiles & statistics: routes to
- Quiz authoring → Quiz client services: creates quizzes
- Quiz play & result → Quiz client services: plays attempts
- Quiz play & result → Stats client services: submits completion
- Profiles & statistics → Stats client services: loads statistics
- Quiz client services → Resource routes: quiz API
- Stats client services → Resource routes: attempt/stats API
- HTTP server entry → Server builder: starts
- Server builder → API router: mounts
- API router → Resource routes: registers
- Resource routes → Domain managers: delegates
- Domain managers → Domain models: uses
- Domain models → Model base & validation: extends boundary
- Domain models → JSON datasets: reads and writes
- Docker Compose → Nginx frontend: runs
- Docker Compose → HTTP server entry: runs
- Nginx frontend → Angular bootstrap: serves client
- Playwright E2E → Docker Compose: tests composed system