This repository contains the backend API on Laravel for the BioState application.
BioState is a comprehensive application designed to help you monitor and manage various aspects of your well-being. Currently, it allows you to record your dietary intake, track calories, proteins, fats, and carbohydrates, view insightful statistics, and set personalized limits for these macronutrients. You can also define custom products to easily log your daily meals. While the current focus is on nutrition, BioState is envisioned as a holistic bio-monitoring tool with future capabilities to include tracking sleep and exercise.
- Recording food ration: Log what you eat on a daily basis.
- Macronutrient tracking: Monitor your intake of proteins, fats, and carbohydrates.
- Calorie tracking: Automatically count the total calories of your meals.
- Statistics: View insightful data and trends related to your nutrition.
- Custom limits: Set personalized daily limits for calories and macronutrients.
- Product management: Define custom food products with their nutritional information for quick logging.
Note: For now this backend is designed to work in conjunction with the BioState frontend. Both repositories should be cloned into the same parent directory for the Docker Compose setup to function correctly.
Follow these steps to get the BioState backend running on your local machine using Docker.
-
Create a folder
mkdir biostate cd biostate
-
Clone the Repository
git clone https://github.com/lewenbraun/biostate-backend.git
-
Clone the Frontend Repository
Navigate to the parent directory where you cloned the backend repository and clone the frontend repository:
git clone https://github.com/lewenbraun/biostate-frontend.git
Your directory structure should now look like this:
biostate/ ├── biostate-backend/ └── biostate-frontend/
-
Configure Environment
-
Copy of the sample environment file in the backend and frontend part:
cp .env.example .env
-
Update your
.env
file if necessary (locally everything should work without changes in the copied .env).
-
-
Start Docker Containers
Launch the application using Docker Compose from the
biostate-backend
directory:docker compose up -d
-
Generate Application Key
Generate the Laravel application key:
docker compose exec bs-backend php artisan key:generate
-
Run Migrations
Initialize the database schema with:
docker compose exec bs-backend php artisan migrate
-
Run product seeder (optionally)
Create base products for the test:
docker compose exec bs-backend php artisan db:seed --class=ProductSeeder
Here's a quick glimpse of how the application works:
Contributions, issues, and feature requests are welcome. Please check the issues page for more details.
This project is licensed under the MIT License.