Skip to content

Latest commit

 

History

History
80 lines (55 loc) · 2.04 KB

README.md

File metadata and controls

80 lines (55 loc) · 2.04 KB

Drink water tracker: API for water reminder app

App wireframe:

Alt Text

Requirements:

  • The goal is to build a backend API for a "drink water reminder" app.
  • In this app, users can track how many milliliters (ml) of water they have consumed throughout the day and whether they are within a pre-established daily goal.
  • The daily goal can be set based on the user's weight in kilograms (35ml per KG). For example, if a person weighs 70kg * 35ml => 2450ml per day as the goal.
  • Key screen flows:

  • On Screen 1: Users can register with their name and weight in kilograms.

    Alt Text

  • On Screen 2: Users can see how many ml they have consumed and record that they have consumed a certain amount of water. After recording, they can view the current day's data (how many ml they have consumed, how many ml are left, whether they have reached the daily goal, etc.).

    Alt Text

  • On Screen 3: Users can view the records of the days they have registered in the app over time.

    Alt Text

Microservices architecture

Alt Text


Database entity-relationship diagram

Alt Text


Features

Alt Text

Install dependencies

poetry install --no-root && rm -rf $POETRY_CACHE_DIR

Start application

poetry run uvicorn drink_water_tracker.main:app

Migrations

cd drink_water_tracker/

# under development
# alembic init migrations

# under development
# alembic revision --autogenerate -m "add user table"

# first run
alembic upgrade head

Run tests

pytest
pytest --cov
pytest --cov --cov-report=html:coverage_re

# run especific test
pytest -k test_add_user_uc