Live Production System · Case Study

Hardware Lab — Technical Implementation

This is a fully operational e-commerce platform I designed and engineered as a live portfolio piece. It serves as a production environment for testing secure payment flows, real-time inventory management, and global logistics automation. The frontend is built on Cloudflare Pages with a Supabase (PostgreSQL) backend, integrating both Stripe (international card payments) and the Safaricom Daraja API (M-Pesa STK Push) for dual-currency checkout — a pattern common in African FinTech systems. Every product listing is fetched dynamically from Supabase with Row Level Security policies enforced at the database layer.

Cloudflare Pages Supabase PostgreSQL Row Level Security Stripe / M-Pesa Daraja DHL Express API Vanilla JS ES2022 localStorage Cart Real-Time Order Tracking
2
Payment Gateways
3
Shipping Zones
RLS
DB Security Layer
100%
Serverless Infra
// Engineer-curated developer hardware · Enterprise-grade refurbished & new

Sustainable Hardware Catalogue

Each item below is personally evaluated for developer workload performance, Linux compatibility, and long-term reliability. Specifications are drawn from manufacturer datasheets and independent benchmark sources.

Enterprise-grade refurbished
DHL Express international
Secure M-Pesa & Stripe checkout
Real-time order tracking
// Catalogue — filter by category
Loading products…
// Logistics API — order state machine

Order Status Portal

Each order transitions through four states stored in Supabase. Enter your Order ID and email to query the current state and retrieve the DHL tracking reference.

Showing status for order

📋
Processing
📦
Shipped
🚚
In Transit
Delivered
Status
Carrier
Tracking Number
Last Updated
🚚
Nairobi Metro — 24 Hours
Local courier · KES 300
🇰🇪
Rest of Kenya — 3–5 Days
G4S / Wells Fargo · KES 600
✈️
International — 3–7 Days
DHL Express (tracked) · USD 35
📱
Stripe & M-Pesa Daraja
PCI-compliant · dual currency
// System Design — How This Platform Works

Technical Architecture

This platform is designed as a modern JAMstack application demonstrating production-level patterns relevant to senior software engineering roles. The following components form the core of the system.

🗄️
// Layer 1 — Data

Supabase (PostgreSQL)

Products, orders, returns and reviews are persisted in a normalised relational schema with Row Level Security (RLS) policies enforced at the database layer. Anon users can read active inventory; only authenticated service roles may write order state.

  • RLS policies per table
  • Real-time subscriptions (orders)
  • Indexed on active + created_at
💳
// Layer 2 — Payments

Dual-Gateway Checkout

Stripe handles international card payments via the Elements SDK. M-Pesa payments use the Safaricom Daraja STK Push API, triggering a payment prompt on the customer's handset. A Cloudflare Worker serves as the callback receiver, updating order state in Supabase upon confirmation.

  • Stripe Elements (PCI DSS)
  • M-Pesa Daraja OAuth 2.0
  • Worker callback → DB update
🚚
// Layer 3 — Logistics

Intelligent Shipping Engine

Shipping cost and carrier selection are computed client-side based on a zone lookup table (Nairobi / Rest of Kenya / International). DHL Express is integrated for tracked international fulfilment. The order tracking portal queries Supabase for live state transitions (Processing → Shipped → In Transit → Delivered).

  • Zone-based cost calculation
  • DHL tracking reference storage
  • 4-state order machine
🔐
// Layer 4 — Security

Authentication & Authorisation

Supabase Auth provides email/password and Google OAuth 2.0 flows. Checkout fields are pre-filled from authenticated user metadata, reducing friction. The admin gateway uses session-scoped PIN + Supabase service role — a pattern appropriate for low-traffic internal tooling while a full RBAC system is overkill.

  • Supabase Auth (JWT)
  • Google OAuth 2.0
  • RLS + service role separation
Technical Consultation