This repository contains the source code for a Daily Diet application. The application allows users to track their meals, including whether they are within or outside of their diet. It also provides metrics on the user's dietary habits.
- set in .env DB_TYPE variable as sqlite
DB_TYPE=sqlite
- follow docker process
- set in .env DB_TYPE variable as pg
DB_TYPE=pg
- Docker installed on your machine
bash docker build -t daily-diet-app .
- Open a terminal in the root directory of your project.
- Run the following command to build the Docker image:
This command builds a Docker image named daily-diet-app
from the Dockerfile in the current directory.
- After building the image, run the following command to start a Docker container:
bash docker start daily-diet-app
- It should be possible to create a user
- It should be possible to identify the user between requests
- It should be possible to register a meal made, with the following information:
The meals must be related to a user
-
Name
-
Description
-
Date and Time
-
Whether it is within or not the diet
-
It should be possible to edit a meal, being able to change all the data above
-
It should be possible to delete a meal
-
It should be possible to list all the meals of a user
-
It should be possible to view a single meal
-
It should be possible to retrieve the metrics of a user
-
Total number of meals registered
-
Total number of meals within the diet
-
Total number of meals outside the diet
-
Best sequence of meals within the diet
-
The user can only view, edit, and delete the meals they created
-
It should be possible to create another session/login with an existing user