This mobile application utilizes the following technologies:
- Flutter (3.24.3)
- Clean Architecture
- Dependency Injection
- Route Management
- State Management
- Data Persistence
- API Communication
The project follows the Clean Architecture principles, with the following directory structure:
data: Handles external communications and data sources (e.g., API).di: Manages dependency injection.domain: Contains business logic and entities.env: Environment configuration and setup.infra: Provides external library implementations.presentation: Contains UI logic and state management.controllers: Manages screen state and actions.
ui: The view layer of the app.
- SOLID: Ensures clean and maintainable code.
- KISS: Keep It Simple, Stupid – for simplicity.
- DRY: Don't Repeat Yourself – for code reusability.
Follow these steps to set up the project:
-
Install Flutter if you haven't already.
-
Ensure you have Flutter 3.24.3 installed.
-
Clone this repository and navigate to the project root.
-
Place
google-services.jsoninandroid/app/ -
Run
flutter pub getto install dependencies. -
Use the following command to run the app with the correct environment configuration:
flutter run --dart-define-from-file=lib/env/.env
You can run unit and integration tests using the following commands:
-
Unit Tests:
flutter test test/ -
Integration Tests:
flutter test --dart-define-from-file=lib/env/.env integration_test/
crypto: ^3.0.5- Used to ensure the security of sensitive data, such as when generating unique identifiers or hashing passwords.
cached_network_image: ^3.4.1- Efficiently handled the loading and caching of images from the Marvel API, improving performance by reducing network requests and providing a smoother user experience.
dio: ^5.7.0- Facilitated making HTTP requests to the Marvel API and handling responses. Its features, such as interceptors and error handling, were instrumental in ensuring reliable data fetching and error management.
get: ^4.6.6- Chosen as the primary state management solution due to its simplicity, performance, and my familiarity with the library. Get offered a streamlined approach to managing application state, navigation, and dependency injection, leading to a more maintainable and scalable codebase.
Firebase Analytics is a valuable tool for gathering user insights. Although native iOS integration was not feasible for this iteration due to hardware constraints, it remains a high priority for future development. We plan to revisit this feature in subsequent releases.