Case Study // Marketplace / Backend Engineering

Instasew

Fashion Marketplace Platform & Backend Architecture

Role / OwnershipBackend / Full-Stack Engineer
Timeline2024 – Present
StatusProduction Platform (~200 Users)
Architecture ScopeMarketplace

01 // System Overview

What The System Does

Instasew is a global fashion marketplace platform designed to bridge the gap between bespoke fashion designers, end clients, and international logistics providers. The platform requires high-reliability transaction workflows, complex order state machines, escrow-backed wallet payouts, real-time messaging, and multi-carrier shipping logistics.

A multi-sided marketplace platform with a Python/Django backend handling catalog management, negotiation and bidding workflows, transactional escrow wallets, DHL shipping integration, and background processing via Redis & Celery.

02 // Architecture & Data Flow

End-to-End System Design

Client (Web / Mobile App)
          │
          ▼  HTTPS / TLS
┌─────────────────────────────────────────┐
│     AWS CloudFront / Nginx Proxy        │
└───────────────────┬─────────────────────┘
                    │
                    ▼
┌─────────────────────────────────────────┐
│  Django REST Framework API Application  │
│  (Auth, Orders, Bids, Escrow, Wallets)  │
└───────┬───────────┬───────────┬─────────┘
        │           │           │
        ▼           ▼           ▼
┌──────────────┐ ┌────────┐ ┌───────────────────────┐
│  PostgreSQL  │ │ Redis  │ │ Third-Party Services  │
│  (ACID DB)   │ │ Queue  │ │ • Stripe & PayPal     │
└──────────────┘ └────┬───┘ │ • DHL Shipping API    │
                      │     │ • AWS S3 Media Bucket │
                      ▼     └───────────────────────┘
          ┌───────────────────────┐
          │ Celery Async Workers  │
          │ (Payouts, Webhooks)   │
          └───────────────────────┘

03 // Engineering Ownership

What I Personally Built

Owned backend architecture and production delivery for the marketplace platform.
Built and maintained Django and Django REST Framework services, ensuring clean RESTful API standards.
Designed PostgreSQL relational schemas, indexes, and transactional guarantees for orders, bids, and user roles.
Implemented asynchronous background processing using Redis and Celery for order status automation, reminders, and notifications.
Engineered a dynamic 'Preferred Designer' bidding and negotiation engine with automated fee recalculations.
Overhauled financial systems, integrating Stripe, PayPal, BNPL, and custom ledger wallets with balance reconciliation.
Integrated DHL real-time shipping rate calculation, label generation, and manual carrier tracking fallback.
Supported AWS production infrastructure and testing environments, maintaining system reliability for ~200 active users.

04 // Technical Problems Solved

Engineering Challenges & Solutions

Challenge 01

Handling complex multi-party order lifecycle states (Draft -> Bid -> Escrow Locked -> Production -> Shipped -> Completed -> Payout Released) without race conditions.

Engineering Solution

Implemented an explicit database-backed finite state machine (FSM) utilizing PostgreSQL row-level locks (SELECT FOR UPDATE) on critical order transitions to prevent concurrent mutation.

Challenge 02

Third-party courier API latencies (DHL tracking and rate quoting) degrading client response times.

Engineering Solution

Decoupled shipping quote refreshes and webhook event tracking into asynchronous Celery background tasks with Redis result caching, reducing synchronous API response times by over 60%.

Challenge 03

Financial integrity across multi-currency deposits, platform commissions, and delayed creator payouts.

Engineering Solution

Architected a double-entry ledger database pattern for internal user wallets, separating available balance from escrowed funds and verifying zero-sum consistency prior to executing automated payouts.

05 // Trade-offs

Key Architectural Decisions

  • Selected Django and Django REST Framework for robust ORM data validation, mature security middlewares, and rapid schema modeling.
  • Used Celery with Redis for background tasks to keep user-facing request cycles snappy and resilient to external API failures.
  • Deployed on AWS with isolated S3 private buckets and pre-signed URLs to protect sensitive user verification and contract documents.

Technologies Used

PythonDjangoDjango REST FrameworkPostgreSQLRedisCeleryAWS S3AWS EC2StripePayPalDHL APIDocker

Explore Other Work

Next Case Study

NexaPay

Cross-Chain Blockchain Payment Platform

Read Next