This project is a web application that uses the GitHub REST API for search users.
- Public WebApp URL: https://github-search-f7f52.web.app/
- Tests coverage result: https://github-search-tests-coverage.web.app/
The project has a GitHub Workflow that run the tests, build and deploy to firebase hosting. The CI/CD workflow is executed after every push on branch master
, and after create or update a pull request.
Besides unit and integration tests with Karma, the project also has e2e tests that are accomplished by cypress. Tests results can be viewed at: https://dashboard.cypress.io/projects/17oynf/runs. The configured GitHub Workflow always execute the e2e tests with Cypress, and register the tests results in Cypress Dashboard.
Sorting needed to be executed in frontend code. The reason is because the /search/users
endpoint doesn't support sorting by avatar_url
, login
or type
. By GitHub Docs, the this endpoint only allow sort by number of followers, number of repositories or when the person joined GitHub.
This application was implemented driven by Clean Dart, a Clean Architecture approach idealized by Flutterando Team for help to develop projects with best code quality (Clean Dart Docs).
The Clean Dart proposes four layers for each application domain:
- Presenter: Responsible for implement all UI aspects, from UI basic components to UI state management.
- Domain: Responsible for implement business rules.
- Infra: Responsible for the intermediate the communication between domain and external datasources and drivers.
- External: Responsible for implement the direct communication to datasources and drivers.
For this web application, the architecture was implemented based on diagram below:
Run npm run start
for a dev server. Navigate to http://localhost:4200/
.
Run npm run build
to build the project. The build artifacts will be stored in the dist/
directory.
Run npm run test
to execute the unit tests via Karma. The tests coverage can be found at coverage/github-search/index.html
file.
Run npm run e2e
to execute the end-to-end with Cypress.