Backend service powering the BeingFit B2B gym equipment e-commerce platform.
The API handles product management, user authentication, shopping cart operations, order processing, payment verification, image uploads, and database persistence. It serves as the core business logic layer between the frontend application and external services.
- Session-based user authentication
- Product management APIs
- Shopping cart operations
- Order processing workflows
- Razorpay payment integration
- Server-side payment signature verification
- Cloudinary image upload and management
- Secure file handling with Multer
- MongoDB data persistence
- Protected routes and middleware
- Environment-based configuration
- Node.js
- Express.js
- MongoDB Atlas
- Mongoose
- Express Session
- Connect Mongo
- Bcrypt
- Razorpay
- HMAC-SHA256 Signature Verification
- Cloudinary
- Multer
Customer
|
v
React Frontend
|
v
Express Backend
|
+------ MongoDB Atlas
|
+------ Razorpay
|
+------ Cloudinary
The backend acts as the central service layer responsible for authentication, payment processing, business logic, media management, and database operations.
Handles user registration, login, session management, and route protection.
Provides APIs for creating, updating, retrieving, and managing gym equipment products.
Maintains user shopping carts and synchronizes product selections.
Manages checkout workflows and order creation.
Verifies Razorpay transactions using server-side cryptographic signature validation.
Uploads and manages product images through Cloudinary.
- Session-based authentication
- Password hashing using bcrypt
- Protected API routes
- Secure environment variables
- Server-side payment verification
- HTTP-only session cookies
- MongoDB session persistence
Customer Checkout
|
v
Razorpay Payment Gateway
|
v
Payment Success Callback
|
v
Backend Signature Verification
|
v
Order Confirmation
Payments are verified on the server using HMAC-SHA256 signature validation before orders are marked as successful.
Clone the repository:
git clone <repository-url>Install dependencies:
npm installStart development server:
npm run devStart production server:
npm startCreate a .env file:
PORT=
MONGODB_URI=
SESSION_SECRET=
RAZORPAY_KEY_ID=
RAZORPAY_KEY_SECRET=
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
CLIENT_URL=BeingFit React Frontend
BeingFit Admin Panel
- Product search and filtering
- Inventory management
- Order tracking
- Admin analytics dashboard
- Redis caching
- Role-based access control (RBAC)
Bhaskar Tiwari