How mdelgadouade/uade-2026-id2_tp works
1. Repository purpose
- This is a small full-stack prototype for an academic NoSQL project.
- The domain appears centered on reports (Report.js, routes/reports.js) and a simple visual frontend for interacting with that data.
2. High-level architecture
- The system is split into three main boundaries:
- Frontend: Vue/Vite single-page app
- Backend: Node.js API service
- Database: MongoDB, with an init script for seed/setup
- The data flow is straightforward: UI → API → MongoDB → API → UI.
3. Frontend subsystem
- Located under frontend/.
- Built with Vue 3 + Vite (App.vue, main.js, vite.config.js).
- The frontend is a lightweight presentation layer; the tree suggests a minimal prototype rather than a large component architecture.
- HelloWorld.vue is present, which usually indicates starter/scaffold code or a simple demo screen.
4. Backend subsystem
- Located under backend/.
- Uses Node.js and is structured as a classic API layer with:
- src/index.js as the application entry point
- src/routes/reports.js for HTTP routing
- src/models/Report.js for the MongoDB data model
- src/config/mongo.js for database connection setup
- This backend is responsible for business logic and persistence access, not UI rendering.
5. API boundary
- The backend likely exposes one main resource family: reports.
- routes/reports.js is the clear boundary between HTTP requests and domain/persistence logic.
- The frontend should consume this API to list, create, or otherwise manage report records.
6. Data layer
- MongoDB is the only persistent datastore visible in the tree.
- The presence of a single model file suggests a compact document schema rather than a multi-entity relational design.
- This fits the README’s NoSQL-focused coursework, where the prototype likely demonstrates why MongoDB is suitable for the dataset being analyzed.
7. Initialization / seeding
- The mongo-init/init.js script indicates database bootstrap logic.
- This is usually used to create initial collections, insert seed data, or configure the database when the container starts.
- For an architecture diagram, this is a separate setup path into MongoDB, distinct from normal runtime traffic.
8. Deployment and runtime packaging
- The repo includes a root Dockerfile, plus separate Dockerfiles for backend and frontend, and a docker-compose.yml.
- This indicates the project is designed to run as containerized services with local orchestration.
- In the diagram, Docker Compose should sit above the service boxes as the deployment coordinator.
9. Technology boundaries that matter
- The frontend and backend are decoupled at the network level, which is important for the diagram: the browser talks to the API, not directly to MongoDB.
- MongoDB is the only data store, so there is no separate cache, message broker, or SQL database in the visible architecture.
- No auth, background workers, or third-party integrations are evident from the tree.
10. Likely functional shape of the prototype
- The application seems to be a focused CRUD-style prototype around report data, likely used to demonstrate dataset handling and value-added analysis for the TP.
- Based on the README, the project is meant to support an academic/business narrative around NoSQL, data exploitation, and a prototype of the proposed solution.
11. How to draw the architecture diagram
- Show three main boxes: Vue frontend, Node/Express backend, and MongoDB.
- Connect frontend to backend with HTTP/REST.
- Connect backend to MongoDB through the Mongo connection module.
- Add a separate Mongo init/seed path to the database.
- Place Docker Compose / Dockerfiles around the system as the packaging and deployment layer.
Main entry points: reports.js Report routes · docker-compose.yml Compose · App.vue Vue app · mongo.js Mongo config
Components 13
Deployment
Container packaging and orchestration
- Compose · Starts and wires the containerized services
docker-compose.yml - Root image · Top-level container build for the project
Dockerfile - UI image · Frontend container build definition
frontend/Dockerfile - API image · Backend container build definition
backend/Dockerfile
Frontend
Vue single-page client
- Vue app · Main frontend application shell
frontend/src/App.vue - Main entry · Mounts the Vue app into the browser DOM
frontend/src/main.js - Starter widget · Scaffold component present in the client
frontend/src/components/HelloWorld.vue
Backend
Node API and data access
- API entry · Starts the Node service
backend/src/index.js - Report routes · HTTP boundary for report operations
backend/src/routes/reports.js - Report model · MongoDB document shape for reports
backend/src/models/Report.js - Mongo config · Creates and manages the Mongo connection
backend/src/config/mongo.js
Data
MongoDB runtime and bootstrap
- MongoDB · Primary persistent datastore
- Init script · Seeds or prepares the database at startup
mongo-init/init.js
Connections 15
- Compose → UI image: builds · Compose uses the frontend image build
- Compose → API image: builds · Compose uses the backend image build
- Compose → MongoDB: starts · Compose orchestrates the database container
- Root image → API image: packages · Top-level build supports service packaging
- Root image → UI image: packages · Top-level build supports service packaging
- Main entry → Vue app: mounts · Browser bootstrap renders the Vue app
- Vue app → Starter widget: uses · The app includes the starter component
- Vue app → Report routes: HTTP/REST · Frontend consumes report endpoints
- API entry → Report routes: registers · Server bootstraps the HTTP routes
- Report routes → Report model: uses · Routes operate on the report document model
- Report routes → Mongo config: queries · Routes depend on the Mongo connection layer
- Mongo config → MongoDB: connects · Database connection targets MongoDB
- Report model → MongoDB: persists · Report documents are stored in MongoDB
- Init script → MongoDB: seeds · Initialization script prepares the database
- API entry → Mongo config: loads · Service startup wires database access