ReWear is a sustainable fashion exchange platform that allows users to swap their unused clothing items through two innovative methods:
- Direct Item Swaps: Exchange your items directly with other users
- Point-Based Redemption System: Earn and spend points to acquire desired items
Our platform promotes environmental sustainability by giving fashion a second life and building a trusted community of eco-conscious users.
- Secure user registration and login system
- Profile management with user statistics
- Admin panel for platform management
- Role-based access control
- Create detailed clothing listings with images
- Categorize items (Men, Women, Kids)
- Specify item types (Shirt, Pants, Dress, Others)
- Size selection (S, M, L, XL)
- Condition tracking (New, Like New, Good, Acceptable)
- Tag system for better searchability
- Admin approval workflow
- Direct Swaps: Exchange your item for another user's item
- Point Redemption: Use earned points to acquire items without offering your own
- Swap request management (Accept, Reject, Cancel)
- Real-time swap status tracking
- Points earning system for successful swaps
- Users start with 100 points
- Earn points by completing successful swaps
- Spend points to redeem items without direct exchange
- Track points balance in user profile
- Dashboard with platform statistics
- User management (view, activate, deactivate)
- Listing approval/rejection system
- Swap request monitoring
- Content moderation tools
- Responsive design for all devices
- Bootstrap-powered interface
- Interactive image galleries
- Real-time notifications
- Smooth animations and transitions
- Framework: Flask (Python)
- Database: SQLite with SQLAlchemy ORM
- Authentication: Session-based with Werkzeug security
- Migrations: Flask-Migrate with Alembic
- Template Engine: Jinja2
- CSS Framework: Bootstrap 5
- Icons: Font Awesome & Bootstrap Icons
- JavaScript: Vanilla JS for interactivity
- Users: User accounts, points, admin roles
- Listings: Clothing items with detailed metadata
- Swap Requests: Exchange proposals and status tracking
- Python 3.8+
- pip (Python package manager)
git clone https://github.com/Anuraj-dev/ReWear.git
cd ReWearpython -m venv venv# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activatepip install -r requirements.txtflask db init
flask db migrate -m "Initial migration"
flask db upgradepython sampledata.pypython run.pyThe application will be available at http://localhost:5000
- Registration: Create an account with email and username
- Profile Setup: Complete your profile with personal information
- List Items: Add your unused clothing items with photos and descriptions
- Browse Listings: Explore available items from other users
- Make Swap Requests:
- Offer your item for direct swap
- Use points for redemption without offering items
- Manage Swaps: Accept, reject, or cancel swap requests
- Track Points: Monitor your points balance and transaction history
- Admin Dashboard: Access comprehensive platform statistics
- User Management: View and manage user accounts
- Content Moderation: Approve or reject listing submissions
- Swap Monitoring: Oversee swap requests and transactions
- Platform Analytics: Track growth metrics and user engagement
- user_id (UUID, Primary Key)
- username (String, Unique)
- email (String, Unique)
- password (Hashed String)
- points (Integer, Default: 100)
- is_admin (Boolean, Default: False)
- created_at (DateTime)- id (UUID, Primary Key)
- uploader_id (Foreign Key to User)
- title (String)
- description (Text)
- category (String: Men/Women/Kids)
- type (String: Shirt/Pants/Dress/Others)
- size (String: S/M/L/XL)
- condition (String: New/Like New/Good/Acceptable)
- tags (Text, Comma-separated)
- image_url (String)
- point_value (Integer, Default: 100)
- is_approved (Boolean, Default: False)
- is_available (Boolean, Default: True)
- status (String: Available/Swapped/Redeemed)
- created_at (DateTime)- id (UUID, Primary Key)
- requester_id (Foreign Key to User)
- requested_item_id (Foreign Key to Listing)
- offered_item_id (Foreign Key to Listing, Nullable)
- status (String: Pending/Accepted/Rejected/Cancelled)
- swap_type (String: direct_swap/point_redemption)
- points_used (Integer, Default: 0)
- created_at (DateTime)
- updated_at (DateTime)GET /register- User registration pagePOST /register- Process registrationGET /login- User login pagePOST /login- Process loginPOST /logout- User logout
GET /profile- User profile pageGET /my-listings- User's listings with filtersGET /my-swaps- User's swap historyGET /swap-requests- Incoming swap requestsPOST /api/swaps/<id>/accept- Accept swap requestPOST /api/swaps/<id>/reject- Reject swap requestPOST /api/swaps/<id>/cancel- Cancel swap request
GET /- Browse all approved listingsGET /new- Create new listing formPOST /- Submit new listingGET /<id>- View listing detailsGET /<id>/edit- Edit listing formPOST /<id>- Update listingGET /<id>/swap- Swap request formPOST /<id>/swap- Submit swap requestPOST /<id>/redeem- Redeem with points
GET /- Admin dashboardGET /users- Manage usersGET /listings- Manage listingsGET /swaps- Manage swap requestsPOST /listings/<id>/approve- Approve listingPOST /listings/<id>/reject- Reject listing
- Password Hashing: Werkzeug security for password encryption
- Session Management: Secure session handling
- Input Validation: Server-side validation for all forms
- SQL Injection Protection: SQLAlchemy ORM prevents SQL injection
- XSS Protection: Jinja2 template auto-escaping
- CSRF Protection: Configurable secret key for session security
The application is fully responsive and optimized for:
- π± Mobile devices (320px+)
- π± Tablets (768px+)
- π» Desktop computers (1024px+)
- π₯οΈ Large screens (1200px+)
- Primary Colors: Green (#01715C) for sustainability theme
- Secondary Colors: Purple gradients for modern appeal
- Typography: Clean, modern fonts for readability
- Icons: Comprehensive icon system for intuitive navigation
The application includes a sample data generator (sampledata.py) that creates:
- 6 sample users with varying point balances
- 1 admin account (admin@rewear.com / admin123)
- Multiple clothing listings across different categories
- Sample swap requests demonstrating the system
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- π§ Email: support@rewear.com
- π Issues: GitHub Issues
- π Documentation: This README file
- Real-time messaging between users
- Mobile app development
- AI-powered outfit recommendations
- Integration with shipping services
- Advanced search and filtering
- User rating and review system
- Social media integration
- Multi-language support
- Payment gateway integration
- Machine learning for personalized recommendations
ReWear - Where Fashion Gets a Second Life π±
Made with β€οΈ for a sustainable future.