Welcome to the GitHub Repository Viewer! This mobile application, built with Flutter, leverages the GitHub API to fetch repositories and issues for selected repositories. It serves as a comprehensive example of utilizing cubits with pagination to efficiently load and manage issues. This project highlights Flutter's capabilities and demonstrates best practices in state management and architectural patterns using 4-layers and monorepo approaches.
- 📄 GitHub Issues Pagination: Efficiently load and display issues with pagination.
- 🎨 Cool Animations: Enhance user experience with animations using:
- 🧱 State Management:
- ❄️ Code Generation:
- 💉 Dependency Injection:
- 🚀 Routing:
- 🧪 Testing:
This project employs a monorepo structure managed by Melos, which ensures a clean and modular codebase.
-
Activate Melos:
dart pub global activate melos
-
Get dependencies:
melos bootstrap
-
Generate Files:
melos generate
-
Run the App:
flutter run --dart-define=GITHUB_API_TOKEN=your_github_token
The project is organized as a monorepo, which is essential for maintaining a clear separation of concerns and a clean architecture as the project scales. By using multiple local packages, we establish clear boundaries between independent components of the codebase.
All packages are located inside the packages/ folder:
- common: Contains shared utilities and should not depend on any other local packages.
- http_repository and go_router_navigator: rovide specific implementations and are injected using injectable and get_it. These packages should not be depended upon by other packages.
To visualize the project's dependencies, refer to the following dependency graph:
To ensure package dependency constraints are maintained, utilize this: packages-verifier.
This application is designed to be independent of any navigation package. Although go_router is used for navigation, the codebase does not directly depend on it due to the navigator abstraction layer. This layer defines interfaces and route contracts fulfilled by the go_router_navigator package. Given that go_router is injected, thorough testing is necessary to prevent runtime errors.
Implements named routes with type-safe parameters, ensuring robust and maintainable navigation throughout the app.
Unit tests for the blocs are conducted using the bloc_test package. To execute all tests, use Melos:
melos testIntegration tests are set up with the patrol package, currently configured for iOS.

To run integration tests on a simulator:
-
Activate Patrol CLI:
dart pub global activate patrol_cli
-
Run Tests:
patrol test -t integration_test/app_test.dart
For more information, visit the Patrol documentation.
- The textfield occasionally becomes unresponsive when returning from the repository details screen.
- Titles that span two lines in the repository search screen may overflow when transitioning back from the repository details screen due to different padding, leading to layout issues.
Thank you for exploring the GitHub Repository Viewer! I hope this project demonstrates the effective use of Flutter and its ecosystem. Happy coding! 🚀


