architecture/

Purpose

System-wide technical decisions and conventions that apply across all modules.

What belongs here

  • Overall architecture (tenancy model, RLS, offline strategy, real-time, snapshots, signatures, AI capacity/cost).
  • Schema conventions (naming, required columns, money, timestamps, soft-delete, partial-unique rules).

What does NOT belong here

  • Per-module schema → database/ and modules//.
  • The "why" behind a specific decision → decisions/ (ADR).
  • The build process / gates → process/.

Tech Stack

Monorepo

Tool Role
npm workspaces Package linking across apps/*, apps/web/*, and packages/*
Turborepo Task pipeline — build, dev, lint, type-check with caching

Apps

apps/web/ groups the three frontend surfaces as separate Next.js apps/deployables (not route groups of one app) — each maps to its own subdomain and ships independently.

App Tech Subdomain Local port Status
apps/api NestJS 11 (TypeScript) 3000 in progress
apps/web/admin Next.js (TypeScript, App Router) admin.vrida.app 3000 in progress
apps/web/tenant Next.js (TypeScript, App Router) tenant.vrida.app 3000 in progress — 9 mockup pages, no wiring
apps/web/storefront Next.js (TypeScript, App Router) (consumer-facing) planned

Shared

Package Role
packages/types Shared TypeScript contracts between api and web

Local infrastructure (Supabase)

Service URL
API / PostgREST http://127.0.0.1:54321
Studio http://127.0.0.1:54323
Database postgresql://postgres:postgres@127.0.0.1:54322/postgres
Edge Functions http://127.0.0.1:54321/functions/v1
Storage (S3) http://127.0.0.1:54321/storage/v1/s3

supabase start pulls images on first run (~2–3 GB, one-time). Subsequent starts take ~15s.

Source of truth

Live status/counts → /index.

Last modified: Jun 30, 2026, 10:03 PM PT
On this page
Esc