A full-stack e-commerce application built with React.js frontend and Node.js/Express.js backend, featuring mobile phone sales with modern UI/UX.
- User Authentication: Register, login, and logout functionality with secure password hashing
- Product Catalog: Browse mobile phones with filtering and sorting
- Shopping Cart: Add/remove items with quantity management
- Payment Integration: Stripe payment processing
- Responsive Design: Mobile-first responsive UI
- Admin Panel: Product and order management
- Search & Filter: Advanced product search and filtering
- Order Management: Complete order lifecycle
- React.js 18
- Redux Toolkit for state management
- Styled Components for styling
- React Router for navigation
- Axios for API calls
- Stripe for payments
- Node.js
- Express.js
- MongoDB with Mongoose
- JWT for authentication
- bcrypt for secure password hashing
- Stripe API integration
Before running this project, make sure you have the following installed:
- Node.js (v14 or higher)
- npm or yarn
- MongoDB (local or MongoDB Atlas)
git clone <your-repo-url>
cd mobi-world# Navigate to API directory
cd API
# Install dependencies
npm install
# Create environment file
cp env.example .envEdit the .env file with your actual values:
MONGODB_URL=mongodb://localhost:27017/mobiworld
JWT_SEC=your_jwt_secret_key_here
STRIPE_KEY=sk_test_your_stripe_secret_key_here
PORT=5000# Navigate to CLIENT directory
cd ../CLIENT
# Install dependencies
npm install
# Create environment file
cp env.example .envEdit the .env file with your Stripe publishable key:
REACT_APP_STRIPE=pk_test_your_stripe_publishable_key_here- Install MongoDB locally
- Start MongoDB service
- Create a database named
mobiworld
- Create a free account at MongoDB Atlas
- Create a new cluster
- Get your connection string
- Replace
MONGODB_URLin your.envfile
- Create a free account at Stripe
- Get your test API keys
- Add them to your environment files
cd API
npm run devThe backend will run on http://localhost:5000
cd CLIENT
npm startThe frontend will run on http://localhost:3000
mobi-world/
βββ API/ # Backend server
β βββ models/ # MongoDB schemas
β βββ routes/ # API endpoints
β βββ app.js # Server entry point
β βββ package.json
βββ CLIENT/ # Frontend application
β βββ src/
β β βββ components/ # React components
β β βββ context/ # React context
β β βββ redux/ # Redux store
β β βββ styles/ # Styled components
β βββ package.json
βββ README.md
MONGODB_URL: MongoDB connection stringJWT_SEC: Secret for JWT tokensSTRIPE_KEY: Stripe secret keyPORT: Server port (default: 5000)
REACT_APP_STRIPE: Stripe publishable key
- bcrypt Password Hashing: Industry-standard password hashing with salt
- JWT Authentication: Secure token-based authentication
- Input Validation: Comprehensive validation for user inputs
- Password Requirements: Strong password policy enforcement
- Email Validation: Proper email format validation
To run tests (if available):
# Backend tests
cd API
npm test
# Frontend tests
cd CLIENT
npm testPOST /api/auth/register- User registration (with password validation)POST /api/auth/login- User loginGET /api/products- Get all productsGET /api/products/:id- Get single productPOST /api/carts- Add to cartGET /api/carts/:userId- Get user cartPOST /api/orders- Create orderGET /api/orders/:userId- Get user orders
- Fork the repository
- Create your 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.
Your Name - Your GitHub
- React.js community
- MongoDB Atlas for free database hosting
- Stripe for payment processing
- bcrypt for secure password hashing
- All the open-source libraries used in this project