India's first verified student thrift marketplace powered by AI pricing agents.
ThriftX is a modern, responsive, and real-time thrift marketplace built exclusively for students. It leverages the power of AI to provide dynamic pricing recommendations and an intelligent chatbot assistant, alongside real-time buyer-seller communication.
- AI-Powered Pricing: Get real-time price recommendations for your listings powered by Gemini AI.
- Real-Time Chat: Negotiate and connect instantly with buyers/sellers using Socket.io.
- Student Verified: A trusted ecosystem exclusively for verified college students.
- Stories & Blogs: Share thrifting experiences, hauls, and sustainable fashion tips.
- Modern UI/UX: Smooth animations (Framer Motion) and 3D elements (Three.js) for an immersive experience.
- Secure Payments: Integrated payment gateways (Razorpay).
- Framework: React 19 + Vite
- Styling: Tailwind CSS v4
- Animations: Framer Motion
- 3D Graphics: Three.js & React Three Fiber
- Charts: Recharts
- Icons: Lucide React
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB & Mongoose
- Real-Time: Socket.io
- AI Integration: Google Generative AI (Gemini)
- Auth & Security: JWT, bcryptjs, Helmet
- Emails: Nodemailer
graph TD;
Client[React Frontend] -->|REST API| API[Express API Server]
Client <-->|WebSocket| Socket[Socket.io Server]
API <--> DB[(MongoDB)]
API <--> AI[Gemini AI Engine]
API <--> Mail[Nodemailer]
subgraph Backend
API
Socket
end
subgraph External Services
AI
Mail
end
erDiagram
USER ||--o{ PRODUCT : lists
USER ||--o{ ORDER : places
USER ||--o{ STORY : creates
USER ||--o{ BLOG : writes
PRODUCT ||--o{ ORDER : "is part of"
ORDER ||--o{ CHAT : "has messages"
USER ||--o{ CHAT : sends
USER {
ObjectId _id
String name
String email
String password
Boolean isVerified
}
PRODUCT {
ObjectId _id
ObjectId sellerId
String title
String description
Number price
String status
}
ORDER {
ObjectId _id
ObjectId buyerId
ObjectId productId
String status
}
CHAT {
ObjectId _id
ObjectId orderId
ObjectId senderId
String message
Date timestamp
}
sequenceDiagram
participant User
participant Frontend
participant Backend
participant Gemini as Gemini AI
User->>Frontend: Fills product details (Title, Condition, Brand)
User->>Frontend: Clicks "Get Price Recommendation"
Frontend->>Backend: POST /api/ai/price-check
Backend->>Gemini: Send product context & market data
Gemini-->>Backend: Return suggested price & reasoning
Backend-->>Frontend: Send recommendation JSON
Frontend-->>User: Display suggested price
- Node.js (v18+ recommended)
- MongoDB running locally or a MongoDB Atlas URI
- Google Gemini API Key
-
Clone the repository
git clone https://github.com/yourusername/thriftx.git cd thriftx -
Backend Setup
cd backend npm installCreate a
.envfile in the root of the project with the following:PORT=5000 MONGO_URI=your_mongodb_uri JWT_SECRET=your_jwt_secret GEMINI_API_KEY=your_gemini_api_key CLIENT_URL=http://localhost:5173
-
Frontend Setup
cd frontend npm install
-
Start the Backend
cd backend npm run dev -
Start the Frontend
cd frontend npm run dev -
Open
http://localhost:5173in your browser.
The project includes a vercel.json configuration for easy deployment on Vercel.
The configuration routes /api/* to the backend serverless functions and serves the React static build for other routes.
This project is licensed under the MIT License - see the LICENSE file for details.