A full-stack, responsive web application designed to help users log, track, and manage their daily workout routines efficiently. Built using the MERN stack (MongoDB, Express.js, React, Node.js), this project features secure user authentication, global state management, responsive UI design, and full CRUD operations.
- GitHub Repository: https://github.com/CSS-styles/Workout_Tracking_App
- Live Demo: https://workout-tracker-igvo.onrender.com
β οΈ Note on Free Tier Hosting (Render):
The backend service is hosted on Render's free tier. If the app hasn't been accessed recently, the backend server goes into a spin-down state. Please allow 50β60 seconds for the initial request to wake up the server. Once awake, the application will respond smoothly!
- π User Authentication & Authorization: Secure signup and login using JWT (JSON Web Tokens) and
bcryptpassword hashing. Protected API routes ensure users can only view and manage their own workouts. - β‘ CRUD Operations:
- Create: Add new workout entries specifying exercise name, load (kg), and repetitions.
- Read: Display dynamic list of logged workouts ordered chronologically.
- Delete: Remove workout logs instantly with real-time state updates.
- π± Fully Responsive UI/UX: Built with a mobile-first approach using Flexbox and CSS Grid to ensure a smooth experience on mobile devices, tablets, and desktops.
- π§ Global State Management: Powered by React's Context API to prevent prop-drilling and maintain fast, synchronized UI updates without full page reloads.
- π‘οΈ Form Validation & Error Handling: Highlights empty or invalid inputs on the client side before sending data to the server.
- Library: React.js
- State Management: React Context API &
useReducer - Styling: CSS3 (Flexbox & Grid, CSS Modules/Custom Styles)
- Runtime Environment: Node.js
- Framework: Express.js
- Database: MongoDB Atlas (NoSQL)
- Object Data Modeling (ODM): Mongoose
- Authentication: JSON Web Tokens (
jsonwebtoken) - Password Hashing:
bcrypt/bcryptjs - Cross-Origin Handling:
cors - Environment Variables:
dotenv
- State Synchronization: Implemented React Context (
WorkoutsContext&AuthContext) alongsideuseReducerto seamlessly sync backend database mutations with frontend components in real-time. - RESTful API Architecture: Designed scalable, decoupled backend controllers and routes adhering to HTTP protocols (
GET,POST,PATCH,DELETE). - Environment Security: Secured sensitive database credentials and secret keys using
.envfiles and.gitignorepractices to avoid exposing production keys. - CORS & Multi-Platform Deployment: Managed cross-origin resource sharing between a decoupled React client and Express API across production server environments.
Workout_Tracking_App/
β
βββ backend/ # Express API Server
β βββ controllers/ # Route logic & DB transactions
β βββ middleware/ # Auth verification middleware
β βββ models/ # Mongoose schemas (Workout, User)
β βββ routes/ # Express routing handlers
β βββ server.js # Server entry point
β
βββ frontend/ # React UI Client
βββ src/
β βββ components/ # Reusable UI elements (Navbar, Forms, Details)
β βββ context/ # React Context API providers & hooks
β βββ pages/ # Page layouts (Home, Login, Signup)
β βββ App.js # Main React routing component
βββ package.json