A modern, scalable, and feature-rich e-commerce platform for buyers and sellers built with React (TypeScript), Node.js, Express, MongoDB, and ShadCN UI.
ShopHub enables buyers and sellers to interact seamlessly on a secure, scalable platform.
The project is divided into two main parts the client (frontend) and the server (backend), both connected through RESTful APIs and a shared MongoDB database.
π ShopHub Live Website
- Browse and search products by category, price, or popularity
- Add products to cart and wishlist
- Secure checkout with order tracking
- Integrated payment gateway (Stripe/PayPal)
- Review and rate purchased items
- Real-time chat with sellers
- Responsive dark mode interface
- Seller account registration and verification
- Manage products (create, update, delete)
- Access a detailed sales dashboard
- Track orders and fulfillment
- Chat directly with buyers
- View analytics and manage promotions
- Manage users, sellers, and products
- Approve new sellers
- Monitor platform transactions
- Access reports and system logs
| Layer | Technology |
|---|---|
| Frontend | React (TypeScript), Vite, ShadCN UI, Tailwind CSS |
| Backend | Node.js, Express.js |
| Database | MongoDB (Mongoose) |
| Authentication | JWT-based Auth + Role-Based Access Control (RBAC) |
| Payment Integration | Stripe / PayPal |
| State Management | Context API / Redux Toolkit |
| Image Uploads | Cloudinary |
| Email Notifications | Nodemailer |
| Deployment | Vercel (Frontend), Render / Railway (Backend), MongoDB Atlas |
ShopHub/
βββ Frontend/
β βββ index.html
β βββ package.json
β βββ vite.config.ts
β βββ README.md
β βββ public/
β βββ src/
β βββ App.tsx
β βββ main.tsx
β βββ index.css
β βββ components/
β β βββ pages/
β βββ lib/
β βββ styles/
βββ Backend/
β βββ index.js
β βββ package.json
β βββ .env.example
β βββ models/
β βββ controllers/
β βββ routes/
β βββ config/
β βββ middleware/
βββ README.md
Handles everything related to the user interface. Built with React, TypeScript, TailwindCSS, and ShadCN.
It includes reusable UI components, page views, and global state management through context or Redux.
Manages all backend operations β authentication, database interactions, and API routes.
Built using Node.js, Express, and MongoDB with Mongoose ODM.
Template for environment variables required to run the app. Copy this file to .env and fill in your own credentials.
Contains project overview, setup instructions, and documentation.
Defines project-level scripts and dependencies for managing both client and server together (optional).
-
Frontend:
- Navigate to
/client - Run
npm run devto start the React development server
- Navigate to
-
Backend:
- Navigate to
/server - Run
npm run devto start the Express server
- Navigate to
-
Environment Setup:
- Create a
.envfile in/serverusing the.env.exampletemplate - Add your database connection string, JWT secret, Stripe key, etc.
- Create a
-
Access App:
- Open frontend in browser β
http://localhost:8080 - Backend runs on β
http://localhost:5000
- Open frontend in browser β
- Frontend and backend are independent but communicate through REST APIs.
- MongoDB Atlas is used as the main database.
- Environment variables control configuration and secrets.
- The code is modular and scalable, suitable for enterprise-level e-commerce solutions.
git clone https://github.com/yourusername/shophub.git
cd shophubFrontend
cd frontend
npm installBackend
cd Backend
npm installCreate a .env file in the backend/ directory with the following:
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
STRIPE_SECRET_KEY=your_stripe_key
CLOUDINARY_URL=your_cloudinary_url
PORT=5000both frontend and backend
npm run devApp runs on:
π Frontend: http://localhost:3000
π Backend: http://localhost:5000
1οΈβ£ Buyer adds items to cart
2οΈβ£ Checkout initializes a Stripe/PayPal payment session
3οΈβ£ Backend verifies transaction and updates order status
5οΈβ£ Confirmation email sent after successful payment
1οΈβ£ JWT-based authentication
2οΈβ£ Role-based access control (RBAC)
3οΈβ£ Input validation and sanitization
4οΈβ£ Secure HTTP headers and CORS configuration
5οΈβ£ Centralized error handling middleware
1οΈβ£ AI-powered product recommendation system
2οΈβ£ Multi-language and multi-currency support
3οΈβ£ Seller verification system
4οΈβ£ Mobile app (React Native)
5οΈβ£ Advanced analytics dashboard
Contributions are welcome and appreciated!
To contribute:
Fork the repo
Create your feature branch (git checkout -b feature-name)
Commit changes (git commit -m "Add new feature")
Push to branch (git push origin feature-name)
Submit a pull requestπ§ metasebiyawasfaw@gmail.com π Portifolio
This project is licensed under the MIT License see the LICENSE file for details.
β If you found this project useful, please give it a star it helps others discover it!