FitLife Pro is a comprehensive, full-stack fitness tracking application designed to help users achieve their health goals through AI-powered coaching, detailed analytics, and gamification.
Built with a modern React frontend and a robust Spring Boot backend, it leverages Google's Gemini AI to provide personalized fitness advice. The application is fully containerized with Docker and ready for deployment on Kubernetes.
- 🤖 AI Personal Coach: Chat with an intelligent AI assistant (powered by Google Gemini) for personalized workout plans, nutrition advice, and motivation.
- 📊 Interactive Dashboard: Visualize your progress with dynamic charts for steps, calories, sleep, and macro breakdown.
- 🏋️♂️ Workout Logger: Log workouts easily using quick templates or custom entries. Track sets, reps, and intensity.
- 🥗 Diet & Macro Tracker: Monitor your daily caloric intake and macronutrient distribution (Carbs, Protein, Fats).
- 💧 Hydration Tracker: Keep track of your daily water intake with a visual progress bar.
- 🎮 Gamification: Level up your fitness journey! Earn XP, unlock badges, and maintain streaks to stay motivated.
- 🔐 Secure Authentication: Fully secure user registration and login system using JWT (JSON Web Tokens) and Role-Based Access Control (RBAC).
graph TD
User["👤 User"] -->|Interacts| Client["💻 Frontend (React + Vite)"]
Client -->|REST API Requests| Server["⚙️ Backend (Spring Boot)"]
subgraph Backend Services
Server -->|Auth & Data| DB[("🗄️ MySQL Database")]
Server -->|AI Coaching| AI["🧠 Google Gemini API"]
end
subgraph Infrastructure
Docker["🐳 Docker Containers"]
K8s["☸️ Kubernetes Cluster"]
end
Client -.-> Docker
Server -.-> Docker
DB -.-> Docker
- Framework: React (Vite)
- Styling: Tailwind CSS, Framer Motion (Animations)
- Charts: Recharts
- Icons: Lucide React
- Framework: Java Spring Boot 3.2
- Database: MySQL 8.0 (JPA/Hibernate)
- Security: Spring Security, JWT
- AI Integration: Google Gemini API (gemini-2.5-flash-lite)
- Build Tool: Maven
- Containerization: Docker & Docker Compose
- Orchestration: Kubernetes (K8s)
- Automation: Ansible
- CI/CD: GitHub Actions & Jenkins
- Docker Desktop (with Kubernetes enabled)
- Java 17+ (optional, for local dev)
- Node.js 18+ (optional, for local dev)
The easiest way to run the entire stack (Frontend + Backend + MySQL).
-
Clone the repository:
git clone https://github.com/25Rohit25/FitLife.git cd FitLife/FitLifePro -
Setup Environment Variables: Copy
.env.exampleto.envand add your Gemini API Key.cp .env.example .env # Edit .env and set GEMINI_API_KEY=your_key_here -
Run with Docker Compose:
docker-compose up --build
-
Access the app:
- Frontend: ://localhost
- Backend API: http://localhost:5000
- Database:
localhost:3307(User:root, Pass:root)
Deploy the application to a local Kubernetes cluster (e.g., Minikube or Docker Desktop). http
-
Apply Manifests:
kubectl apply -f k8s/
-
Access the app:
- Frontend: http://localhost:30000
Run the backend and frontend separately for development.
-
Start Database (Docker):
docker-compose up -d mysql
-
Start Backend (Spring Boot):
cd server-java mvn spring-boot:run -
Start Frontend (React):
cd client npm run dev -
Access the app:
- Frontend: http://localhost:5173
FitLifePro/
├── client/ # React Frontend
│ ├── src/
│ │ ├── components/ # UI Components
│ │ ├── context/ # React Context
│ │ └── ...
│ └── Dockerfile
│
├── server-java/ # Spring Boot Backend
│ ├── src/main/java/com/fitlifepro/
│ │ ├── controller/ # REST Controllers
│ │ ├── model/ # JPA Entities (MySQL)
│ │ ├── repository/ # JPA Repositories
│ │ └── security/ # JWT Auth
│ └── Dockerfile
│
├── k8s/ # Kubernetes Manifests
├── ansible/ # Ansible Deployment Playbook
├── docker-compose.yml # Docker orchestration
├── Jenkinsfile # Jenkins CI/CD Pipeline
└── .github/workflows/ # GitHub Actions CI/CD
This project includes fully configured CI/CD pipelines:
- GitHub Actions: Automatically builds and pushes Docker images to Docker Hub on every push to
main. - Jenkins: A declarative pipeline for self-hosted CI environments, supporting Docker-based builds.
Rohit - Full Stack Developer
Built with ❤️ and code.