Back to Projects
Dukkani cover image

Dukkani

A mobile-first commerce platform for Tunisian merchants: dashboard, custom storefront, Telegram order notifications, and an oRPC API. Built as a Turborepo monorepo with Next.js, Prisma, PostgreSQL, and Better Auth.

Publisheddukkani.co

Dukkani — The Shopify of Tunisia 🇹🇳

Overview#

Dukkani is a mobile-first commerce platform built specifically for the Tunisian market.
The vision is simple but ambitious:

Build a local-first Shopify alternative that works with how Tunisian merchants already operate — fast onboarding, social commerce, messaging-based order management, and zero technical friction.

Merchants can:

  • Create their storefront
  • List products
  • Receive orders directly on Telegram
  • Manage orders from a dashboard
  • Sell without needing any technical knowledge

Vision#

E-commerce platforms today are not designed for Tunisia’s reality.

  • Payment systems are fragmented
  • WhatsApp Business APIs are restricted and paid
  • Most merchants operate through Facebook / Instagram / messaging
  • Shopify is expensive and overkill for local small businesses

Dukkani’s vision:

Become the default commerce infrastructure for Tunisian merchants — simple, fast, mobile-first, and deeply integrated with local workflows.

Long-term, Dukkani aims to be:

  • The backbone for small businesses in Tunisia
  • A full-stack commerce platform (storefront, orders, delivery, payments, analytics)
  • A launchpad for the next generation of local digital businesses

How This Project Started#

Dukkani started as an experiment between two friends:

  • Adam Nouira (co-founder, idea & early brainstorming)
  • Me (solo builder after MVP decision)

Phase 1 — The First Idea (Rejected)#

The initial idea was to build a gym & coaching platform for Tunisia.
After early thinking and market reflection, it became clear:

  • Adoption would be low
  • Gyms are not digitally mature yet
  • Monetization would be very slow

So the idea was dropped.

Phase 2 — The Pivot#

We pivoted to:

A Shopify-like platform for Tunisia

We identified competitors (Convert, Kick Tech Pro), but decided:

  • Even if it fails, the project will become a strong portfolio product
  • Best case: it becomes a real business
  • Worst case: I level up massively as an engineer

We set a rule:

Build an MVP in 2 weeks or kill the idea.

Phase 3 — Solo Execution#

My co-founder couldn’t contribute code-wise, so I decided to:

  • Take full ownership
  • Use the project as a learning vehicle
  • Build a real production-grade system

This is where Dukkani became:

  • My monorepo learning project
  • My infra & deployment learning lab
  • My architecture stress test

Stack & Architecture#

Dukkani is built as a modular monorepo (pnpm workspaces over apps/* and packages/*) with clear separation of concerns, and apps never import from other apps:

Core Apps#

Core Tech Stack#

  • Next.js (App Router)
  • TypeScript
  • Turborepo monorepo with four apps and shared packages
  • ORPC (similar to tRPC), with one root router split into dashboard, storefront and web namespaces
  • Prisma + PostgreSQL (schema split per domain)
  • Better Auth for authentication
  • Vercel (apps hosting)
  • Cloudflare R2 (object storage, per-PR prefixes on previews)
  • Telegram Bot API for order notifications
  • Biome for linting and formatting
  • CI with Lighthouse tests for performance & accessibility (added in #267, see how CI works)
  • A full preview stack per pull request: four Vercel previews, a Neon database branch, seeded demo data, torn down when the PR closes (how it works, landed in #290)

How CI works#

Everything lives in .github/workflows. The per-PR preview stack is covered in the blog post, so this is the checking and automation around it.

On every PR to main, and on every push to main, ci.yml runs four jobs in parallel. Lint is biome lint. A pinned-dependency check runs a small script in packages/ci-tools that fails if sharp drifts from ^0.34.4, because a Dependabot bump once reintroduced a crash on Vercel for weeks. Typecheck runs through Turborepo with the remote cache. The build job only builds the shared packages (db, auth, orpc), not the four apps, since a full build needs a live database and a pile of env vars that CI doesn't have yet. The workflow says so in a comment. There is no test job: I don't run a test suite in CI today.

On PRs only, lighthouse-ci.yml skips drafts, waits for the Vercel preview of the exact commit to be ready, then audits the marketing site and the storefront in English and Arabic, with desktop and mobile emulation. The thresholds are 0.85 for performance and accessibility (errors) and 0.8 for best practices (warning only).

Main only. prisma-migrate.yml runs prisma migrate deploy against production when a push to main touches the schema, migrations or Prisma config. languine.yml runs when locale JSON files change on main and opens a PR with the French and Arabic translations.

When something fails, ci-failure-analysis.yml triggers on a failed CI, Lighthouse, migration or translation run, pulls the job logs and the PR diff, asks an LLM what broke, and posts one comment (updated in place on later failures) on the open PR.

Housekeeping. pr-auto-assign.yml assigns the PR author and anyone who pushes commits to it. pr-link-issue.yml reads the issue number from the branch name (fix/250-some-slug) and appends Closes #250 to the PR body if no issue is linked, so the project board moves on its own. When a PR closes, cleanup-preview.yml deletes the pr-N/ objects from R2 and the Neon branch for that PR's head branch.


Architecture Goals#

  • Fully typed API layer
  • Shared domain logic between apps
  • Clean separation of concerns
  • Scalable infra for future growth

Product Scope#

Dukkani is not just “a website builder”.
It’s a full commerce system:

  • Merchant Dashboard
  • Custom Storefront per merchant
  • Product management
  • Order management
  • Telegram integration
  • API explorer
  • Future: delivery, payments, analytics

Roadmap (High-Level)#

Short-Term (0–2 months)#

  • Finish core product flows (products, orders, editing, archiving)
  • Fix UX gaps discovered by real merchants
  • Mobile UX improvements
  • Localization (FR / AR)
  • Better image handling & compression
  • Error observability improvements

Mid-Term (3–6 months)#

  • Delivery management
  • Customer experience improvements
  • AI-powered product descriptions
  • Better analytics
  • Merchant onboarding improvements

Long-Term#

  • Payments integration
  • Logistics partnerships
  • Marketplace features
  • Growth tools for merchants
  • Full merchant operating system

Team & Contributors#

GitHub:


Current Status#

Dukkani is:

  • Live in early beta
  • Used by real merchants
  • Actively under heavy development
  • Continuously iterated based on real user feedback

This case study will be updated as:

  • The product evolves
  • New features ship
  • More merchants onboard
  • The business side matures

Why This Project Matters (Personally)#

Dukkani is:

  • My first serious product attempt
  • My biggest monorepo so far
  • My first platform with real users
  • My first time onboarding real merchants
  • My first step toward building a real startup

Even if Dukkani never becomes a business,
it already succeeded as:

  • A technical achievement
  • A learning accelerator
  • A proof that I can build full platforms end-to-end

This case study is a living document.
It will evolve with the product.

dukkani