Skip to content
Freelance 2026 Solo developer · Product owner

Trendverse — D2C Ecommerce

A production-ready D2C storefront for the Indian market — catalogue, variants, cart, Razorpay checkout, accounts and a nine-screen admin, built to be branded and launched rather than built again. Nothing is tied to one product category.

trendverse-rho.vercel.app
Trendverse — D2C Ecommerce — Freelance project by Manuj Rai
Year
2026
Type
Freelance
Role
Solo developer · Product owner
Status
Live
// The challenge

What needed solving

Small Indian D2C brands sell through Instagram DMs and a Google Form, keep stock in a spreadsheet, and reconcile UPI screenshots by hand. The alternatives are a hosted platform that charges per order, or a theme that still leaves the hard parts — variant-level inventory, payment settlement, money that survives an audit — to be written from scratch.

// What I built

The solution

The store

A complete storefront built to be configured rather than rebuilt: catalogue with variants, cart, coupons, Razorpay checkout, MSG91 phone OTP, accounts, order tracking, and an admin covering products, categories, orders, customers, coupons, reviews and settings.

Under it

Next.js 16 App Router on Supabase Postgres 17 in ap-south-1 (Mumbai), with cookie sessions the server can read during render, Postgres read models so a screen costs one query instead of a fan of round trips, and indexed full-text search with a trigram fallback for misspellings.

Next.js 16React 19TypeScriptSupabasePostgres 17RazorpayMSG91TailwindVercel
// Outcomes

What changed

  • Everything a brand needs to go live is already built, so launching is branding, catalogue and stock — not a build
  • Categories, variants, coupons and store settings are database-backed and managed from the admin — nothing is hardcoded to a vertical, so the same storefront fits apparel, accessories, home goods or anything else with a SKU
  • The homepage hero is a Server Component with zero client JavaScript: one query, and the image URL known at HTML-render time so next/image emits a real preload
  • Money is integer paise end to end, converted to rupees once at render; Razorpay's API speaks paise too, so there is no conversion at the payment boundary and no rounding drift against the gateway
  • Hosted in the same region as the buyers, the payment gateway and the OTP provider, so no query on the critical path crosses an ocean
// Under the hood

Technical highlights

  1. Stock is reserved, never decremented — reserve_stock → commit_stock on capture or release_stock on failure, with a sweep for abandoned checkouts, so the inventory ledger always explains the count
  2. Razorpay settlement is idempotent: whichever of payment.captured or order.paid lands second is a no-op, and a failed write returns 500 so the gateway retries rather than dropping the payment
  3. Every table has row-level security plus an explicit revoke-then-narrow-grant, so a missing policy fails closed; rate-limit buckets and the audit log sit in a private schema PostgREST does not expose at all
  4. Every SECURITY DEFINER function pins an empty search_path and revokes execute from anon by name — Supabase grants new functions to anon separately, so a blanket revoke alone leaves them reachable
  5. Product pages carry Product and Breadcrumb JSON-LD, and every image is stored with its width, height and an LQIP placeholder so nothing renders at an unknown size
// In depth

The engineering, written up

// Next step

Need something like this?

I take on a small number of projects each quarter. Let's talk if your idea fits.

// More freelance work

Karloo — Free Online Tools — case study by Manuj Rai

Karloo

Free Online Tools

A browser-first catalogue of free online tools — calculators, text utilities, developer helpers, converters, and AI-assisted workflows — built to be fast, searchable, and cheap to run.

Next.js 16 · React 19 · TypeScript

Kat-Katha — NGO Giving Platform — case study by Manuj Rai

Kat-Katha

NGO Giving Platform

A full-stack giving site for a Delhi NGO — a hardened Razorpay donation pipeline with live campaign progress, plus a custom CMS the team runs themselves to publish stories, programs, and campaigns.

Next.js 15 · Vercel Postgres · Razorpay

Hair Crezz — Salon Booking Template — case study by Manuj Rai

Hair Crezz

Salon Booking Template

A customizable salon-booking template — each owner gets a branded deployment with their own services, stylists, slots, payments, and SMS confirmations.

Next.js 14 · Supabase · Postgres RLS