PROJECT

FitMart

A full-stack MERN fitness e-commerce platform, built as a learning resource and a real-world starting point, now open for contributions.

What this is

FitMart started as a way for me to actually build something full-stack instead of just watching tutorials. Somewhere along the way it turned into a complete e-commerce platform: products, cart, payments, orders, an admin panel and then I kept adding things because I wanted to see how far I could take it.

It’s a MERN app. Auth through Firebase, payments through Razorpay, AI chatbot powered by Gemini. Also a workout tracker, exercise library, BMI/TDEE calculators and a nearby gym finder, because “fitness e-commerce” didn’t feel complete without the fitness part actually being there.

What’s inside

The customer side has product browsing, search, a smart cart with real-time stock reservation, Razorpay checkout with server-side HMAC verification, order history and a profile with saved addresses. There’s also a 10% welcome discount for first-time buyers, a rewards system and automated emails (first purchase + re-engagement).

The fitness side has a FullCalendar-based workout tracker, exercise logging with GIF previews from ExerciseDB, three structured fitness plans, a BMI/TDEE calculator with product recommendations and a nearby fitness center finder based on your saved address.

The admin side has a dashboard with revenue KPIs and charts, real-time inventory with low-stock alerts, a customer directory with segments and spend analytics, sales reports, marketing strategy cards and a bug tracker for user-submitted issues.

Some things I had to think about

Stock reservation. When someone adds an item to cart, Product.reserved increments. On remove or clear, it decrements. This uses atomic findOneAndUpdate operations so concurrent cart activity doesn’t cause race conditions. Orders finalize the reservation but intentionally don’t re-release it.

Payment verification. Razorpay payments are verified server-side using HMAC-SHA256 on razorpay_order_id|razorpay_payment_id. The secret key never touches the client.

Graceful degradation. If GEMINI_API_KEY is missing, the chatbot falls back to curated static responses. If SMTP credentials are missing, emails are silently skipped. The app doesn’t break just because an optional service isn’t configured.

Tech stack

React 19 + Vite on the frontend, Tailwind v4, React Router v7, Framer Motion for animations. Node/Express backend with Mongoose, Firebase Admin SDK for token verification, Nodemailer for emails, Helmet + rate limiting for security. MongoDB for data, Razorpay for payments, Gemini 2.5 Flash for the chatbot, ExerciseDB via RapidAPI for the exercise library.

Open source

FitMart is community-driven and open for contributions, from typo fixes to new features. There are good first issue labels for people who want to start. At the time of writing it’s at 358 stars and 586 forks, with 51 contributors.