A mobile app that queries a GitHub user information. It may be used as a basic project scaffold as it includes:
- A theme based color palette, using styled-compoenents.
- A typography component to assure consistence on texts through the app.
- Folder structure architecture.
- Jest with React-Native-Testing-Library configured.
- ESLint & Stylelint configured (with styled-components).
- A basic react-navigation.
- React Native
- Octokit
- Graphql
- Styled-Components
- Jest
- React-Native-Testing-Library
- Create GitHub Personal Access Token. Click here to see how to create one.
- Make sure you select the following scopes:
read:org,read:repo_hook,read:user
.
- Make sure you select the following scopes:
- Create a
.env
file at the root directory as below:GITHUB_PERSONAL_TOKEN=<YOUR_PERSONAL_TOKEN_HERE>
Go to the project root folder and head to src/Presentation.Api subfolder and run: At the root folder, run:
> cd ios && pod install && cd ..
> yarn ios
Check Possible Improvements section about android!
yarn android
This will start the metro process, and the simulator by default.
On the main screen, type into the only one field at the screen a GitHub username of your choice, and press the Search button. Check the below video out:
To test, run:
yarn test
To run linters (eslint & stylelint), run:
yarn lint
Git commits will trigger a git hook that run jest, eslint and stylelint. To avoid validation, add --no-verify
to your commit command.
- As an active user (the user who adds the personal token access), it's possible to see the private repositories. Must be better to omit them.
- A not trimmed username string on the search screen, may cause a user not found error.
- A light github theme may be welcome.
- Font scaling is also missed on that project.
- Some typos like pallete.js file name,
spacers
to be renamed tosizes
.
- Typography deserves more tests for each variant it delivers.
- Styled-components styles have being tested on a
try hard
method. Jest-styled-components lib are presenting bugs on its use with the project. ANDROID
wasn't tested. I've tried to do my best here, but the time was gone.
Check the Closed PRs to have an idea on how the project was built.