BiteRight is a nutrition and activity tracking application designed for individuals looking to monitor their dietary habits and physical performance. It provides tools for logging daily food and water intake, managing nutritional goals, and tracking exercise data to support a balanced lifestyle.
- Nutritional Tracking: Log meals to calculate daily calorie and macronutrient (protein, carbohydrates, fats) intake
- Goal Management: Set and update personal targets for calories, macronutrients, and water consumption
- Activity Logging: Record physical exercises to track estimated calories burned
- Progress Analytics: Monitor weight history and review performance
Modern landing page
|
Onboarding process
|
BiteRight uses a containerized architecture with a Spring Boot REST API and a Next.js frontend, run using Docker and served through an Nginx reverse proxy.
- Security & Authorization: Uses a stateless security model with Spring Security and JSON Web Tokens (JWT). A custom
JwtFilterchecks bearer tokens against the user database for secure, token-based sessions without server-side storage. - Email Service: Uses SMTP via JavaMailSender for sending automated emails (registration, password recovery). It uses HTML templates and a dedicated service layer.
- Persistence Layer: Built on Spring Data JPA with a MySQL database. It uses audit tables for weight and limit history to keep data consistent across the system.
- Structure: Built with the Next.js App Router (React Server Components). It uses nested layouts to keep dashboard modules (meals, exercises, progress) separate and fast.
- Data Management: Uses a central API layer to talk to the backend. It manages state transitions with React hooks and service modules to keep data in sync across the frontend.
- Docker: Managed by Docker Compose, with multi-stage builds for both the Spring Boot JAR and the Next.js production files.
- Reverse Proxy: Nginx handles request routing, static files, and CORS settings, acting as the main entry point for the application.
The system relies on a relational database (MySQL) designed with 18 tables to manage user profiles, nutrition data, and historical records.
- Triggers & Automation: Database functions handle automatic BMI calculation, calorie burns, and history archiving to keep data synchronized.
- Optimized Views: SQL views (like
daily_summary) aggregate complex data from multiple sources (meals, water, exercises) to simplify backend operations. - Consistency: Strong relational constraints ensure data integrity across ingredients, recipes, and user logs.
Getting started with BiteRight is simple and straightforward. Follow these steps to get the application running on your local machine in just a few minutes.
Make sure you have Docker and Docker Compose installed on your machine.
First, download the project source code to your local machine:
git clone https://github.com/hbiegacz/BiteRight.git
cd BiteRight
# Copy the example environment file and fill in the values
cp .env.example .env
docker-compose up --buildStop and clean the environment:
docker compose down -vThanks for reading this far!

