Scarpar is a free, open-source, self-hosted CMS, ecommerce, and business-management platform built on Next.js and Supabase — a multi-tenant alternative to Shopify, Medusa, and Payload for running many independent businesses from one deployment.
Each organization toggles the modules it needs and picks a vertical preset — ecommerce, courses, services, or real estate — instead of forking the codebase per business type. It's a practical base for a SaaS starter, an agency's reusable per-client platform, or a single self-hosted store.
It also ships a deep Bangladesh-market layer most generic platforms skip: cash-on-delivery and manual bKash/Nagad verification as first-class payment paths, district-based delivery zones with local courier support (Steadfast, Pathao), Mushak 6.3-compliant invoices for VAT-registered sellers, and Bangla-ready storefront copy.
- Developers who want a working multi-tenant SaaS starter on Next.js + Supabase instead of building the org/module/RLS scaffolding from scratch.
- Agencies that build ecommerce or CMS sites for multiple clients and want one reusable, self-hosted codebase instead of a per-client rebuild.
- Bangladeshi businesses and developers who need COD, local courier delivery, and Mushak- compliant invoicing out of the box, not bolted on.
- Anyone evaluating a self-hosted Shopify, Medusa, or Payload alternative with commerce, CMS, and delivery management already wired together.
- Commerce — products, variants, categories, discounts, a full order lifecycle with returns, and an in-store POS terminal, all sharing one order-creation core.
- Local delivery & COD — delivery zones, rider assignment with OTP-confirmed handoff, COD settlement batches, courier adapters (manual today; Steadfast/Pathao real-shaped and config-gated), and public order tracking.
- Receipts & printing — A4 invoices (with a Mushak 6.3 variant), 80mm thermal receipts, and 4x6 courier labels with a hand-rolled Code128 barcode — browser print, no PDF service required.
- CMS & storefront — an 11-block page builder (hero, rich text, product grid, banners, FAQ, testimonials, and more) with drafts, publish, and revision history, plus a fast storefront with cart, checkout, and order confirmation.
- Business ops — expense tracking, sales/delivery/financial reports with CSV export (including a Mushak 6.2 register), an audit log, and a settings engine covering ~30 org-level toggles.
- Multi-vertical modularity — the same admin shell serves ecommerce, online courses, service businesses, and real-estate listings by swapping which modules are enabled.
- Multi-tenancy & roles — org-scoped data with Postgres RLS on every table, and a five-level role hierarchy (owner/admin/manager/staff/rider/viewer) plus a separate platform-admin tier.
Next.js 15 (App Router, TypeScript, RSC) + Supabase (Postgres, Auth, Storage, RLS) + Tailwind v4.
- Prerequisites: Node 20+.
npm install- Create a Supabase project, then apply the schema — SQL Editor → paste and run, in order:
supabase/migrations/0001_core.sql→0002_commerce.sql→0003_delivery_cms_ops.sql→0004_storefront_public_org_read.sql(orsupabase db pushvia the CLI). - Optional demo data — same approach, in order:
supabase/seed/01_core.sql→02_commerce.sql→03_delivery_cms.sql. Creates a demo org (slugdemo); see the file's tail comment to link your own account as its owner. cp .env.example .env.localand fill in your Supabase project URL, anon key, and service role key.npm run dev- Sign up at
/signup, then complete the/onboardingwizard to create your organization.
- Public storefront:
/s/[org-slug] - Delivery tracking:
/track/[code]
src/app/ routes: (auth), onboarding, (admin)/admin, (store)/s/[org], (print)/print, track, api
src/modules/ one folder per module — module.config.ts + actions.ts + schemas.ts + components/
src/lib/ supabase clients, settings engine, money/audit/notify, couriers/, barcode/
src/components/ui shared component primitives
supabase/migrations 0001-0004, apply in order
supabase/seed 01-03, optional demo data (org slug "demo")
docs/ architecture.md, conventions.md, design-system.md, deployment.md (binding contracts)
docs/architecture.md— binding architecture contract.docs/conventions.md— binding build conventions.docs/design-system.md— design tokens and aesthetic.docs/deployment.md— Vercel + Supabase deploy steps.docs/saas-roadmap.md— template → commercial SaaS conversion plan (phased, effort-tagged).docs/operations.md— production runbook (migrations, tenant lifecycle, backups, incidents).docs/extending.md— developer guide: codebase tour + recipes for modules/blocks/verticals/adapters..memory/— shared project memory: context, feature list, next steps, decisions, build log.CHANGELOG.md— release history.
Contributions are welcome — see CONTRIBUTING.md for the workflow and
docs/extending.md for step-by-step recipes (add a module, CMS block,
vertical, or courier/payment adapter). This project follows the
Contributor Covenant.
MIT — free to use, modify, and self-host, including commercially. No attribution required (though a star is always appreciated).