Your complete fitness journey companion built with the MERN stack.
FitProgressr is a powerful, open-source fitness logging application that helps you track workouts, visualize progress, and stay motivated. Built with modern web technologies and designed for fitness enthusiasts of all levels.
- π Exercise Logging: Track unlimited exercises with reps, sets, and weight
- ποΈ Activity Heatmap: Visual calendar showing your workout consistency
- π Progress Analytics: Charts and statistics to monitor your fitness journey
- πͺ Workout Routines: Create and manage custom workout plans
- π¬ Daily Motivation: Inspirational fitness quotes to keep you going
- π€ User Profiles: Personalized dashboard with your fitness data
- π Modern UI: Clean, responsive design with Material-UI components
- π Secure Authentication: JWT-based user authentication and authorization
- π± Mobile Responsive: Works seamlessly on desktop, tablet, and mobile
- π³ Docker Ready: One-command setup with Docker Compose
- Node.js 18.0.0 or higher
- npm 9.0.0 or higher
- MongoDB Atlas account (or local MongoDB)
- Docker & Docker Compose (optional, for containerized setup)
Get the entire application running in seconds:
# Clone the repository
git clone https://github.com/narainkarthikv/fitprogressr.git
cd FitProgressr
# Configure environment variables
cp .env.example .env
# Edit .env with your MongoDB URI and API keys
# Start all services
docker-compose up -d --build
# View logs
docker-compose logs -fAccess the application:
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
- Health Check: http://localhost:5000/api/health
Deployments:
- Production: https://fitprogressr.netlify.app/
- Development: https://fitprogressr-dev.vercel.app/
Useful Docker Commands:
# View running containers
docker-compose ps
# View logs for specific service
docker-compose logs -f backend
docker-compose logs -f frontend
# Stop services
docker-compose stop
# Remove services and volumes
docker-compose down -v
# Rebuild images
docker-compose build --no-cache
# Restart services
docker-compose restart
# Execute commands in container
docker-compose exec backend npm install
docker-compose exec frontend npm install# Navigate to backend directory
cd backend
# Install dependencies
npm install
# Create environment file
cp ../.env.example .envConfigure backend/.env:
NODE_ENV=development
PORT=5000
JWT_SECRET=your-secret-key-here
JWT_EXPIRATION=7d
ATLAS_URI=mongodb+srv://username:password@cluster.mongodb.net/fitprogressrStart the server:
# Development mode with auto-reload
npm run dev
# Production mode
node server.js# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Create environment file
cp ../.env.example .envConfigure frontend/.env:
VITE_API_URL=http://localhost:5000/
VITE_APININJAS=your-api-ninjas-key-hereStart the development server:
npm run devThe application will be available at http://localhost:5173
- React 18 - Modern UI library
- Vite - Lightning-fast build tool
- Redux Toolkit - State management
- Material-UI - Component library
- Emotion - CSS-in-JS styling
- React Router - Client-side routing
- Axios - HTTP client
- React Calendar Heatmap - Activity visualization
- Lottie - Animation library
- Vitest - Testing framework
- Node.js - JavaScript runtime
- Express.js - Web framework
- MongoDB - NoSQL database
- Mongoose - ODM for MongoDB
- JWT - Authentication
- bcryptjs - Password hashing
- CORS - Cross-origin resource sharing
- Docker - Containerization
- Docker Compose - Multi-container orchestration
- GitHub Actions - CI/CD pipelines
- Netlify/Vercel - Frontend deployment
frontend/
βββ public/
β βββ _redirects # Netlify routing configuration
βββ src/
β βββ assets/
β β βββ lottie/ # Animation files
β βββ components/
β β βββ auth/ # Authentication components
β β β βββ AuthModal.jsx
β β βββ common/ # Reusable UI components
β β β βββ Button.jsx
β β β βββ Card.jsx
β β β βββ InputField.jsx
β β β βββ Modal.jsx
β β β βββ Snackbar.jsx
β β βββ dashboard/ # Landing page components
β β β βββ Hero.jsx
β β β βββ Features.jsx
β β β βββ Footer.jsx
β β βββ Exercise/ # Exercise management
β β β βββ Exercise.jsx
β β β βββ ExerciseForm.jsx
β β β βββ ExerciseTable.jsx
β β βββ Heatmap/ # Activity heatmap
β β β βββ Heatmap.css
β β β βββ HeatmapControls.jsx
β β β βββ ExerciseModal.jsx
β β βββ Navbar/ # Navigation
β β β βββ NavBar.jsx
β β β βββ UserDropdown.jsx
β β βββ profile/ # User profile
β β βββ EditProfileModal.jsx
β βββ pages/
β β βββ Dashboard.jsx # Main app page
β β βββ Home.jsx # Landing page
β βββ slices/ # Redux slices
β β βββ exercisesSlice.js
β β βββ heatMapSlice.js
β β βββ userRoutineSlice.js
β βββ store/
β β βββ store.js # Redux store configuration
β βββ theme/
β β βββ theme.js # Material-UI theme
β βββ App.jsx # Root component
β βββ main.jsx # Entry point
βββ Dockerfile
βββ package.json
βββ vite.config.js
backend/
βββ models/
β βββ user.model.js # User schema & methods
β βββ exercise.model.js # Exercise schema
βββ routes/
β βββ user.js # User authentication & profile
β βββ exercises.js # Exercise CRUD operations
β βββ health.js # Health check endpoint
βββ middleware/
β βββ jwtAuth.js # JWT verification middleware
βββ server.js # Express app & server config
βββ Dockerfile
βββ package.json
Create a .env file in the root directory:
# Server Configuration
NODE_ENV=development
PORT=5000
# JWT Authentication
JWT_SECRET=your-super-secret-jwt-key-change-this
JWT_EXPIRATION=7d
# Database
ATLAS_URI=mongodb+srv://username:password@cluster.mongodb.net/fitprogressr?retryWrites=true&w=majority
# Docker Configuration
BACKEND_PORT=5000
FRONTEND_PORT=5173Frontend environment variables (included in root .env):
# API Configuration
VITE_API_URL=http://localhost:5000/
# External APIs (Optional)
VITE_APININJAS=your-api-ninjas-key-for-quotes-
MongoDB Atlas (Required):
- Sign up at mongodb.com/cloud/atlas
- Create a cluster
- Get connection string from "Connect" β "Connect your application"
- Replace
<username>,<password>, and database name
-
API Ninjas (Optional - for motivational quotes):
- Sign up at api-ninjas.com
- Get free API key from dashboard
- Add to
VITE_APININJASin.env
cd backend
# Development mode with hot reload
npm run dev
# Production mode
node server.js
# Run tests (to be implemented)
npm testcd frontend
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Run linter
npm run lint
# Fix linting issues
npm run lint -- --fix
# Run tests
npm test- Formatting: ESLint + Prettier (2-space indentation)
- Max Line Length: 100 characters
- React: Functional components with hooks
- State Management: Redux Toolkit
- Styling: Material-UI with Emotion
- API Calls: Axios with async/await
- Error Handling: Try-catch blocks with proper error messages
- Commits: Follow Conventional Commits
feat: add exercise deletion featurefix: resolve JWT expiration bugdocs: update installation guiderefactor: optimize heatmap rendering
Run these from the repository root so Prettier checks both frontend and backend:
# Check formatting
npx prettier --check .
# Write formatting fixes
npx prettier --write .POST /api/user/register # Register new user
POST /api/user/login # Login user
GET /api/user/profile # Get user profile (protected)
PUT /api/user/profile # Update user profile (protected)
GET /api/exercises # Get all user exercises (protected)
POST /api/exercises # Create new exercise (protected)
GET /api/exercises/:id # Get exercise by ID (protected)
PUT /api/exercises/:id # Update exercise (protected)
DELETE /api/exercises/:id # Delete exercise (protected)
GET /api/health # Check API status
We welcome contributions from the community! Here's how to get started:
- π Fix bugs and improve stability
- β¨ Add features that enhance the fitness tracking experience
- π Improve documentation and tutorials
- π¨ Enhance UI/UX and accessibility
- β‘ Optimize performance and code quality
- π§ͺ Add tests to increase coverage
- π Add translations for internationalization
- Fork the repository and clone it locally
- Create a branch for your feature:
git checkout -b feature/amazing-feature
- Make your changes and commit with descriptive messages:
git commit -m "feat: add workout streak counter" - Push to your fork:
git push origin feature/amazing-feature
- Open a Pull Request to the
developbranch - Respond to feedback from maintainers
- Features:
feature/description - Bug fixes:
fix/description - Documentation:
docs/description - Refactoring:
refactor/description - Chores:
chore/description
- Keep PRs focused on a single feature/fix
- Link related issues in the PR description
- Add screenshots for UI changes
- Ensure all tests pass
- Update documentation if needed
- Request review from maintainers
Good First Issues: Look for issues labeled good first issue to get started!
For detailed guidelines, see CONTRIBUTING.md
Containers won't start:
# Check Docker daemon is running
docker ps
# View detailed logs
docker-compose logs -f
# Remove old containers and rebuild
docker-compose down -v
docker-compose up -d --buildPort conflicts:
# Check what's using the ports
lsof -i :5000 # Backend
lsof -i :5173 # Frontend
# Or kill processes on those ports
kill -9 $(lsof -ti:5000)
kill -9 $(lsof -ti:5173)Hot reload not working:
# Rebuild without cache
docker-compose up -d --build --no-cache
# Check file permissions
ls -la backend/
ls -la frontend/MongoDB connection failed:
- Verify
ATLAS_URIis correct in.env - Check MongoDB Atlas IP whitelist (allow 0.0.0.0/0 for development)
- Ensure database user has read/write permissions
Frontend can't connect to backend:
- Verify
VITE_API_URLin frontend.env - Check backend is running on correct port
- Verify CORS is enabled in
server.js
Dependencies issues:
# Clear npm cache and reinstall
npm cache clean --force
rm -rf node_modules package-lock.json
npm installBuild errors:
git clone https://github.com/narainkarthikv/FitProgressr.git
cd FitProgressr
cp .env.example .env
docker-compose up -d --build
# Clear Vite cache
rm -rf .vite node_modules/.vite
npm run devJWT authentication fails:
- Ensure
JWT_SECRETis set in backend.env - Check token is included in request headers
- Verify token hasn't expired
- π Check the documentation
- π Report bugs
- π¬ Ask questions
- π‘ Request features
- Contributing Guide - How to contribute
- Code of Conduct - Community guidelines
- Contributors - Our amazing contributors
- License - MIT License details
Thanks to everyone who has helped make FitProgressr awesome! πͺ
See the Contributors Page for the full list.
This project is licensed under the MIT License - see MIT-LICENSE.txt for details.
Summary: You are free to use, modify, and distribute this software for any purpose, including commercial use.
- Issues: Report bugs or request features
- Discussions: Ask questions and share ideas
- Pull Requests: Contribute code improvements
If FitProgressr helps you on your fitness journey:
- β Star the repository
- π Report issues you encounter
- π‘ Share your feature ideas
- π€ Contribute code or documentation
- π’ Tell others about the project
- π¬ Join discussions and help others
- Repository: https://github.com/narainkarthikv/FitProgressr
- Issues: https://github.com/narainkarthikv/FitProgressr/issues
- Discussions: https://github.com/narainkarthikv/FitProgressr/discussions
Want to help build these features? Check out our Contributing Guide!
- ESLint - Code linting
- Prettier - Code formatting
- ES7+ React/Redux - React snippets
- Docker - Docker support
- MongoDB for VS Code - Database management
- GitLens - Git integration
- Thunder Client - API testing
- MongoDB Compass - GUI for MongoDB
- Postman or Insomnia - API testing
- React Developer Tools - Browser extension
- Redux DevTools - Browser extension
- Thanks to all our contributors who have helped build FitProgressr
- Built with amazing open-source technologies
- Inspired by the fitness and developer communities
Built with β€οΈ by the Wisdom Fox community
Let's build the best fitness tracker together! π