Read this in other languages: Français.
This project is an IoT module monitoring system developed with Symfony. It allows you to track the operating status of modules, view the measured values, and display this information visually.
- Creation of IoT Modules: Add new modules via a form.
- Module Monitoring: View the current operating status, uptime, number of data points sent, and measured values.
- Tracking Graphs: Track the evolution of measured values using graphs.
- Notifications: Receive visual notifications in case of module malfunctions.
- Module Simulation: Automatically simulate the states and values of modules with a Symfony command.
make
commands are available to simplify installation and setup:
-
Clone the repository:
git clone https://github.com/PicassoHouessou/iot cd iot
-
Complete Installation: Run the following command to install all dependencies (Composer and pnpm) and generate the database:
make first-install
This command will set everything up. Open your web browser and navigate to https://localhost:8000. Please use localhost instead of 127.0.0.1.
-
Start the notification server:
We use Docker to install the instant notification server. To start the Mercure server, run:
docker-compose up --build
-
Database Generation: If you have already installed the dependencies and only want to generate the database, run the following command. By default, you don't need to run this command because SQLite is used for the database and the file is already provided:
make data
git clone https://github.com/PicassoHouessou/iot
cd iot
composer install
pnpm install
For the development environment, run:
pnpm run dev-server
For the production environment, run:
pnpm run build
By default, you don't need to configure anything because SQLite is used for the database. If you want to use MySQL, do the following:
Copy the .env
file and adjust the configuration parameters (database, etc.):
cp .env .env.local
Modify .env.local
as needed.
php bin/console doctrine:database:drop # Delete the database
php bin/console doctrine:database:create # Create the database
php bin/console doctrine:migrations:migrate # Run the migration
php bin/console hautelook:fixtures:load --no-interaction # Generate the fixtures
symfony server:start
Please use localhost instead of 127.0.0.1. Eg: https://localhost:8000
We use Docker to install the instant notification server. To start the Mercure notification server, run:
docker-compose up --build
This command will build and start the Docker containers, including the Mercure server, accessible at http://localhost:3000.
To simulate the values and statuses of the modules, run the following command:
php bin/console app:module:simulate
You can automate this command with a cron job for periodic execution.
- Access the web interface via the URL provided by the Symfony server.
- Use the form to add new modules.
- View the status and values of the modules on the monitoring page.
- Receive notifications in case of module malfunctions.
- Backend: PHP 8, Symfony 7, Doctrine ORM
- Frontend: HTML, CSS, TypeScript, JavaScript, Bootstrap, Antd, React
- Database: SQLite
- Development Tools: Composer, pnpm, Faker
Contributions are welcome! Please submit a pull request for any feature or improvement.
This project is licensed under the NPOSL-3.0 License. See the LICENSE file for details.
For any inquiries or support, please contact Picasso Houessou.