Skip to content

About

A modern full-stack e-commerce platform for Bangladesh with product management, shopping cart, wishlist, order tracking, admin dashboard, and local payment gateway integration.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

58 Commits

Folders and files

Repository files navigation

Discount Store BD πŸ›οΈπŸ‡§πŸ‡©

License: MIT Build Status PRs Welcome

Discount Store BD is a modern e-commerce platform built for customers across Bangladesh, offering quality products at competitive prices with a simple, fast, and responsive shopping experience.

πŸ”— Live Website: https://discountstorebd.com/


πŸš€ Features

  • πŸ›οΈ Product Catalog β€” Browse products across multiple categories.
  • πŸ”Ž Search & Filtering β€” Search by keyword, category, price, and discounts.
  • πŸ›’ Shopping Cart β€” Add products, update quantities, and manage cart items.
  • ❀️ Wishlist β€” Save products for later.
  • πŸ’³ Multiple Payment Methods β€” COD, bKash, Nagad, Rocket, and SSLCommerz.
  • πŸ“¦ Order Management β€” Place, track, and manage orders.
  • πŸ”” Order Notifications β€” Receive updates about order status.
  • πŸ‘¨β€πŸ’Ό Admin Dashboard β€” Manage products, inventory, orders, and promotions.
  • πŸ“± Responsive Design β€” Optimized for mobile, tablet, and desktop.
  • ⚑ Fast Performance β€” Designed for reliable performance across Bangladesh.

πŸ› οΈ Tech Stack

Frontend

  • Next.js / React.js
  • JavaScript
  • Tailwind CSS / Bootstrap
  • Redux Toolkit / Context API

Backend

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose
  • JWT Authentication

Payment & Services

  • SSLCommerz
  • bKash Merchant API
  • Nagad API
  • Rocket
  • SMS Gateway

Tools & Deployment

  • Git & GitHub
  • Postman
  • VS Code
  • Vercel
  • DigitalOcean
  • MongoDB Atlas

πŸ“ Project Structure

discount-store-bd/
β”‚
β”œβ”€β”€ client/
β”‚   β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ context/
β”‚   β”‚   └── utils/
β”‚   β”‚
β”‚   β”œβ”€β”€ .env.local
β”‚   └── package.json
β”‚
β”œβ”€β”€ server/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   └── utils/
β”‚   β”‚
β”‚   β”œβ”€β”€ .env
β”‚   └── package.json
β”‚
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
└── README.md

πŸš€ Getting Started

Prerequisites

Make sure you have the following installed:

  • Node.js v18 or higher
  • npm v9 or higher
  • Git
  • MongoDB or MongoDB Atlas
  • VS Code or another code editor

πŸ“₯ Installation

1. Clone the Repository

git clone https://github.com/your-username/discountstorebd.git
cd discountstorebd

2. Install Frontend Dependencies

cd client
npm install

3. Install Backend Dependencies

cd ../server
npm install

πŸ” Environment Variables

Backend

Create:

server/.env

Add:

PORT=5000
NODE_ENV=development

MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/discountstorebd

JWT_SECRET=your_jwt_secret_key

# SSLCommerz
SSLCOMMERZ_STORE_ID=your_store_id
SSLCOMMERZ_STORE_PASSWORD=your_store_password

# bKash
BKASH_APP_KEY=your_bkash_app_key
BKASH_APP_SECRET=your_bkash_app_secret
BKASH_USERNAME=your_bkash_username
BKASH_PASSWORD=your_bkash_password

Frontend

Create:

client/.env.local

Add:

NEXT_PUBLIC_API_BASE_URL=http://localhost:5000/api
NEXT_PUBLIC_SITE_URL=http://localhost:3000

⚠️ Never commit .env or .env.local files to GitHub.


▢️ Run the Application

Start Backend

cd server
npm run dev

Backend:

http://localhost:5000

Start Frontend

Open a new terminal:

cd client
npm run dev

Frontend:

http://localhost:3000

πŸ”Œ API Endpoints

Method Endpoint Description Access
GET /api/products Get all products Public
GET /api/products/:id Get product details Public
POST /api/users/register Register user Public
POST /api/users/login Login user Public
GET /api/users/profile Get user profile Private
POST /api/orders Create order Private
GET /api/orders Get user orders Private
GET /api/orders/:id Get order details Private
POST /api/payment/init Initialize payment Private
PUT /api/orders/:id/status Update order status Admin

πŸ’³ Payment Flow

Customer
   β”‚
   β–Ό
Shopping Cart
   β”‚
   β–Ό
Checkout
   β”‚
   β–Ό
Select Payment Method
   β”‚
   β”œβ”€β”€ Cash on Delivery
   β”œβ”€β”€ bKash
   β”œβ”€β”€ Nagad
   β”œβ”€β”€ Rocket
   └── SSLCommerz
   β”‚
   β–Ό
Payment Processing
   β”‚
   β–Ό
Payment Verification
   β”‚
   β–Ό
Order Confirmation
   β”‚
   β–Ό
Order Tracking

πŸ“¦ Order Status

Orders can move through the following stages:

Pending
   ↓
Confirmed
   ↓
Processing
   ↓
Shipped
   ↓
Out for Delivery
   ↓
Delivered

Additional statuses:

  • Cancelled
  • Failed
  • Returned

πŸ”’ Security

The application implements several security practices:

  • JWT-based authentication
  • Password hashing
  • Protected API routes
  • Role-based authorization
  • Input validation
  • Secure environment variables
  • CORS configuration
  • Protected admin routes
  • Payment verification

πŸ“œ Available Scripts

Frontend

npm run dev

Start development server.

npm run build

Create production build.

npm run start

Start production server.

npm run lint

Run ESLint.

Backend

npm run dev

Start development server.

npm start

Start production server.


πŸš€ Deployment

Frontend

Recommended platforms:

  • Vercel
  • Netlify
  • AWS
  • DigitalOcean

Backend

Recommended platforms:

  • DigitalOcean
  • AWS
  • Render
  • Railway
  • VPS

Database

  • MongoDB Atlas
  • Self-hosted MongoDB

🀝 Contributing

Contributions are welcome!

Steps

  1. Fork the repository.
  2. Create a feature branch:
git checkout -b feature/AmazingFeature
  1. Make your changes.
  2. Commit your changes:
git commit -m "Add AmazingFeature"
  1. Push your branch:
git push origin feature/AmazingFeature
  1. Open a Pull Request.

πŸ› Issues

If you find a bug or have a feature request, please open an issue and provide:

  • Clear description of the issue
  • Steps to reproduce
  • Expected behavior
  • Actual behavior
  • Screenshots, if applicable

πŸ“„ License

This project is licensed under the MIT License.

See the LICENSE file for details.


πŸ“ž Contact

Discount Store BD

🌐 Website: https://discountstorebd.com/

πŸ“§ Email: support@discountstorebd.com

πŸ“ Location: Dhaka, Bangladesh


⭐ Support

If you find this project useful, please consider giving the repository a ⭐ on GitHub.

Built with ❀️ in Bangladesh πŸ‡§πŸ‡©

About

A modern full-stack e-commerce platform for Bangladesh with product management, shopping cart, wishlist, order tracking, admin dashboard, and local payment gateway integration.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages