Weather monitor allows users to track weather conditions using weather station(s).
Python + Strawberry + FastAPI
GraphQL - used for all UI integrations -> flexibility in requests
Rest - for weather station API (probably could be replaced by some kind of queue)
The application is trying to monitor weather condition in time > timeseries db. Timescaledb because it uses standard SQL and can store relation data with time series data as well.
N/A; Potentially could be used Redis for basic station data (ie. location)
Examples of requests are in /utils folder
Allows public access to weather data & station data.
Each weather station has API key assigned. This key is used for authentication. This API allows weather stations store real time weather conditions.
This is used for basic management of weather station - create/update/delete.
User is authenticated via token {"Authorize": "Bearer <username>"}
.
Users can add/update/delete weather station, limited by 'created by' - user can update/delete only own weather stations.
1, docker-compose - web service starts before db service is ready (causes fails)
2, whole authentication is a poor imitation of secure solution (plain text passwords in db, username instead of hashed tokens)
3, user authentication crashes whole app, works in dev probably only because --reload
restarts server
4, mutations could probably be simplified (probably one of two db queries is unnecessary)
5, some lack of code quality - ie. inconsistency of meteostation vs weather station naming
6, mypy/flake8 errors
7, lack of any automated tests