- Features
- Technologies Used
- Getting Started
- Environment Variables
- Installation & Setup
- Running the Application
- Seeding the Database
- Sample User Credentials
- Deployment (Heroku)
- API Documentation
- License
- Full-featured shopping cart
- Product reviews and ratings
- Top products carousel
- Product pagination
- Product search feature
- User profile with order history
- Admin dashboard for product and user management
- Order tracking with delivery status updates
- Secure checkout process with shipping and payment method selection
- PayPal and credit card payment integration
- Database seeding with sample users and products
- Frontend: React, Redux, Bootstrap
- Backend: Node.js, Express.js, MongoDB (Mongoose ORM)
- Authentication: JWT (JSON Web Token)
- Payment Gateway: PayPal API
- Environment Management: dotenv
- Database: MongoDB Atlas / Local MongoDB
- State Management: Redux Toolkit
- Deployment: Heroku
git clone https://github.com/yavarguliyev/Pro_Shop_Mern.git
cd Pro_Shop_MernCreate a .env file in the root directory and add the following:
NODE_ENV=development
PORT=5000
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_jwt_secret
PAYPAL_CLIENT_ID=your_paypal_client_idnpm install # Install server-side dependencies
cd frontend && npm install # Install client-side dependenciesnpm run dev # Runs frontend (:3000) and backend (:5000) concurrentlynpm run serverTo populate the database with sample users and products or to clear existing data, use the following commands:
# Import sample data
npm run data:import
# Destroy existing data
npm run data:destroyUse the following credentials for testing:
Admin User:
Email: admin@example.com
Password: 123456
Regular User:
Email: john@example.com
Password: 123456
Email: jane@example.com
Password: 123456
heroku loginheroku create your-app-nameCreate a Procfile in the root directory and add:
web: node server.jsAdd the following line under scripts:
"heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix frontend && npm run build --prefix frontend"git add .
git commit -m "Deploy to Heroku"
git push heroku mainheroku config:set NODE_ENV=production
heroku config:set PORT=5000
heroku config:set MONGO_URI=your_mongodb_uri
heroku config:set JWT_SECRET=your_jwt_secret
heroku config:set PAYPAL_CLIENT_ID=your_paypal_client_idheroku logs --tailYou can check the API documentation here.
This project is licensed under the MIT License.
© 2020 Yavar Guliyev