Full web marketplace to buy and sell products, with secure online payments and buyer and seller accounts.
Full product CRUD | Buyer & seller roles | Stripe payments | 2 languages (EN / ES)
- Project description
- Features
- Architecture
- Tech stack
- Project structure
- Data model
- API endpoints
- Getting started
- Environment variables
- Make commands
- Roadmap
- Contributing
Looping Marketplace is a full web application designed for buying and selling products. It ships with a complete CRUD system and integrates Stripe as a payment gateway.
The application is fully functional for real use. Users can create an account and start browsing and purchasing products immediately. To become a seller, users pay a one-time fee that unlocks the seller role and lets them list and manage their own products.
- Full CRUD system for products
- User authentication and role management (buyer / seller)
- One-time upgrade to become a seller
- Stripe payment integration (single and multi-item checkout)
- Favorites and shopping cart
- Product image storage on Supabase
- PostgreSQL database (SQLite fallback for local development)
- Responsive UI built with Bootstrap
- Custom error pages (400 / 403 / 404 / 500) and centralized logging
Looping Marketplace is a server-side rendered Django monolith. Django serves both the business logic and the HTML (Django templates + Bootstrap); external services handle payments, image storage and the database.
┌──────────────────────────────┐
Browser ───────▶│ Django (MarketPlace app) │
(Bootstrap UI, │ ────────────────────────── │
Stripe.js, │ urls.py → routing │
SweetAlert2) │ views.py → business logic │
│ models.py → ORM │
│ templates → server-side HTML│
└───────┬───────┬───────┬──────┘
│ │ │
┌──────────────┘ │ └──────────────┐
▼ ▼ ▼
┌───────────────┐ ┌────────────────┐ ┌────────────────┐
│ PostgreSQL │ │ Stripe │ │ Supabase │
│ (Supabase / │ │ Checkout & │ │ Storage bucket │
│ SQLite local)│ │ payments │ │ product images │
└───────────────┘ └────────────────┘ └────────────────┘
Request flow
- A user registers / logs in → Django auth creates the account, and a
post_savesignal creates the matchingUserProfile. - A seller creates a product → the image is uploaded to the Supabase
products_imagesbucket and its public URL is stored on theProduct. - A buyer purchases → a Stripe Checkout session is created → Stripe redirects back to a success URL → the order is recorded.
- Favorites and cart are stored as relations on
UserProfile.
| Layer | Technology |
|---|---|
| Web framework | Django 6.0 (Python 3.12) |
| Frontend | Django templates + Bootstrap 5.3, Stripe.js, SweetAlert2 |
| Database | PostgreSQL (via dj-database-url) · SQLite fallback in local dev |
| Image storage | Supabase Storage |
| Payments | Stripe Checkout |
| Auth | Django authentication + profile signals |
| Package manager | uv |
| Containerization | Docker / Docker Compose |
| Tooling | Make |
MarketPlace/
├── Makefile # Dev commands (install, dev, migrate, docker-up...)
├── README.md / README.es.md # Documentation (EN / ES)
├── backend/
│ ├── manage.py # Django CLI entry point
│ ├── pyproject.toml # uv project + dependencies
│ ├── requirements.txt # pip dependencies (alternative)
│ ├── Dockerfile # Server image
│ ├── docker-compose.yml # Server service on port 8000
│ ├── MarketPlace/ # Django project package
│ │ ├── settings.py # Global config (apps, DB, Stripe, logging)
│ │ ├── urls.py # Root router (all endpoints)
│ │ ├── views.py # All platform views
│ │ ├── models.py # Product, UserProfile, Location, Favorite, Order, ShoppingCart
│ │ ├── forms.py # Django forms
│ │ ├── admin.py # Django admin registration
│ │ ├── error_views.py # 400 / 403 / 404 / 500 handlers
│ │ └── error_handlers.py # Error middleware
│ ├── services/ # External integrations
│ │ ├── stripe_service.py # Stripe configuration
│ │ └── supabase.py # Supabase client (image storage)
│ ├── config_logs/ # Centralized logging config
│ ├── templates/ # Server-side HTML (main, product_detail, login, profile...)
│ └── static/ # Bootstrap CSS/JS and images
└── frontend/ # Static HTML mockups (reference, not wired to the app)
| Model | Purpose | Key relations |
|---|---|---|
UserProfile |
Extends Django User; is_premium marks a seller |
1:1 User, FK Location, M2M Product (favorites) |
Location |
City / country of a user or product | referenced by UserProfile and Product |
Product |
Item listed for sale | FK seller (UserProfile), FK Location |
Order |
Completed purchase (buyer ≠ seller) | FK buyer, FK seller, FK product |
Favorite |
Saved product | FK UserProfile, FK Product (unique together) |
ShoppingCart |
Cart line | FK UserProfile, FK Product (unique together) |
A
UserProfileis created automatically for every newUservia apost_savesignal. A user becomes a seller whenis_premium = True(set after the upgrade payment).
| Route | Name | Purpose |
|---|---|---|
/ |
main_page |
Product catalog |
/product/<id>/ |
product_detail |
Product detail page |
/product/new/ |
create_product |
Create a listing |
/product/buy/<id>/ |
acquire_product |
Complete a purchase |
/product/delete/<id>/ |
delete_product |
Remove a listing |
/register/ · /login/ · /logout/ |
auth | Account access |
/profile/ |
user_profile |
Purchases, sales and favorites |
/profile/upgrade/ |
upgrade_to_seller |
Become a seller |
/favorites/ · /toggle-favorites/<id>/ |
favorites | Manage favorites |
/shopping-cart/ · /toggle-shopping-cart/<id>/ |
cart | Manage cart |
/create-checkout-session/<id>/ |
create_checkout_session |
Single-item Stripe checkout |
/create-multi-checkout/ |
create_multi_checkout |
Multi-item Stripe checkout |
/create-upgrade-session/ |
create_upgrade_session |
Seller upgrade checkout |
/about/ · /contact/ · /info/ |
static pages | Informational pages |
/admin/ |
— | Django admin |
- Python 3.12+
- uv (recommended) — or pip
- Make (preinstalled on macOS/Linux; on Windows use WSL or run the raw commands)
- Docker Desktop (optional)
- Git
Clone the repository first:
git clone https://github.com/Bootcamp-IA-P6/MarketPlace.git
cd MarketPlaceFrom the project root:
make devThis installs dependencies with uv, applies migrations and starts the server at http://localhost:8000.
cd backend
uv sync # create .venv and install dependencies
uv run python manage.py migrate # set up the database
uv run python manage.py runserver # start at http://localhost:8000Without uv (plain venv + pip)
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python manage.py migrate
python manage.py runserverPowerShell with uv (recommended):
cd backend
uv sync
uv run python manage.py migrate
uv run python manage.py runserverWithout uv (plain venv + pip)
cd backend
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver
makeis not available on Windows by default. Use the commands above, or run the project inside WSL to usemake dev.
Pull and run the published image (no clone needed):
docker pull iruperth/looping:latest
docker run -d -p 8000:8000 iruperth/looping:latestOr build from source with Docker Compose:
cd backend
docker compose up --build # add -d to run in the background
docker compose down # stopCreate a backend/.env file. For local development everything has a safe default, so an empty/minimal file already works (SQLite is used and payments/storage are disabled).
# Django
DJANGO_SECRET_KEY=change-me-in-production
DJANGO_DEBUG=True
# Database — omit to use the local SQLite fallback
DATABASE_URL=postgresql://user:password@host:5432/marketplace
# Stripe — leave empty to disable real payments
STRIPE_PUBLIC_KEY=pk_test_xxx
STRIPE_SECRET_KEY=sk_test_xxx
STRIPE_WEBHOOK_SECRET=whsec_xxx
# Supabase — leave empty to disable image uploads
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key| Variable | Required | Default / effect |
|---|---|---|
DJANGO_SECRET_KEY |
Production | Insecure dev key if unset |
DJANGO_DEBUG |
No | True in local dev |
DATABASE_URL |
Production | SQLite (db.sqlite3) if unset |
STRIPE_PUBLIC_KEY |
For payments | Test placeholder if unset |
STRIPE_SECRET_KEY |
For payments | Empty → checkout disabled |
STRIPE_WEBHOOK_SECRET |
For webhooks | Empty |
SUPABASE_URL |
For image upload | Empty → storage disabled |
SUPABASE_SERVICE_ROLE_KEY |
For image upload | Empty → storage disabled |
make help # list all available targets
make install # create the virtual environment and install dependencies (uv sync)
make dev # install + migrate + run the development server
make run # start the server (no sync / migrate)
make migrate # apply database migrations
make makemigrations # generate new migrations
make superuser # create a Django admin user
make shell # open the Django shell
make collectstatic # collect static files
make test # run the test suite
make clean # remove Python cache files
make docker-up # docker compose up --build
make docker-down # docker compose down- Real-time chat between buyers and sellers
- Optional paid promotion to highlight products at the top of the marketplace
- Discount coupons for frequent buyers
- Automated notifications for order updates, chat messages and low-stock alerts
- Long-term goal: native mobile application
We welcome contributions to improve Looping Marketplace. If you would like to collaborate, please open a pull request and our team will review it.

