Overview#
Frontend Structure#
The Flutter frontend is organised using a modular structure inside the lib/ directory. Screens, services,
widgets, and utility files are separated to improve maintainability, readability, and scalability.
- ::
lib/ ├── main.dart ├── screens/ ├── services/ ├── utils/ └── widgets/
Main Directories#
main.dart Applications entry point. Initializes Flutter and launches the main app widgets.
screens/ Contains all user-facing pages used throughout the application.
services/ Handles backend API communication, HTTP requests, and business logic.
utils/ Contains helper methods, constants, and reusable utility functions.
widgets/ Reusable custom UI components shared across multiple screens.
Screens#
Authentication Screens#
login_page.dart– User login screenregister.dart– User registration screen
Core Screens#
dashboard.dart– Main dashboard and pet overviewadd_pet.dart– Add a new petpetinfo.dart– View pet detailsedit_profile.dart– Edit user profile
Health & Scheduling#
feeding_schedule.dart– Manage feeding planshealth_records.dart– Record health entriesmetrics.dart– View tracked health metricsnotifications.dart– View reminders and alerts
Reports & Activity#
report.dart– Generate reportsreport_history.dart– View report historyrecentlylogged.dart– Recently logged activityvet_contacts.dart– Veterinarian contacts
Architecture Notes#
The frontend follows a screen-based architecture where each page is separated into individual Dart files. Shared logic is placed in services, while reusable UI elements are stored in widgets.
This approach improves code reuse and keeps the project clean and organised.