v0.1.0 · phase 2 readyNext.js 14 · Drizzle · Postgres

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-cli — zsh
$ alinks route --handle demo
→ surface: tenant_site
→ storage: google_sheets
→ tier: pro · checkout: enabled
 
$ alinks write-queue status
pending: 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.

edgemiddleware.ts · resolveRequest()

Edge routing

Path, subdomain, and custom-domain resolution. Headers: x-alinks-surface, x-alinks-handle.

platformDrizzle ORM · Artix-owned

Platform Postgres

Tenant config, publish state, tier gates, legal logs. No customer, patient, or order PII.

tenantStorageAdapter · write-queue

Tenant storage

Sheets default. Retry queue on failure. Enterprise can attach Supabase connector.

data-ownership.ts
// 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

CodeVertical5-page graph
retailRetail / kiranacatalog · GST · COD/UPI
salonSalon / beautypackages · pay-then-book
clinicClinic / doctorslicense gate · doc slots
portfolioPortfoliolinks · services · no inventory

Tenant pipeline

Request → publish → write

01auth.verifyOtp()
session · role · tenant_id
02onboarding.seed()
handle · template · 5 pages
03publishGate.check()
legal · tier · trial
04storage.write()
Sheet append · retry queue

billing.tiers

Subscription plans

Single source of truth for Basic · Pro · Enterprise. Monthly list or annual upfront (Q033/Q034).

save_up_to_29%

tier.basic

Basic

599

499/mo

billed_yearly=₹5,988 · −17%

  • 25 products
  • 5-page site
  • WhatsApp ordering

tier.pro

Pro

popular

1,599

1,499/mo

billed_yearly=₹17,988 · −6%

  • 200 products
  • Cart checkout
  • Custom domain wizard

tier.enterprise

Enterprise

6,999

4,999/mo

billed_yearly=₹59,988 · −29%

  • 3 businesses
  • 2,000 products
  • Priority support

founders_lock(500) · FIRST100(1012)

Ready to ship

Provision your tenant

14-day Pro trial · phone OTP · no credit card in beta