| z1 | ||
| README.md | ||
Vigimétéo - Connected Objects Management
Vigimétéo is an innovative web platform dedicated to real-time visualization of meteorological data from connected sensors. This project allows any user to consult updated weather information while providing a complete administration area to manage sensors, users, and categories.
Table of Contents
Description
Vigimétéo is a tool that is both useful and accessible in the face of current climate challenges. Using an architecture combining React for the front-end and Vert.x for the back-end, the system relies on a PostgreSQL database centralizing measurements collected by weather stations. The interface allows for both intuitive consultation for the general public and complete management for administrators via a secured dashboard.
Features
- Consult real-time meteorological data (fake data for now, not yet connected with an API)
- IoT Device Management with the ability to set alerts for extreme data values
- User Management: add, delete, and modify users
- Category Management: manage device types
- Responsive Interface (Mobile & Desktop)
- Secure Authentication with JWT
- Multi-language Support (i18n): Interface available in French and English
Usage (Docker - Cloud Deployment)
This application has been containerized to meet the requirements of the Cloud Computing course (Dev Web Ing1).
Prerequisites
- Required OS: Linux (Ubuntu/Debian) with
dockeranddocker-composeconfigured. - Required Resources: Internet connection to download base Docker images (
nginx,node,maven,eclipse-temurin,postgres).
Services / Containers
The architecture is split into 3 distinct services via docker-compose.yaml:
- vigimeteo_frontend: Image built via a multi-stage
Dockerfile(Node.js to compile the Vite application, then Alpine Nginx to serve static files). This service listens on public port5000. - vigimeteo_backend: Image built via a multi-stage
Dockerfile(Maven to compile the JAR, then JRE 17 for execution). Runs the Vert.x API and communicates on public port8888. - vigimeteo_db: Official
postgres:15-alpineimage.
Virtual Networks and Named Volumes
- Network:
vigimeteo_net(Bridge) allows frontend, backend, and DB containers to communicate securely in isolation from the rest of the system. - Volume: The persistent volume
vigimeteo_datais mounted on the/var/lib/postgresql/datadirectory of the DB container. It ensures data persistence, guaranteeing that weather data and user accounts are not lost when restarting or rebuilding the containers.
Container Configuration
- Environment Variables: The Vert.x backend dynamically reads PostgreSQL credentials (e.g.,
DB_HOST,DB_PASSWORD) provided via environment variables in thedocker-compose.yamlfile. - DB Initialization: The PostgreSQL container automatically synchronizes the
sql/init_db.sqlfile in its/docker-entrypoint-initdb.d/init.sqldirectory for automatic population upon first initialization. - Restart Policy: All containers include the
restart: alwayspolicy to restart automatically in case of failure.
How to Run the Application
- Prepare the application: Run
./prepare-app.sh. This script initiatesdocker-compose buildto create/download the images. - Launch the application: Run
./start-app.sh. Access the web application via your browser athttp://localhost:5000. You can log into the administration interface using the emailadmin.a@gmail.comand passwordazertyuiop. You can also use thecomplexe@gmail.comand passwordazertyuiopto try different role. - Pause the application: Run
./stop-app.sh. This script stops the containers gracefully without resetting their state or destroying the virtual network. - Remove the application: Run
./remove-app.sh. This removes all containers, networks, local images, and named volumes, erasing all traces of the deployed application.
AI Usage (Cloud Computing Course)
- AI Agent used: Google Gemini
- AI's Role:
- Verification and optimization of the DockerCompose file
- Implementation of the English/French internationalization (i18n) system.
- Upgrade of the README for technical and overall the project structure