This repository contains the software for Turty, an AI‑powered air‑quality guardian designed to run on a Raspberry Pi 4B with a 7" touch display and the Inland 37‑sensor kit.
This project follows the PRD in Turty.txt and the UI design prototype in ui.txt. The current version focuses on:
- Flask backend with JSON APIs
- Dashboard UI that matches the pixel‑style design
- Simulated sensor data (for local development) behind the same data structures that will later be fed by real hardware
cd Turty
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
python app.pyThen open http://localhost:5000 in your browser.
On non‑Raspberry‑Pi machines some hardware‑specific packages (like
RPi.GPIO) may not install. For local UI/backend development you can comment those out inrequirements.txtor install only the core web packages:pip install flask flask-socketio eventlet
On a Pi 4B with Raspberry Pi OS:
-
Follow the Installation & Deployment instructions in
Turty.txtfor OS setup. -
Clone or copy this folder to
~/turty. -
Create and activate a virtual environment and install requirements:
cd ~/turty python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
-
Start the app:
python app.py
-
Point Chromium (or the official touch display kiosk browser) at:
http://localhost:5000
Systemd and kiosk autostart service files can be wired up exactly as described in the PRD once the app is deployed to the Pi.
The final target structure (from the PRD) looks like:
app.py— Flask entry point, routes, (later) Socket.IOconfig.py— thresholds, GPIO pins, sensor intervalshardware/— sensor manager, GPIO helpers, camera integrationai/— prediction and recommendation modulesdata/— SQLite helpers and logstemplates/— Jinja2 HTML templates (dashboard.html,camera.html,trends.html,settings.html)static/— CSS, JavaScript, and Turty pixel SVG assets
In this initial commit only a subset is fully implemented; modules are stubbed where appropriate so you can incrementally replace simulation logic with real hardware and models.