This is a repository about the IOT CUBE a project wich aim to make an autonomous meteorological arduino station with an api a database and a Frontend
The backend is composed by a REST API wich is made with Python3 and Flask
It is splitted in 3 sections :
- Probe
- User
- Data
A test suite is available for the whole API, it is built with the package request and test each endpoint of the api
The users password are encrypted with the pbkdf2_hmac algorythm wich iterate 100k time the sha256 on the password, then both the salt generated by the os and the password are stored in the database, this ensure that nobody can see the password and in case the db is leaked the passwords are safe
A postman suite is built to help test the api during devlopment
1. Deploy the database :
$ mysql -u <username> -p <database_name> < create-database.sql
2. Run the virtual env installation script:
$ sudo chmod 600 install-venv.sh
$ ./install-venv.sh
3. Activate venv, Set venv variables and run the server
$ source venv/bin/activate
$ export FLASK_APP=main
4. Modify the config file with your databases credentials in backend/config.json
{
"host": "localhost",
"user": "root",
"password": "root",
"database": "cube"
}
That's it you now have a working backend api
The Frontend is composed of a simple http server in golang and a bunch of html pages
For convenience the web pages are built around purged bootstrap
1. Build a binary :
$ go build .
2. Run the binary :
$ sudo chmod 600 frontend
$ ./frontend
- Célian HAMON : Backend server in flask, Frontend server in Golang, Raspberry setup and programmation, database, test suite and postman suite, documentation, github workflows
- Clément Lessieur : Frontend and Backend
- Kévin Moraiville : Frontend and Backend