This is a Next.js project bootstrapped with create-next-app.
- Tanstack for caching database query results
- PostgreSQL (with Supabase)
- Tailwindcss for styling
- Supabase functions wie Cronjobs to simulate sensor data and do linear regression to trigger alerts (functions are deployed on server)
- ESP32, industry-standard IoT micro-controller that can connect to the internet
- We use an ESP32 which reads the value of an SGP30 sensor (Humidity, TVOC) and an temperature sensor
- the values are directly inserted into a
measurementstable in our database with a POST request - found in the
hardwaredirectory
- With a database trigger, after each insert of an sensor value we run a function that does linear progression over the last 12 measurement values
- For demonstrating and testing purposes we also added a simulation function which will randomly alter measurement values, since we just had one sensor to test during our 24 hours
- both function can be found in the
supabase/functionsdirectory - In our nextjs app we render the floor and visualize the datapoints in realtime / with a heatmap and display further information that we can provide with our data