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

https://github.com/budaala/pawww-store

MERN-based online store for pet accessories ๐Ÿถ Includes image upload, stock tracking & API.
https://github.com/budaala/pawww-store

e-commerce express mern-stack mongodb mui nodejs pets react stripe

Last synced: 3 months ago
JSON representation

MERN-based online store for pet accessories ๐Ÿถ Includes image upload, stock tracking & API.

Awesome Lists containing this project

README

          

# ๐Ÿพ Pawww Store โ€“ Pet Supplies Web App

Pawww Store is a full-stack web application for selling pet accessories, built with the **MERN stack** (MongoDB, Express, React, Node.js). It allows users to browse products, place orders, and manages inventory stock automatically.

## โœจ Features

- ๐Ÿ›’ Product listing with name, price, image, and stock
- โœ… Order submission with stock auto-update
- ๐Ÿงพ RESTful API powered by Express & MongoDB
- ๐Ÿ“ฆ Simple JSON-based order input (no frontend required initially)

## ๐Ÿ”ง Tech Stack

- **Frontend**: React (coming soon)
- **Backend**: Node.js, Express.js
- **Database**: MongoDB + Mongoose
- **Environment Management**: dotenv

## ๐Ÿš€ Getting Started

### 1. Clone the repository

```bash
git clone https://github.com/budaala/pawww-store.git
cd pawww-store
```

### 2. Install dependencies

```bash
npm install
```

### 3. Configure environment variables

Create a .env file:

```bash
PORT=5000
MONGO_URL=mongodb://localhost:27017/pawww-store
```

### 4. Run the backend server

```bash
npm run dev
```

The backend runs at: http://localhost:5000

## ๐Ÿ“ฌ API Endpoints

### ๐Ÿ›๏ธ GET /api/products

Returns a list of all products.

### ๐Ÿงพ POST /api/orders

Submits an order and updates product stock. Example payload:

```json
{
"items": [
{
"productId": "666a1b6f7a1b2c3d4e5f6789",
"name": "PawPodusia",
"price": 59.90,
"quantity": 2
}
],
"totalPrice": 119.80
}
```

## ๐Ÿ“ Project Structure

```bash
pawww-store/
โ”œโ”€โ”€ model/
โ”‚ โ”œโ”€โ”€ productModel.js
โ”‚ โ””โ”€โ”€ orderModel.js
โ”œโ”€โ”€ routes/
โ”‚ โ”œโ”€โ”€ productRoute.js
โ”‚ โ””โ”€โ”€ orderRoute.js
โ”œโ”€โ”€ controllers/
โ”‚ โ”œโ”€โ”€ productController.js
โ”‚ โ””โ”€โ”€ orderController.js
โ”œโ”€โ”€ uploads/
โ”‚ โ””โ”€โ”€ (product images)
โ”œโ”€โ”€ index.js
โ””โ”€โ”€ .env
```

## ๐Ÿ’ก Future Ideas
โ€ข ๐Ÿงฉ Full React frontend with Tailwind
โ€ข ๐Ÿ›’ LocalStorage-based shopping cart
โ€ข ๐Ÿ” User authentication (JWT)
โ€ข โœ‰๏ธ Email notifications on order confirmation
โ€ข ๐Ÿ“Š Admin dashboard for product/order management

## ๐Ÿถ Author

Made with โค๏ธ for pets and coding.