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

https://github.com/cyber-security-tech/ecommerce-web-app

Full-stack Flask eCommerce app with Stripe payments, wishlist system, admin panel, product reviews, and responsive UI. Built for portfolio demonstration and real-world web development practice.
https://github.com/cyber-security-tech/ecommerce-web-app

bootstrap cart ecommerce flask flask-login flask-sqlalchemy flask-wtf fullstack portfolio python sqlite stripe webapp wishlist

Last synced: 2 months ago
JSON representation

Full-stack Flask eCommerce app with Stripe payments, wishlist system, admin panel, product reviews, and responsive UI. Built for portfolio demonstration and real-world web development practice.

Awesome Lists containing this project

README

        

# ๐Ÿ›๏ธ Flask E-Commerce Web App โ€“ ShopNow

A professional full-stack e-commerce platform built with Flask, designed for learning and portfolio use. Features include Stripe checkout, user authentication, cart management, wishlist, admin panel, and order history.

---

## ๐Ÿงพ Overview

**ShopNow** is a full-featured online shopping platform built using Flask. It supports browsing products, managing a cart and wishlist, secure checkout via Stripe, and includes a role-protected admin panel for managing inventory. Built as a portfolio project to demonstrate end-to-end web app development.

---

## ๐Ÿ“ธ Screenshots

### Homepage
![Homepage](media/screenshots/homepage.png)

### Product Detail
![Product Detail](media/screenshots/product_detail.png)

### Cart
![Cart](media/screenshots/cart.png)

### Stripe Checkout
![Stripe Checkout](media/screenshots/stripe_checkout.png)

### Checkout Success
![Checkout Success](media/screenshots/checkout_success.png)

### Order History
![Orders](media/screenshots/orders.png)

### Wishlist
![Wishlist](media/screenshots/wishlist.png)

---

## โœจ Features

- ๐Ÿ” User registration, login, logout
- ๐Ÿ‘ค Profile editing (address and preferences)
- ๐Ÿ›๏ธ Product catalog with search, filter, and sort
- ๐Ÿ›’ Add to cart, update quantity, remove items
- ๐Ÿ’ณ Stripe Checkout integration
- ๐Ÿ“ฆ Order history with timestamp and totals
- โค๏ธ Wishlist with add/remove
- ๐Ÿ’ฌ Product reviews with rating
- ๐Ÿ› ๏ธ Admin panel to add, edit, and delete products
- ๐Ÿ”’ Role-based route protection

---

## ๐Ÿ› ๏ธ Tech Stack

- **Backend**: Flask, Flask-SQLAlchemy, Flask-WTF, Flask-Login, Flask-Migrate
- **Frontend**: Jinja2 Templates, Bootstrap 5, HTML/CSS
- **Payments**: Stripe API (Test Mode)
- **Database**: SQLite (via SQLAlchemy)
- **Auth**: Session-based using Flask-Login
- **Environment**: Python-dotenv

---

## ๐Ÿ“š What I Learned

- Structuring Flask apps with blueprints and application factory
- Building secure user authentication flows
- Integrating Stripe Checkout API with Flask
- Managing cart, orders, and wishlist logic in a real-world app
- Building admin CRUD panels with form validation
- Writing modular, maintainable, and production-style Python

---

## ๐Ÿ“ Project Structure

```
ecommerce_web_app/
โ”‚
โ”œโ”€โ”€ app/
โ”‚ โ”œโ”€โ”€ __init__.py
โ”‚ โ”œโ”€โ”€ models.py
โ”‚ โ”œโ”€โ”€ routes.py
โ”‚ โ”œโ”€โ”€ forms.py
โ”‚ โ”œโ”€โ”€ context_processors.py
โ”‚ โ”œโ”€โ”€ templates/
โ”‚ โ””โ”€โ”€ static/
โ”‚
โ”œโ”€โ”€ media/
โ”‚ โ””โ”€โ”€ screenshots/
โ”‚
โ”œโ”€โ”€ .env.example
โ”œโ”€โ”€ config.py
โ”œโ”€โ”€ run.py
โ”œโ”€โ”€ requirements.txt
โ””โ”€โ”€ README.md
```

---

## ๐Ÿš€ How to Run Locally

1. **Clone the repo**
```bash
git clone https://github.com/your-username/ecommerce-web-app.git
cd ecommerce-web-app
```

2. **Create a virtual environment**
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```

3. **Install dependencies**
```bash
pip install -r requirements.txt
```

4. **Create your `.env` file**
Rename `.env.example` to `.env` and fill in your values.

5. **Run the app**
```bash
python run.py
```

---

## ๐Ÿ”‘ Environment Variables

Your `.env` file should look like this:

```env
SECRET_KEY=your_secret_key_here
DATABASE_URL=sqlite:///instance/ecommerce.db

STRIPE_PUBLIC_KEY=your_test_public_key_here
STRIPE_SECRET_KEY=your_test_secret_key_here
```

You can use [Stripe's test keys](https://stripe.com/docs/testing#international-cards) to simulate payments.

---

## ๐Ÿ”ฎ Future Improvements

- โœ‰๏ธ Email confirmation and password reset
- ๐Ÿ“Š Admin analytics dashboard (sales, orders, etc.)
- ๐ŸŒ„ Product image uploads with Cloudinary or local storage
- ๐Ÿงพ PDF invoice export on order confirmation
- ๐Ÿ” AJAX search or live filtering

---