ReWear is a web-based platform that enables users to exchange unused clothing through direct swaps or a point-based redemption system. The goal is to promote sustainable fashion and reduce textile waste by encouraging users to reuse wearable garments instead of discarding them.
- Email/password signup and login
- JWT token-based authentication
- User profile management
- Platform introduction with sustainable messaging
- Calls-to-action: "Start Swapping", "Browse Items", "List an Item"
- Featured items carousel
- Impact statistics
- Profile details and points balance
- Uploaded items overview
- Ongoing and completed swaps list
- User statistics
- Upload images with drag-and-drop
- Enter title, description, category, type, size, condition, and tags
- Submit items for listing
- Item status tracking
- Image gallery and full item description
- Uploader information
- Options: "Swap Request" or "Redeem via Points"
- Item availability status
- Direct clothing swaps between users
- Point-based redemption system
- Swap request management
- Status tracking (pending, accepted, completed)
- Moderate and approve/reject item listings
- Remove inappropriate or spam items
- Lightweight admin panel for oversight
- Platform statistics and analytics
- Node.js with Express.js
- JWT for authentication
- bcryptjs for password hashing
- multer for file uploads
- express-validator for input validation
- helmet for security headers
- React 18 with functional components and hooks
- React Router for navigation
- Tailwind CSS for styling
- Framer Motion for animations
- React Icons for icons
- Axios for API calls
- React Hot Toast for notifications
REWEAR-PROJECT/
βββ server/
β βββ index.js # Main server file
β βββ routes/
β β βββ auth.js # Authentication routes
β β βββ items.js # Item management routes
β β βββ swaps.js # Swap system routes
β β βββ admin.js # Admin panel routes
β βββ uploads/ # Image upload directory
βββ client/
β βββ public/
β β βββ index.html # Main HTML file
β βββ src/
β β βββ components/ # Reusable components
β β βββ contexts/ # React contexts
β β βββ pages/ # Page components
β β βββ App.js # Main app component
β β βββ index.js # React entry point
β β βββ index.css # Global styles
β βββ package.json # Frontend dependencies
β βββ tailwind.config.js # Tailwind configuration
β βββ postcss.config.js # PostCSS configuration
βββ package.json # Backend dependencies
βββ README.md # Project documentation
- Node.js (v14 or higher)
- npm or yarn
-
Clone the repository
git clone <repository-url> cd Odoo-Hackathon
-
Install backend dependencies
npm install
-
Install frontend dependencies
cd client npm install cd ..
-
Create uploads directory
mkdir -p server/uploads
-
Start the development servers
Option 1: Run both servers simultaneously
npm run dev
Option 2: Run servers separately
# Terminal 1 - Backend server npm run server # Terminal 2 - Frontend server cd client && npm start
-
Access the application
- Frontend: https://rewear-web.netlify.app
Create a .env
file in the root directory:
PORT=5000
JWT_SECRET=your-secret-key-here
NODE_ENV=development
The system comes with a default admin account:
- Email:
[email protected]
- Password:
password
- Register/Login: Create an account or sign in
- Browse Items: Explore available clothing items
- List Items: Upload your unused clothing
- Swap or Redeem: Request swaps or use points to redeem items
- Manage Profile: Update your information and view your activity
- Login: Use admin credentials
- Moderate Items: Approve or reject new listings
- Manage Users: View user statistics and manage accounts
- Monitor Platform: View analytics and recent activity
- Primary Green:
#22c55e
- Represents sustainability and growth - Secondary Gray:
#64748b
- Neutral tones for content - Accent Yellow:
#eab308
- Highlights and calls-to-action
- Font Family: Inter - Clean, modern, and highly readable
- Weights: 300, 400, 500, 600, 700
- Buttons: Primary, secondary, and accent variants
- Cards: Clean, elevated design with hover effects
- Forms: Consistent input styling with validation states
- Badges: Status indicators with color coding
- JWT token authentication
- Password hashing with bcrypt
- Input validation and sanitization
- CORS protection
- Security headers with helmet
- File upload restrictions
# Run server tests (when implemented)
npm test
cd client
npm test
- Set
NODE_ENV=production
- Configure environment variables
- Build the frontend:
cd client && npm run build
- Start the server:
npm start
- Build the application:
npm run build
- Deploy the
build
folder to your hosting service
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Real-time chat for swap negotiations
- Advanced search and filtering
- Mobile app development
- Integration with shipping services
- Blockchain-based point system
- AI-powered item recommendations
- Social features and user reviews
Made with β€οΈ for a sustainable future