02 / E-commerce / Payments · Salwa Dev
Animal Mart
A production storefront for a pet supplies business — catalogue, checkout, payments, and the admin surface the shop is actually run from.
System
case study02
case study02
The problem
Take payments five different ways in a market where most customers still expect cash on delivery, and give the owner one dashboard for the whole operation.
What changed
- Five payment methods live — cash on delivery, card, JazzCash, EasyPaisa and bank transfer — each signature-verified
- Stateful JWT authentication with OTP verification protecting the admin panel
- Full admin dashboard covering products, orders, articles and promotions
- Cart state persisted with Zustand, order status polled with TanStack Query, every form validated through Zod
Engineering map
Interface — product discovery, cart and checkout on the App Router
Application — server components and server actions, admin dashboard
Data — PostgreSQL schema on Prisma with migrations and relational queries
Payments — Safepay with HMAC-SHA256 signature verification
Operations — transactional email, image CDN, CI/CD on Vercel
Technology
Next.js 16React 19TypeScriptPrismaPostgreSQL (Neon)SafepayZustandTanStack Query