A full-stack fashion e-commerce storefront for **Bang Fashion Online Shop**, based in eMalahleni, South Africa. Customers browse the collection, select sizes and quantities, and complete orders via WhatsApp or Paystack. The backend persists products, orders, and newsletter subscribers in PostgreSQL.
# Bang Fashion — Elegance Redefined
> *"Step into our world of creativity and individuality, where each garment is crafted with passion and purpose."*
A full-stack fashion e-commerce storefront for **Bang Fashion Online Shop**, based in eMalahleni, South Africa. Customers browse the collection, select sizes and quantities, and complete orders via WhatsApp or Paystack. The backend persists products, orders, and newsletter subscribers in PostgreSQL.
---
## Table of Contents
- Project Structure
- Tech Stack
- Prerequisites
- Getting Started
- Environment Variables
- Database Setup
- Running the Server
- API Reference
- Frontend Features
- Deployment
- Useful DB Queries
- Contact
---
## Project Structure
```
bang-fashion/
├── index.html # Single-page storefront (HTML + CSS + JS)
├── server.js # Node.js / Express backend
├── bang_fashion_db_v2.sql # PostgreSQL schema + seed data
├── .env # Environment variables (do NOT commit this)
├── package.json # Node dependencies
└── images/ # Local product + lookbook images
```
---
## Tech Stack
| Layer | Technology |
|---|---|
| Frontend | Vanilla HTML, CSS, JavaScript (single file) |
| Backend | Node.js, Express |
| Database | PostgreSQL |
| Images | Cloudinary (hosted) + local `/images` folder |
| Payments | Paystack (external link) |
| Orders | WhatsApp API (`wa.me` deep link) |
| Deployment | Any Node-capable host (Railway, Render, VPS) |
---
## Prerequisites
Make sure you have the following installed:
- **Node.js** v18 or later — nodejs.org
- **PostgreSQL** v13 or later — postgresql.org
- **npm** (comes with Node.js)
---
## Getting Started
### 1. Clone or copy the project
```bash
# If using Git
git clone
github.com
cd bang-fashion
# Or just make sure these files are in the same folder:
# index.html, server.js, bang_fashion_db_v2.sql
```
### 2. Install dependencies
```bash
npm init -y
npm …