Hurivuri
Full-stack e-commerce marketplace for Bangladesh

Overview
Hurivuri is a full-stack e-commerce marketplace built for Bangladesh. Buyers browse a bilingual product catalog in Bengali and English, pay via SSLCommerz or cash-on-delivery, and track orders through integrated courier services. Sellers manage inventory, fulfill orders, and monitor sales from a dedicated dashboard.
Bangladesh's growing e-commerce market needs platforms built for local realities: Bengali-first interfaces, local payment gateways, domestic courier APIs, and cash-on-delivery support. Hurivuri is built from scratch for this market rather than adapting a Western e-commerce template.
The platform covers every layer a production e-commerce system needs: storefront, seller dashboard, admin panel, REST API, background job processing, full-text search, file storage, and automated deployment. Built as a Turborepo monorepo with three applications and four shared packages — a single developer owning the entire stack end-to-end.
Technical Highlights
Turborepo Monorepo Architecture: Three applications — a Next.js storefront, a Hono/Bun API server, and a BullMQ worker — alongside four shared packages for database schemas, core utilities, queue definitions, and search client. The shared @repo/db package centralizes all Drizzle ORM schemas and migrations, ensuring the frontend, backend, and worker all share the same type-safe database layer. A single turbo run build command builds everything in the correct dependency order.
Bilingual Internationalization: Full Bengali and English support using next-intl with middleware-based locale detection. Every user-facing string — product names, categories, UI labels, error messages, email templates — is translated. The URL structure uses locale prefixes (/bn/, /en/) with automatic detection based on browser preferences and manual switching.
Flexible Product Variant System: Products support multiple variant types (size, color, material) with independent pricing per combination. A variant matrix generates all valid combinations, each with its own price, stock count, and SKU. The cart and checkout systems resolve the correct variant price at every step, with server-side validation to prevent price manipulation.
Affiliate Marketing Engine: A commission system where affiliates earn a percentage of sales they drive. Each product has a configurable buffer percentage that gets split between customer discount and affiliate commission. Affiliates generate trackable links, and commissions are calculated, tracked, and made available for withdrawal through the platform.
Key Features
- Bilingual Storefront: Bengali and English using next-intl with locale-prefixed URLs and automatic language detection
- SSLCommerz Payments: Integration with IPN webhook verification, plus cash-on-delivery support for local buyers
- Courier Integrations: Pathao, RedX, and Steadfast for automated shipping label generation and real-time order tracking
- Product Variants: Flexible pricing per size, color, and material combination with per-variant inventory tracking
- Affiliate Program: Trackable links, commission calculation, and withdrawal management for affiliate marketers
- Full-Text Search: Meilisearch-powered product search with real-time indexing via background jobs
- Role-Based Access: Four-tier RBAC — customer, seller, admin, and super-admin with granular permissions
- Seller Dashboard: Inventory management, order fulfillment, sales analytics, and payout tracking
- Admin Panel: User management, product moderation, order oversight, coupon management, and platform analytics
- Background Jobs: BullMQ and Redis for emails, search indexing, order notifications, and scheduled tasks
Challenges & Solutions
SSLCommerz Payment Flow: Bangladesh's primary payment gateway uses a redirect-based flow with IPN (Instant Payment Notification) webhooks. Handling race conditions between user redirects and server-side IPN callbacks required careful order state management. Implemented idempotent payment verification — the system validates payment status server-side regardless of which callback arrives first, preventing double-charges and missed confirmations.
Multi-Courier Abstraction: Each courier (Pathao, RedX, Steadfast) has a different API contract for creating shipments, tracking orders, and calculating rates. Built a courier abstraction layer with a unified interface — the order fulfillment flow calls a single createShipment() method, and the appropriate courier adapter handles the API-specific details. Adding a new courier means implementing one adapter, not touching order logic.
Variant Pricing Integrity: With multiple variant dimensions (size, color, material), each combination can have a different price. The cart, checkout, and order systems must all agree on the resolved price. Implemented server-side variant resolution at every price-sensitive step — add-to-cart, checkout initiation, and payment creation all independently verify the correct price from the database, preventing client-side price manipulation.
Bilingual Content Management: Every product, category, and UI string needs to exist in both Bengali and English. Rather than duplicating database records, implemented a translation layer where translatable fields store both versions and the API returns the correct language based on the request locale. The admin interface provides side-by-side editing for both languages.
Order Lifecycle State Machine: Orders pass through multiple states — pending, confirmed, processing, shipped, delivered — with validation rules at each transition. Sellers can only ship confirmed orders, admins can override states, and each transition triggers side effects like notifications, courier API calls, and inventory updates. Built a state machine with guard conditions and transition hooks to enforce business rules.
Monorepo Type Safety: With three applications sharing database schemas and API types, keeping everything in sync is critical. The @repo/db package exports Drizzle schemas and inferred types that are used by both the Hono API for queries and the Next.js frontend for API response types. Changes to a database column propagate type errors across all three apps at build time.
Tech Stack
Next.js 16
Storefront, SSR, app router
React 19
UI with server components
TypeScript
Type safety across the full stack
Hono
Backend API framework
Bun
JavaScript runtime for the API server
PostgreSQL
Primary database (Drizzle ORM)
Redis
Job queue, caching, sessions
BullMQ
Background job processing
Meilisearch
Full-text product search
next-intl
Bilingual internationalization (bn/en)
NextAuth v5
Authentication and session management
SSLCommerz
Payment gateway for Bangladesh
MinIO / S3
Product images and file storage
Turborepo
Monorepo build orchestration
Docker
Containerized deployment
GitHub Actions
CI/CD pipeline
What I Learned
- Building a full-stack e-commerce platform from scratch — handling the full spectrum from storefront UI to payment processing to courier API integrations
- Designing for a specific market's constraints: Bengali-first interfaces, local payment gateways, cash-on-delivery logistics, and domestic courier APIs that differ from Western e-commerce patterns
- Monorepo architecture with Turborepo where frontend, backend, and worker services share type-safe database schemas and utility packages
- Building abstraction layers over third-party services (couriers, payment gateways) to keep business logic clean and make integrations swappable
- End-to-end ownership of a production system — database design, API architecture, frontend development, background jobs, search infrastructure, and deployment pipeline as a single full-stack developer