How eseo-bigdata/bigdata_projet works
Main Components
• Front-end Application:
• “frontend” folder with its assets (HTML, CSS in main.css, JavaScript logic in index.js, and the various pages like About, BornesMap, Home, and Statistiques).
• That the front-end is responsible for interactive visualizations (using Leaflet for the map, Chart.js, or D3.js for charts, etc.) and communicates with the back-end via API calls.
• Back-end Server:
• “src” directory as a Node.js/Express application.
• Sub-components inside:
• Controllers (e.g., bornesController.js, nbVehiculesRegionController.js, etc.) — these handle data processing and business logic.
• Models (e.g., BorneElectrique.js, Region.js, etc.) — show that these are Mongoose schemas defining MongoDB collections.
• Routes (organized in the “src/routes” folder) — these define the API endpoints and map incoming requests to the controllers.
• Database Connector (the “src/db/connexion.js”) — responsible for establishing the connection with the MongoDB Atlas instance.
• Utilities such as the responseFormatter — these manage consistent formatting of API responses.
• Database:
• External MongoDB Atlas instance that stores the seven main collections (BornesElectriques, NbVehiculesParRegion, Region, NbVehiculesParCommune, DepartementEtRegion, BornesCommuneDepartementRegion, and PointsdeCharge).
Relationships and Data Flow
• From the Back-end “Routes” layer, indicate that requests are forwarded to the appropriate “Controller”, which then leverages a specific “Model” to query or update the MongoDB database.
• If applicable, note any middleware (e.g., express.json, cors, dotenv for env variables) that processes HTTP requests before they reach controllers.
Architectural Patterns and Design Principles
• MVC (Model-View-Controller) pattern inherent in the back-end:
• MVC is reflected in the clear separation between “controllers”, “models”, and “routes”.
• Modular and maintainable design through the organization of concerns (API endpoints, business logic, database abstraction).
• Loose coupling between the client and server, as the front-end consumes REST API endpoints.
Relevant Technologies and Frameworks
• Front-end:
• HTML/CSS/JavaScript (vanilla or lightweight frameworks). Mention use of webpack (frontend/webpack.config.js), as well as libraries such as Leaflet for maps and Chart.js or D3.js for analytics.
• Back-end:
• Node.js and Express for building the server.
• Mongoose for MongoDB object modeling.
• dotenv for managing environment variables.
• Database:
• MongoDB Atlas, with its seven well-structured collections for different datasets.
Additional Details
• Keep in mind the deployment target is localhost for now; you might illustrate that this system is currently in a local/testing environment which could be extended later.