Unified technology stack across all Databayt repositories

Stack

The unified technology stack across all 14 Databayt repositories.

Canonical Stack

Every web product targets this stack. Deviations are tracked as alignment debt.

LayerTechnologyVersion
FrameworkNext.js16.2.1
UI LibraryReact19.2.3
LanguageTypeScript5.9
StylingTailwind CSS4
DatabasePrisma + Neon (PostgreSQL)6.19
AuthNextAuth (Auth.js)v5 beta 30
PaymentsStripe20
MonitoringSentry10
CacheUpstash Redis
EmailResend
AnimationsFramer Motion
TestingVitest + Playwright
DeploymentVercel
Docsfumadocs (MDX)
FontGeist
Package Managerpnpm

UI Pipeline

Components flow through four layers before reaching products:

radix (accessible primitives)
  → shadcn (styled components, 54 primitives)
    → codebase (atoms + templates, 62 atoms / 31 templates)
      → products (hogwarts, mkan, souq, shifa)
LayerRepoCountDescription
Primitivesdatabayt/radix~30Unstyled, accessible (Dialog, Popover, Select, Tabs)
Componentsdatabayt/shadcn54Styled with Tailwind (Button, Card, Table, Input)
Atomsdatabayt/codebase622+ primitives composed (DataTable, Forms, Cards)
Templatesdatabayt/codebase31Full-page layouts (Dashboard, Settings, Auth)

Both radix and shadcn are forks of their upstream repos, customized for Arabic RTL support and Databayt design tokens.


State Management

LibraryUsed InPurpose
Jotaikun, shifaAtomic state, default choice
ZustandmkanStore-based state
Redux ToolkitsouqLegacy — alignment debt

Standard: Jotai for new projects. Zustand acceptable. Redux is alignment debt.


Version Matrix

Exact versions per repository as of March 2026.

RepoNext.jsReactTypeScriptPrismaAuth
hogwarts16.2.119.2.05.86.19NextAuth v5 beta 30
codebase16.1.119.2.35.96.19NextAuth v5 beta 29
kun16.1.119.2.35.9
marketing16.1.119.2.35.97.2.0NextAuth v5 beta 29
mkan16.1.61956.9NextAuth v5 beta 25
shifa16.1.019.25.96.3NextAuth v5 beta 25
souq15.3.8196.16Clerk

Per-Repo Extras

Technologies used by specific repos beyond the canonical stack.

Hogwarts (Education SaaS)

CategoryTechnology
Real-timeSocket.io
i18ni18next
MapsMapbox, Leaflet
SMSTwilio
StorageAWS S3 + CloudFront
AIAnthropic SDK, Groq, OpenAI (AI SDK)
EditorTipTap
ChartsChart.js, Recharts
PDFreact-pdf
Spreadsheetxlsx, papaparse
Rate LimitingUpstash Ratelimit

Codebase (Pattern Library)

CategoryTechnology
Tables@tanstack/react-table, react-virtual
DnD@dnd-kit
Commandcmdk
Carouselembla-carousel
Drawervaul
OTPinput-otp
Toastsonner
ChartsRecharts
PDFreact-pdf, puppeteer
AIAnthropic SDK, Groq, OpenAI

Mkan (Rental Marketplace)

CategoryTechnology
MapsMapbox, Leaflet
UploadFilePond
PDFreact-pdf
StateZustand

Shifa (Medical Platform)

CategoryTechnology
Tables@tanstack/react-table
ImagesImageKit
ChartsRecharts
Drawervaul
Toastsonner

Marketing (Landing Pages)

CategoryTechnology
AnimationsRive, Framer Motion
ImagesImageKit
AIGroq (AI SDK)

Souq (E-Commerce)

CategoryTechnology
AuthClerk (divergent)
StateRedux Toolkit (divergent)
Background JobsInngest
WebhooksSvix
API DocsSwagger
ChartsRecharts

Non-Web Stacks

Swift App (iOS)

LayerTechnology
LanguageSwift 6
UISwiftUI
DataSwiftData (offline-first)
Min TargetiOS 18+
ArchitectureMVVM + Clean Architecture
i18nArabic RTL default, English LTR

Component hierarchy mirrors web: UI → Atom → Feature → Screen

Distributed Computer (R&D)

LayerTechnology
LanguageRust
Networkinglibp2p
DiscoveryDHT

Prototype stage. Not active.


Stack Alignment

Aligned

All active web repos share: Next.js 16, React 19, TypeScript, Tailwind CSS 4, Prisma 6, NextAuth v5, Vercel deployment.

Debt

RepoIssueFix
souqClerk instead of NextAuthMigrate to NextAuth v5
souqRedux Toolkit instead of JotaiMigrate to Jotai or Zustand
souqNext.js 15 instead of 16Upgrade to Next.js 16
marketingPrisma 7.2 (ahead of others)Align with Prisma 6.19 or upgrade all
mkanPrisma 6.9 (behind)Upgrade to 6.19
shifaPrisma 6.3 (behind)Upgrade to 6.19
mkanNextAuth beta 25 (behind)Upgrade to beta 30
shifaNextAuth beta 25 (behind)Upgrade to beta 30

Alignment Priority

  1. Souq — Most divergent. Low priority since product is paused.
  2. Mkan/Shifa — Minor version drift. Upgrade during next active sprint.
  3. Marketing — Prisma 7.2 anomaly. Verify intentional or downgrade.

i18n

All products support bilingual operation:

AspectStandard
Default languageArabic (RTL)
Secondary languageEnglish (LTR)
DirectionRTL-first design, LTR as override
Libraryi18next (Hogwarts), built-in (others)
URL structure/[lang]/... (ar, en)

Infrastructure

ServicePurposeProducts
VercelHosting, edge functions, preview deploysAll web
NeonServerless PostgreSQLhogwarts, mkan, shifa
UpstashRedis cache, rate limitinghogwarts, souq, mkan
StripePayments, subscriptionshogwarts, souq, shifa
SentryError monitoringhogwarts, mkan
ResendTransactional emailhogwarts, souq, mkan
AWS S3File storage (CloudFront CDN)hogwarts
ImageKitImage optimizationshifa, marketing
TwilioSMS notificationshogwarts
Mapbox/LeafletMaps and geolocationhogwarts, mkan

Upgrade Path

When upgrading across repos, follow dependency order:

1. radix (primitives — upstream sync)
2. shadcn (components — upstream sync + RTL patches)
3. codebase (atoms/templates — test compatibility)
4. kun (configuration — update version references)
5. products (hogwarts → mkan → shifa → souq)

Hogwarts first — it's the flagship and most actively tested. Marketing follows codebase since it shares the same base.