healsense
Take medications on time using a powerful medication reminder app. Made with DDD architecture + Drift + Riverpod + Go Router + Rxdart + Service Locator + Freezed finally with 💙
healsense: a Flutter reminder app built on DDD
A medication reminder app in Flutter, organized with DDD and a stack of Drift, Riverpod, Go Router, RxDart, Service Locator, and Freezed. Only the Google Maps API key is closed.
What needs an API key
HealSense is a medication reminder app meant to help people take medications on time. The code is open source except for the Google Maps API key, and because the app is in production, anyone building it has to supply their own key to use the map features. The reminder logic and the map functionality share the same codebase, which is why the key shows up at all.
How the layers are split
The architecture starts from a DDD approach. The first decision recorded is which database to use for storage, on the grounds that the choice may change later, and SOLID principles apply because the project is object oriented. The code is organized into layers, which keeps domain logic clear of database and API details and makes the app easier to maintain and extend.
Inside the domain layer
The domain layer holds core value objects and failures, repository interfaces, and entities. A note says a class typically has one function but can carry more when the functions are related, a convention that keeps the domain organized and testable without getting fussy about it.
The infrastructure side
Infrastructure covers the core data sources, meaning local database storage and remote APIs, plus repository implementations drawn from the domain layer, models, and services. Data access stays behind the domain interfaces, which is the DDD pattern the README walks through.
Editorial conclusion
The app pairs medication reminders with map features, and only the Google Maps key is proprietary. DDD keeps domain logic away from storage and API details, which is the part worth borrowing.
Community notes