Project template
Recommended monorepo structure for a standards application.
standards apps fit cleanly into a Turborepo + pnpm workspace monorepo — this is the structure tiepolo uses and the structure assumed throughout this documentation.
Tree
my-app/
├── apps/
│ ├── api/ # NestJS backend
│ └── web/ # Next.js frontend
├── packages/
│ ├── schema/ # @my-app/schema — object & view definitions
│ ├── supabase/ # @my-app/supabase — generated DB types
│ ├── i18n/ # (optional) translations
│ └── tsconfig/ # shared TypeScript config
├── supabase/
│ ├── migrations/ # SQL migrations
│ └── config.toml # Supabase CLI config
├── pnpm-workspace.yaml
├── turbo.json
└── package.jsonWhat lives where
apps/api is the NestJS application. It mounts SchemaModule from @stndrds/adapter-nestjs, registers adapters (Supabase, Meilisearch, Redis), and exposes the REST + SSE layer. It imports @my-app/schema to get the registered object definitions.
apps/web is the Next.js application. It wraps the app with SchemaClientProvider from @stndrds/react, renders views using @stndrds/ui components, and reads schema definitions from @my-app/schema for type-safe hooks.
packages/schema is pure TypeScript — no framework dependencies, no server code. Object definitions, attribute builders, and view configurations all live here. Both api and web depend on it; it is the single source of truth for your data model.
packages/supabase holds the generated Database type produced by supabase gen types. Sharing it as a package keeps api and web in sync with the same DB snapshot.
supabase/migrations contains DDL and RLS policies, generated and applied via the Supabase CLI. @stndrds/adapter-supabase provides helper scripts that scaffold the baseline migration — see Supabase setup.
pnpm + turbo
Declare both app and package workspaces in pnpm-workspace.yaml:
packages:
- "apps/*"
- "packages/*"turbo.json wires the build pipeline so that packages/schema always builds before apps/api and apps/web. tiepolo's turbo.json also defines dev, lint, format, and test tasks with the correct dependency graph — use it as a reference when bootstrapping your own workspace.
tiepolo is a real consumer of this template — a fuller reference for testing CLI scripts, deployment configs, and more.