I apologize for bloating the title with terms. I have linked everything down below.
What?
The app uses this amazing GraphQL API to fetch the Rick and Morty TV show data. It includes Characters, Episodes and Locations of the show. There is more to it than the basic fetch with pages, but I chose to make the app simple and not the implementation. This is how the app looks
Why?
Many companies nowadays (from startups to enterprises) are adopting flutter and apps can easily become complex when more than one person work on one app. And when that happens, In Martin Fouler's words,
βAny fool can write code that a computer can understand. Good programmers write code that humans can understand.β
With this idea in mind, I wanted to demonstrate how to make a simple app in production grade (where it stands the test of time with multiple developers working on it or over-engineer it :P) and I migrated my code with the following "production level" implementations.
How?
- CI/CD with GitHub Actions
- Githooks to enusre clean commit and push
- Pre commit formats with
flutter format
- Pre push checks the code with
flutter analyze
andflutter test
- Pre commit formats with
- Linting style with Effective Dart
- Test coverage with Codecov
- Dependency Injection with injectable and get_it
- Testing with mockito and bloc_test
You can find more "how" by directly going through the repo.
excogitatr / rick-and-morty-info
Made with Clean architecture + TDD + GraphQL + flutter_bloc + CodeCov + GitHooks + GitHub Actions (CI/CD) and finally with π
What now?
Let's follow the best practices incorporated by unclebob in his books Clean code and Clean architecture and try to build an app that stands the test of time. I have created some good first issue, feel free to make Pull Requests and close the issues. I have even created kanban board in github projects to track the issues. It will be a fun journey for all us.
Who?
- unclebob - For the infamous Clean Architecture)
- resocoder (Followed his style in Clean architecture)
- felangel (For his amazing state management solution)
- Axel Fuhrmann (For the Rick and Morty GraphQL API)
- Authors of all the packages I have used, who made our lives easier.
Top comments (1)
You're a lifesaver π