MonoStack

Project Structure

Overview

monostack-v2/
├── .agents/skills/            # Shared AI workflows
├── apps/                     # SvelteKit applications
│   └── [app-name]/
│       ├── src/
│       │   ├── lib/
│       │   │   └── domains/  # Feature domains
│       │   │       └── [domain]/
│       │   │           ├── database/    # *.remote.ts files
│       │   │           ├── utils/       # schemas.ts (Zod)
│       │   │           └── components/  # Domain UI
│       │   └── routes/
│       └── package.json
│
├── packages/                 # Shared libraries
│   ├── actions/             # Action patterns
│   ├── analytics/           # Analytics
│   ├── auth/                # Authentication
│   ├── cms/                 # CMS components
│   ├── components/          # UI components
│   ├── config/              # Config utilities
│   ├── db/                  # Database layer
│   ├── form/                # Form utilities
│   ├── notifications/       # Notifications
│   ├── queue/               # Job queue
│   ├── storage/             # File storage
│   ├── table/               # Data tables
│   └── utils/               # Utilities
│
├── turbo.json               # Turbo config
├── pnpm-workspace.yaml      # Workspace config
└── package.json

Package Naming

All packages use the @repo/ namespace:

import { Button } from '@repo/components'
import { createForm } from '@repo/form'
import { db } from '@repo/db'

Domain Structure

Each domain in an app follows this pattern:

domains/[domain]/
├── database/
│   ├── queries.remote.ts    # Data fetching
│   └── mutations.remote.ts  # Data mutations
├── utils/
│   └── schemas.ts           # Zod schemas
└── components/
    └── DomainComponent.svelte

Use .remote.ts files for server-side code that can be called from components.

Next Steps

On this page