Back to Work Archive
◈፪
CASE STUDY 02

Zembil E-Commerce

Modern Multi-Gateway Digital Marketplace

ROLEFullstack Architecture & Payment Engineer — Modeled relational schema in PostgreSQL/Prisma, integrated webhook-verified payment gateways, and built the merchant admin dashboard.
TIMELINE4 Months (2024)
DOMAINFullstack
Zembil E-Commerce
፩THE CHALLENGE

The Problem Space

Many Ethiopian and regional commerce platforms suffer from brittle checkout architectures, sluggish mobile loading, and lack of integration with international payment rails (Stripe, PayPal) alongside regional currencies.

፪SYSTEM ARCHITECTURE

Technologies & Tools

Next.js (App Router)TypeScriptTailwind CSSPostgreSQLPrisma ORMStripe SDKPayPal SDK

Architectural Highlights

  • Prisma schema with indexing on high-traffic category and search fields
  • Secure cookie sessions and role-based permissions for merchant admins
  • Accessible, high-contrast product gallery and checkout modals
፫ENGINEERING CHOICES

Key Architectural Decisions

DECISION 01

Idempotent Webhook Processing Architecture

Implemented cryptographic webhook verification with database-level idempotency keys to ensure zero double-charging or missed order state dispatches even during network interruptions.

DECISION 02

Hybrid Server Components & Client Cart State

Rendered product catalogs statically via React Server Components with incremental cache revalidation, while isolating cart and checkout mutations to lightweight client islands.

፬OBSTACLES & RESOLUTION

Challenges Faced

Race Conditions During Concurrent Inventory Depletion
HOW IT WAS SOLVED:

Utilized PostgreSQL row-level locks within Prisma transactional blocks (`tx.$executeRaw`) during checkout validation to prevent overselling limited-stock products.

፭VERIFIED OUTCOMES

Results & Deliverables

01.Instant checkout feedback with zero double-charge anomalies across stress tests.
02.Smooth mobile responsive purchasing flow tested across varied network throttling.
03.Fully typed end-to-end data pipelines from database queries to front-end components.
NEXT CASE STUDYAI-Powered Attendance Management System
Read Next Case Study