Tech stack
The technologies that make MacroMath work, layer by layer.
A summary of the technologies used, with the architecture decisions behind them.
Framework and language
| Layer | Technology |
|---|---|
| App | Flutter · Dart 3.9.x (^3.9.2) |
| State management | flutter_bloc (BLoC / Cubit) + equatable |
| Dependency injection | get_it |
| Navigation | go_router |
| Networking | dio ^5.9 · supabase_flutter ^2.8 |
| Local cache | Hive (NoSQL key-value) |
| Charts | fl_chart |
Flutter compiles native code for Android and iOS from a single codebase, with Hot Reload and Dart's sound null safety reducing runtime errors.
Backend — Supabase
The entire backend rests on Supabase (an open-source BaaS over PostgreSQL), adopted in place of a standalone PostgreSQL:
- PostgreSQL — relational database.
- Auth — authentication (with email 2FA / OTP).
- Storage — files and images (avatars).
- Edge Functions — server-side logic (e.g., encapsulating FatSecret's OAuth).
- Row-Level Security — per-user isolation.
This choice eliminated the need to maintain dedicated server infrastructure.
Artificial intelligence
- Google Gemini 2.5 Flash — a multimodal model (text + vision), adopted in place of OpenAI/ChatGPT for its low latency, competitive cost and native support for JSON mode with schemas (Structured Outputs).
→ Details in AI and automation.
Food data
A hybrid three-source architecture — a Portuguese local database, FatSecret and Open Food Facts. See Food sources.
Libraries and device services
| Library | Use |
|---|---|
mobile_scanner | Omnidirectional barcode scanning. |
google_mlkit_text_recognition | OCR of shopping receipts. |
local_auth | Biometrics (Face ID / Touch ID / fingerprint). |
flutter_local_notifications + timezone | Timezone-aware local reminders. |
image_picker, crop_your_image, image | Image capture and cropping. |
mailer | Sending OTP over SMTP. |
dio / http | HTTP clients for the external APIs. |
pdf, share_plus, url_launcher | Reports, sharing and links. |
Web surfaces
Two separate web projects sit alongside the app, both statically generated for fast loads and cheap hosting:
- Marketing site (
macromath.app) — Astro (static), trilingual PT/EN/ES. See Website overview. - This documentation — Next.js + Fumadocs (MDX), bilingual EN/PT.
Development tools
VS Code, Android Studio, Git/GitHub, Figma and Supabase Studio. Building iOS IPAs is automated with GitHub Actions.