A modern and feature-rich contact management application built using Flutter. This app allows users to manage their contacts with ease, leveraging a robust architecture and seamless integration of persistent storage and API services.
-
Comprehensive Contact Management 👨🏻💼
- Add, view, edit, delete, and favorite contacts.
- Support for dynamic loading of contacts.
-
Interactive User Interface 📱
- Built with responsive Flutter widgets such as
ListView
andSlidable
. - Offers interactive features like swipe actions and floating action buttons.
- Built with responsive Flutter widgets such as
-
State Management 🔄
- Implements the BLoC (Business Logic Component) pattern for efficient state and event handling.
- Supports asynchronous operations for fetching, updating, and saving contact data.
-
Persistent Storage 💾
- Local storage functionality ensures offline usability.
- Stores user preferences like favorited contacts.
-
API Integration 🌍
- Provides functionality to fetch, update, add, and delete contacts from an external API.
-
Error Handling ❗️
- Displays user-friendly error messages for network issues and other unexpected errors.
Ensure you have the following installed on your development machine:
- Flutter SDK
- A code editor such as Visual Studio Code or Android Studio
- Git
-
Clone the repository:
git clone https://github.com/mamadfrhi/ContactManager.git cd contact-manager
-
Install dependencies:
flutter pub get
-
Run the app:
flutter run
The application is built using a clean and modular architecture, adhering to best practices for scalability and maintainability:
-
BLoC Pattern:
- Manages the state and business logic of the app.
- Ensures a clear separation of concerns between UI and backend logic.
-
Modular Design:
- Components such as storage, API services, and UI widgets are decoupled for reusability.
-
Error Handling:
- Implements custom error states to provide clear feedback to users.
The current architecture follows a layered design with UI Layer, Business Logic Layer (BLoC), and Data Layer. It adheres to clean code principles but can be further improved for scalability and flexibility.
To adhere strictly to SOLID principles and Clean Architecture, interfaces have been introduced for all key components. This ensures better abstraction, testability, and separation of concerns.
By introducing interfaces, the architecture achieves:
- Loose Coupling: Improved flexibility for unit testing and swapping components.
- SOLID Principles: Better adherence to Dependency Inversion (D) and Interface Segregation (I).
- Clean Code: Components are modular, reusable, and easier to maintain.
We recommend transitioning to the suggested architecture for future versions of the app.
-
Contact List:
- Displays all contacts with options to mark as favorite or delete.
- Supports pagination and dynamic loading for larger datasets.
-
Contact Details:
- View detailed information about a contact.
- Options to edit or delete directly from the details page.
-
Add/Edit Contact:
- Forms for creating or updating contact information.
-
Favorites Management:
- Easily access and manage favorite contacts.
-
Persistent Storage:
- Offline storage ensures data availability even without an internet connection.
-
API Service:
- Provides seamless synchronization with remote APIs for contact management.
📧📧📧 For questions or suggestions, feel free to reach out at mamad.frhi@gmail.com.