Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FitQuest (Node.js + EJS)

A simple fitness tracker with gamification: XP, streaks, badges, and leaderboards. Built with Node.js, Express, MongoDB, EJS, and JWT auth.

Features

  • User auth (register/login/logout) with hashed passwords and JWT tokens (cookie + Bearer)
  • Log workouts (type, duration, calories, date)
  • XP: 10 XP per 30 minutes (rounded up)
  • Streaks: consecutive workout days tracked automatically
  • Badges: Bronze (100), Silver (500), Gold (1000), Platinum (2500), Diamond (5000)
  • Leaderboards by XP and current streak

Tech

  • Node.js, Express.js
  • MongoDB (Mongoose)
  • JWT (stateless auth)
  • EJS templating

Quick start

  1. Prerequisites: Node 18+ and MongoDB running locally.
  2. Environment: .env is included with defaults. Adjust PORT, MONGODB_URI, JWT_SECRET, JWT_EXPIRES_IN as needed.
  3. Install and run:
cd c:\Users\Manan\Desktop\Backend
npm install
npm run dev

Server: http://localhost:3001

Pages

  • / Home
  • /auth/register Register
  • /auth/login Login
  • /dashboard Dashboard (add workout, view stats + recent workouts)
  • /leaderboard Leaderboards (top XP, top streaks)

Notes

  • Stateless JWT auth; token also set as httpOnly cookie for server-rendered pages.
  • DELETE forms use method-override via ?_method=DELETE.
  • Static assets served under /static.

Optional enhancements

  • Add Chart.js graphs to dashboard.ejs.
  • Provide JSON API endpoints.
  • Simulate wearable sync by generating random workouts.
  • Add pagination/filters to workouts list.

License

MIT

About

FitQuest is a full-stack fitness platform that combines workout tracking, real-time communication, and gamification to make fitness engaging and motivating.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages