Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/akabaytar/mernshop-ecommerce

E-Commerce platform built with the MERN stack & Redux Toolkit.
https://github.com/akabaytar/mernshop-ecommerce

express mern-project mongodb-atlas mongoose react react-query react-redux-toolkit react-router-dom redux rest-api

Last synced: about 1 month ago
JSON representation

E-Commerce platform built with the MERN stack & Redux Toolkit.

Awesome Lists containing this project

README

        

# Mern Shop | eCommerce Platform

- E-Commerce platform built with the MERN stack & Redux Toolkit.

## Features

- Product reviews and ratings
- Top products carousel
- Product pagination
- Product search feature
- User profile with orders
- Admin product management
- Admin user management
- Admin Order details page
- Mark orders as delivered option
- Checkout process (shipping, payment method etc.)
- Database seeder (products & users)

## Usage

1) Create a [MongoDB database](https://www.mongodb.com/cloud/atlas/register) and obtain your `MongoDB URI`.

#### Env Variables

2) Create the `.env` file with following variables:

```
NODE_ENV = development
PORT = 5000
MONGO_URI = [MONGO_DB_URI]
JWT_SECRET = [SECRET]
PAGINATION_LIMIT = 6
```

3) Change the `JWT_SECRET` and `PAGINATION_LIMIT` to what you want.

#### Install Dependencies

```
npm install
cd frontend
npm install
```

#### Run

```

# Run frontend (:5173) & backend (:5000)
npm run dev

# Run backend only
npm run server
```

#### Build & Deploy

```
# Create frontend prod build
cd frontend
npm run build
```

#### Seed Database

4) You can use the following commands to seed the database with some sample users and products as well as destroy all data.

```
# Import data
npm run data:import

# Destroy data
npm run data:destroy
```

```
# Sample User Logins

Email: [email protected] (Admin)
Password: secret

Email: [email protected] (Customer)
Password: john_secret

Email: [email protected] (Customer)
Password: jane_secret
```

---

## License

This project is licensed under the [MIT License](./LICENSE).