Skip to content

Latest commit

 

History

History
75 lines (56 loc) · 4.44 KB

README.md

File metadata and controls

75 lines (56 loc) · 4.44 KB

My Sleep (family mode)

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

Installing

npm install

Running

npm run android

or

npm run ios

Setting up the environment (.env)

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

Scripts

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)

Libraries (Relevant choices)

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

Development tooling

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