Multi-tenant infrastructure
for Indian SMB sites.
ALINKS is Artix's hosted platform layer: tenant routing, publish gates, commerce pipes, and dashboard APIs. Client PII stays in tenant Google Sheets or BYO Supabase — never in platform Postgres.
- pages/tenant
- 5
- p99 route
- <50ms
- PII in platform DB
- 0
- regions
- IN·SG·AE
$ alinks route --handle demo→ surface: tenant_site→ storage: google_sheets→ tier: pro · checkout: enabled$ alinks write-queue statuspending: 0 · failed: 0 · latency_p99: 42ms❯ POST /api/orders → tenant Sheet ✓➜ _
// middleware → resolveRequest() → tenant surface
Runtime stack
Next.js 14
App Router · RSC
Postgres
Platform config
Drizzle
Type-safe schema
Redis
Cache · queue
Google Sheets
Tenant writes
Razorpay
Billing · UPI
System design
Three-layer data boundary
Locked in src/ARCHITECTURE.txt — platform DB for config, tenant storage for client rows.
Edge routing
Path, subdomain, and custom-domain resolution. Headers: x-alinks-surface, x-alinks-handle.
Platform Postgres
Tenant config, publish state, tier gates, legal logs. No customer, patient, or order PII.
Tenant storage
Sheets default. Retry queue on failure. Enterprise can attach Supabase connector.
// Platform Postgres — config only tenants · businesses · sessions legal_acceptances · billing_tier // Tenant data — StorageAdapter Google Sheets → orders, bookings, customers Supabase (Ent) → tenant BYO database
Platform modules
Composable tenant infrastructure
Feature flags and tier gates enforced server-side — not UI-only.
commerce.ts
CommerceModule
WhatsApp Lite → Pro cart · UPI · COD · write-queue → Sheets
booking.ts
AppointmentsEngine
Salon pay-then-book · clinic license gate · slot capacity
routing.ts
TenantRouter
Path / subdomain / custom-domain · tier-gated surfaces
ai.ts
AlinksAI
field_generate · seo_meta · share_caption · tier credit caps
share.ts
TapBlast
Short links · QR · OG cards · click analytics (Pro+)
publish.ts
PublishGate
Legal acceptances · trial expiry · day-15 unpublish (Q035)
Vertical templates
Template_id → page graph
| Code | Vertical | 5-page graph |
|---|---|---|
| retail | Retail / kirana | catalog · GST · COD/UPI |
| salon | Salon / beauty | packages · pay-then-book |
| clinic | Clinic / doctors | license gate · doc slots |
| portfolio | Portfolio | links · services · no inventory |
Tenant pipeline
Request → publish → write
auth.verifyOtp()onboarding.seed()publishGate.check()storage.write()