LoopFit is a college-focused peer-to-peer clothing rental platform where students can rent clothes from other students for short durations.
Inspired by social + e-commerce platforms (Instagram × Rental), LoopFit follows a backend-first MVP approach with a strong focus on business logic, security, and scalability.
This repository contains the backend API for LoopFit.
- User registration and login (JWT-based authentication)
- Access and refresh token implementation
- Secure logout
- Update user profile and avatar
- Protected routes
- Create clothing item listings with images
- Update item details (title, size, rent price, deposit, etc.)
- Activate or deactivate item listings
- Soft delete items
- Prevent updates when an item is rented
- Upload and manage item images using Cloudinary
- Filter items by category, subcategory, size, and gender
- Price range filtering
- Text search on title, description, and tags
- Pagination support
- Only active items are visible to public users
- Create rental requests for items
- Rental status flow:
- pending
- accepted
- ongoing
- completed
- cancelled
- Snapshot pricing (rent and deposit are locked at booking time)
- Items are blocked from updates or deletion during active rentals
- Soft delete instead of hard delete
- Rental-block middleware for data consistency
- Centralized error handling
- Clean and consistent API response format
- Owner-only and role-based authorization
- Node.js
- Express.js
- MongoDB (Mongoose)
- JWT Authentication
- Multer (file uploads)
- Cloudinary (image storage)
- Postman (API testing)
- Nodemon (development)
- Prettier (code formatting)
This project is an MVP and is under active development.
Planned future enhancements:
- Payment integration
- Ratings and reviews
- In-app chat
- Admin dashboard
- Recommendation system
Contributions, feedback, and suggestions are welcome.