Digichera
A multi-vendor marketplace where sellers run their own stores and customers check out once — the cart is split into one order per vendor automatically.
- My role
- Sole developer
- Type
- Personal project
- Links
- GitHub
Digichera started as a playful idea: a store filled with the strangest and most interesting products that have ever been bought and sold. It grew into a Django-based multi-vendor marketplace, in the spirit of platforms like Digikala or Basalam.
Anyone can sign up with just a phone number and choose a role — customer or seller. Sellers open a storefront and list products; customers add items from several stores to one cart, and at checkout that cart is split into one order per store, with stock checked against every item before any order is created.
The codebase is organised as small, decoupled Django apps instead of one monolith — each app owns a single concern.
What I did
-
Phone-based authentication: Custom user model
with no username or email required;
customerandsellerroles are chosen by users at registration, whilestaffaccess is managed securely via the Django admin panel. -
Multi-vendor checkout: one cart split into a separate
Orderper store, each with its own order items and a shipping-address snapshot taken from the customer's profile -
Stock-safe checkout: the whole view runs inside
transaction.atomic(), re-checks every item's stock right before creating orders, and locks product rows withselect_for_update()on PostgreSQL - Guest carts stored in the session that transparently merge into the user's cart on login or registration
-
Order lifecycle
pending → paid → shipped → delivered, with sellers limited to valid status transitions on their own store's orders - Seller storefronts with auto-generated slugs and logos compressed and resized with Pillow
- Nested product categories with cycle protection (a category can't become its own ancestor) and cascading soft-delete
- Products with multiple images, a designated primary image and automatic thumbnailing, plus search and category filtering
-
Access control through decorators (
store_required,store_owner_required) on store and product management views
Project structure
Each app owns one concern:
-
core— shared abstract models and access-control decorators -
user— custom phone-based user model and auth views -
account— customer profile — address, postal code, avatar store— seller storefronts-
product— categories, products and product images cart— guest and user shopping cart-
order— checkout, orders, order items, status transitions -
page— home, about, contact and the payment page
Testing
I'm covering the project with pytest-django and
factory-boy. Done so far: test infrastructure with
isolated settings, shared fixtures and per-app factories; the
access-control decorators; the custom user manager, phone
validator and profile signal; registration, login and logout views
including guest-cart merging; and the profile model and form.
Tests for the store, product, cart and order apps — including
atomic checkout and stock validation — are next.
What's next
- Payment gateway integration — checkout currently uses a mock that marks orders as paid immediately
- Pagination, seller-side product deletion and seller dashboards beyond the Django admin
- Caching and rate-limiting on auth and checkout endpoints
- CI with GitHub Actions and coverage reporting; a REST API layer for a decoupled frontend