Commerce Architecture
Commerce Stack
From catalog to checkout, I build systems that connect the entire commerce lifecycle. This page maps how modern commerce systems work — and which ones I've built.
System Architecture
How the systems connect.
Each module is a self-contained system. Hover to see connections. Click for engineering details.
Core Systems
The building blocks of commerce.
Nine core systems that every commerce platform needs. Each one has its own data model, business rules, and engineering challenges.
Product Catalog
Built — VedaGlowSource of truth for products, variants, attributes and availability.
Search & Discovery
Built — GharBazaarHow customers find what they need — search, filters, and recommendations.
Cart Engine
Built — VedaGlowManages shopping sessions — items, quantities, pricing, and state.
Checkout Flow
Built — VedaGlowGuides the customer from cart to confirmed order.
Payment Gateway
Built — VedaGlowProcesses payments securely — charges, refunds, and reconciliation.
Order Management
Built — VedaGlowTracks orders from placement through fulfillment to completion.
Inventory System
LearningTracks stock levels, reservations, and availability in real time.
Pricing & Coupons
Built — VedaGlowCalculates prices, applies discounts, and enforces promotion rules.
Admin & Operations
Built — VedaGlow + GharBazaarBack-office tools for managing the entire commerce system.
Customer Journey
From discovery to fulfillment.
Every commerce interaction follows a path. Understanding this journey shapes how each system is designed.
Customer finds the store through search, ads, or direct visit.
Browses products, reads details, compares options.
Selects products, chooses variants, adds to shopping cart.
Provides shipping info, selects payment, reviews order.
Completes payment securely through the payment gateway.
Order is confirmed, tracked, and prepared for fulfillment.
Order is picked, packed, shipped, and delivered.
Customer initiates return, refund is processed.
Engineering Challenges
The hard problems in commerce.
Commerce systems deal with real money, real inventory, and real customers. These are the engineering challenges that separate toy projects from production systems.
Inventory Overselling
Multiple customers buying the last item simultaneously. Requires atomic operations and pessimistic locking strategies.
Payment Idempotency
Network failures during payment must never result in double charges. Every payment operation needs idempotency keys.
Pricing Consistency
Price shown in catalog must match cart, checkout, and the final charge. Server-side price authority is essential.
Coupon Race Conditions
Single-use coupons redeemed simultaneously by multiple users. Requires atomic validation and redemption.
Order State Management
Orders move through complex state transitions. Invalid transitions must be prevented and every change audited.
Refund Handling
Partial refunds, inventory restocking, and payment gateway coordination must all succeed or fail together.
Database Consistency
Cross-collection operations (order + inventory + payment) need transaction guarantees to prevent data corruption.
Search Scalability
Full-text search with faceted filtering must remain fast as the catalog grows. Indexing strategy is critical.
Authentication Security
Session management, token rotation, CSRF protection, and secure password storage across customer and admin contexts.
Cache Invalidation
Product and pricing caches must invalidate correctly on updates. Stale prices in cart or checkout break trust.
Architecture
How the layers connect.
A modern commerce platform is built in layers. Each layer has clear responsibilities and communicates through defined interfaces.
Frontend
Server-rendered React with client interactivity where needed.
API Layer
RESTful API routes with validation, rate limiting, and auth middleware.
Business Logic
Domain-specific logic for pricing, inventory, orders, and payments.
Data Layer
Database access with ORM, transactions, and query optimization.
External Services
Third-party integrations for payments, media, and delivery.
My Experience
Where I've applied these systems.
This page represents my commerce engineering knowledge and architecture thinking. Where something comes from an actual project, it's clearly identified.
VedaGlow
BuiltD2C skincare store built end to end — catalog, cart, checkout, Razorpay payments, order lifecycle and admin.
Systems Implemented
GharBazaar
In DevelopmentProperty marketplace with PostGIS university-proximity search, tiered KYC and 128 row-level security policies.
Systems In Development
Engineering Principles
How I think about commerce systems.
These are the principles I follow when building commerce software. They come from building real products and learning from real mistakes.
Server-Side Source of Truth
All critical calculations — pricing, inventory, discounts — happen server-side. The client displays, the server decides.
Secure Payments
Payment processing follows gateway best practices. No raw card data touches the server. Webhooks are verified.
Idempotent Operations
Every write operation can be safely retried. Network failures never cause duplicate charges or orders.
Consistent Inventory
Stock operations use atomic updates. Reservations have timeouts. Overselling is prevented at the database level.
Validated Inputs
Every API endpoint validates input with Zod schemas. Invalid data is rejected before it reaches business logic.
Proper Authorization
Role-based access control on every protected route. Admin operations require elevated permissions.
Observable Systems
Structured logging, error tracking, and audit trails make debugging production issues possible.
Performance-First UX
Server-side rendering, optimistic updates, and strategic caching keep the experience fast for customers.
Maintainable Architecture
Clear separation of concerns. Business logic isolated from framework code. Easy to test, easy to change.
See It in Action
Want to see these systems in a real product?
These aren't theoretical concepts — they're patterns I've built, debugged, and shipped.