Skip to content

The parts of the project

The code lives in folders. Each folder has one job. Here is a map so you know where to look.

Folder What it holds
agent/ The program that runs on the controller (the edge agent).
backend/ The cloud server and the database setup.
web/ The operator dashboard (a Next.js app).
marketing/ The public website (built with Astro).
infra/ Files that help run RISER on real servers.
docs/ Notes for the team, like runbooks and the API list.
developer-docs/ This guide you are reading now.
scripts/ Small helper programs (backups, load tests, the demo).

The agent is split into small parts. Each part does one thing:

  • io/ — talks to the sensors and the relay. The simulator lives here too.
  • control/ — the brain. It decides when to fire the boiler. It also holds the safety checks.
  • watchdog/ — a timer that forces safety if the program freezes.
  • storage/ — saves telemetry on the controller when the internet is down.
  • telemetry/ — sends saved telemetry to the cloud.
  • commands/ — listens for commands from the cloud and checks if they are safe.
  • service/ — starts everything up and shuts it down cleanly.

The backend is also split up:

  • api/ — the web addresses (endpoints) that programs can call.
  • db/ — the database tables and the steps to build them (migrations).
  • core/ — shared helpers: settings, logins, logging, limits.
  • services/ — bigger jobs like alerts, billing, and integrations.

Almost every part has tests next to it, in a tests/ folder. Tests are small programs that check the real code. When you change something, run the tests. If they still pass, you probably did not break anything. The most important tests are the safety tests in agent/tests/safety/. Never turn those off.