This project consists of a sleep tracker app with a "family mode". This project was designed along with a NodeJS Back-end application: My Sleep(API).
Requirements:
- Users should be able to view each individual sleep data
- Users should see sleep metrics around each sleep session
- The project must compile in Android and iOS without errors
- No static mock data
Bonus points:
- Animate data visualization
- Unit and/or E2E testing
- Documentation
npm install
npm run android
or
npm run ios
As said before this project was designed to be used along the API project, so you need to run the server in order to see data on the Mobile App. Then you need to create a .env file in the root folder of the project, in order to run it properly. You can follow this example of .env:
EXPO_PUBLIC_API_URL=http://localhost:3000
Script | Description |
---|---|
yarn android |
Run project on android simulator |
yarn ios |
Run project on iOS simulator |
yarn start |
Start metro bundler |
yarn lint |
Run ESlint checks |
yarn lint:fix |
Run ESlint and fix all auto-fixable errors/warnings |
yarn test |
Runs all unit tests |
yarn prepare |
Enable git hooks (Husky integration) |
Feature | Library |
---|---|
Global state management | Zustand |
UI/Components | gluestack |
Navigation | React Navigation |
Charts & circular progress | react-native-skia, and react-native-gifted-charts |
Animations | react-native-reanimated |
Network layer & caching | swr |
Runtime type validation | zod |
Feature | Tool |
---|---|
Unit tests | Jest + @testing-library/react-native |
Request mocking | msw |
Mock data | @faker-js/faker |
Git hooks + linting | ESlint + Husky + lint-staged |
Code formatting | Prettier |