A modern e-commerce platform for Azerbaijan with AI-powered recommendations and an interactive drawing game.
- Product Catalog: Browse thousands of products across multiple categories
- Advanced Search & Filtering: Find products by category, price range, ratings, and more
- Shopping Cart: Add, remove, and manage items in your cart
- Secure Checkout: Complete purchases with multiple payment options
- User Reviews: Rate and review products
- Personalized Feed: AI learns from your browsing and purchase history to recommend products
- Smart Search: Enhanced search with AI understanding of product descriptions
- Behavioral Analytics: Track user preferences to improve recommendations
- Daily Challenges: Draw a random product each day to earn bonuses
- AI Drawing Detection: Advanced AI analyzes your drawings for accuracy
- Bonus System: Earn bonuses that can be converted to discounts
- Leaderboards: Compete with other users
- Oba Branding: Green and yellow color scheme representing growth and optimism
- Responsive Design: Works perfectly on desktop, tablet, and mobile
- Smooth Animations: Framer Motion animations for better user experience
- Accessibility: WCAG compliant design
- React 18 - Modern React with hooks and concurrent features
- Vite - Fast build tool and development server
- React Router - Client-side routing
- Styled Components - CSS-in-JS styling
- Framer Motion - Animation library
- React Query - Data fetching and caching
- Axios - HTTP client
- React Hook Form - Form handling
- React Hot Toast - Notifications
- Node.js (v16 or higher)
- MongoDB (local or cloud)
- OpenAI API key
- Cloudinary account (optional)
-
Clone the repository
git clone <repository-url> cd oba-marketplace
-
Install dependencies
npm run install:all
-
Set up environment variables
Create
backend/.envfile:PORT=5000 NODE_ENV=development FRONTEND_URL=http://localhost:3000 MONGODB_URI=mongodb://localhost:27017/oba-marketplace JWT_SECRET=your-super-secret-jwt-key-here OPENAI_API_KEY=your-openai-api-key CLOUDINARY_CLOUD_NAME=your-cloudinary-cloud-name CLOUDINARY_API_KEY=your-cloudinary-api-key CLOUDINARY_API_SECRET=your-cloudinary-api-secret
Create
frontend/.envfile:VITE_API_URL=http://localhost:5000/api
-
Start the development servers
npm run dev
This will start both frontend (http://localhost:3000) and backend (http://localhost:5000) servers.
The application will automatically create the necessary collections when you first run it. Make sure MongoDB is running on your system.
oba-marketplace/
├── frontend/ # React frontend application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── context/ # React context providers
│ │ ├── utils/ # Utility functions
│ │ └── App.jsx # Main app component
│ ├── package.json
│ └── vite.config.js
├── package.json # Root package.json
└── README.md
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/profile- Get user profilePUT /api/auth/profile- Update user profile
GET /api/products- Get all products (with filtering)GET /api/products/:id- Get single productGET /api/products/featured- Get featured productsGET /api/products/ai-recommendations- Get AI recommendationsPOST /api/products- Create product (seller only)PUT /api/products/:id- Update product (seller only)DELETE /api/products/:id- Delete product (seller only)
GET /api/game/state- Get user game stateGET /api/game/daily-challenge- Get daily challengePOST /api/game/submit-drawing- Submit drawingPOST /api/game/convert-bonuses- Convert bonuses to discountGET /api/game/bonus-history- Get bonus transaction history
The AI system analyzes user behavior including:
- Search history
- Viewed products
- Purchase history
- Time spent on products
- Category preferences
The drawing game uses OpenAI's Vision API to:
- Analyze user drawings
- Compare with target products
- Calculate accuracy scores
- Provide feedback
- Award bonuses based on performance
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, email info@oba.az or create an issue in the repository.
- OpenAI for AI capabilities
- MongoDB for database
- React team for the amazing framework
- All contributors who helped build this platform