Auroq
Own product · Closed beta in preparation
- 15 connected services
- Telegram bot and web app
- 5,821 backend tests
Architecture, scope and technology Less
Auroq is not an automation project in the narrow sense, but technically it has the same requirements as automation in a company: it depends on many external services that can fail, processes documents and speech as input, stores sensitive data and runs without constant supervision.
It can be used through a Telegram bot or an installable web app (PWA). Both access the same data layer, so the data is in the same state everywhere.
Auroq started out as a daily planner. It now records data in 18 areas, which all feed into a shared analysis.
Architecture
One data layer for bot, API and web app
Telegram bot, REST API and PWA use the same data layer and the same business logic, so I only have to implement a new feature once. Calculations that exist in both the bot and the web app are checked with the same test cases, so that both always return the same result.
Uniform error handling for 15 external services
Microsoft Graph, Google Calendar, Todoist, Oura, Withings, Apple Health and nine other services are connected through a shared integration layer. Timeouts, expired tokens and outages are handled there in a uniform way. If a service goes down, the app shows a clear message and otherwise keeps working.
Field-level encryption
Personal content is stored encrypted field by field (Fernet). The key is held only in memory and has to be entered again after every restart. Only values the database has to calculate with or filter on stay unencrypted, that is numbers, dates and IDs. The downside is that encrypted fields cannot be searched with SQL.
Natural-language input
A free-text message is split into up to five actions in a single model call. These are executed through the same functions as the fixed bot commands. Voice messages are transcribed with Whisper first, and photos of meals are analysed by an image model. If the model cannot clearly interpret an input, the bot asks instead of guessing.
Offline use
The web app can also be opened without an internet connection. For this, the service worker caches only the daily view. Analyses and notes are not cached on the device. Three kinds of entry are queued offline and synced as soon as a connection is available again. All other actions show an error message straight away, so that no entry is lost unnoticed.
Separate data per user
Every user has their own database, their own tokens and their own scheduled jobs. In addition, a test scans the source code for database queries without a user reference and fails as soon as their number rises.
Scope
I develop Auroq largely on my own. Without this test coverage I could not change anything in a system of this size without breaking something elsewhere.
Safeguards
A test run from Auroq. The same tests run automatically in the CI pipeline (GitHub Actions) on every push.
Technology
- Backend
- Python 3.12 · FastAPI · SQLite (WAL) · APScheduler · Fernet
- Frontend
- React · TypeScript · Vite · Tailwind · Service Worker, Web Push
- AI
- Groq and OpenAI-compatible providers behind an abstraction layer · Whisper · image analysis
- Operations
- systemd on my own server · GitHub Actions on every push · nightly backup