# Ormos CMS (@ormos/core) Documentation Index

This is the AI-optimized documentation for `ormos-cms` (`@ormos/core`), a modern, headless, code-first CMS built with `h3` v2, Drizzle ORM, React 19, TanStack Router, Tailwind CSS v4, and `@base-ui/react` / Shadcn UI.

## Architecture & Concepts
- [getting-started/what-is-ormos.md](./getting-started/what-is-ormos.md) - Core philosophy and stack.
- [getting-started/installation.md](./getting-started/installation.md) - Setup guide for backend and admin frontend.
- [getting-started/concepts.md](./getting-started/concepts.md) - Collections vs Globals, Fields, and Hooks.

## Configuration & Admin
- [configuration/overview.md](./configuration/overview.md) - The `RootConfig` and `defineConfig` interface.
- [configuration/collections.md](./configuration/collections.md) - Defining collections, automatic Drizzle type inference (`dbTable`), and `tableTabs`.
- [configuration/globals.md](./configuration/globals.md) - Defining singletons (`createGlobal`).
- [configuration/environment-vars.md](./configuration/environment-vars.md) - Environment variables (PostgreSQL, Better Auth, S3, SMTP).
- [admin/overview.md](./admin/overview.md) - Admin panel SPA architecture and branding.
- [admin/live-preview.md](./admin/live-preview.md) - Document Preview button (`admin.preview`) and real-time Live Preview iframe.
- [admin/auth-pages.md](./admin/auth-pages.md) - Authentication pages (`LoginPage`, `RegisterPage`, `DefaultLoginPage`, `DefaultRegisterPage`).
- [admin/custom-components.md](./admin/custom-components.md) - Admin UI Slots and Custom Views (`Login`, `Register`, `Dashboard`).
- [admin/plugins.md](./admin/plugins.md) - Composable plugins and extensibility.

## Database, Versions & Background Jobs
- [database/overview.md](./database/overview.md) - Drizzle ORM integration and dependency injection.
- [database/migrations.md](./database/migrations.md) - Migration workflows with Drizzle Kit.
- [versions/overview.md](./versions/overview.md) - Drafts, revision history, and `tableTabs`.
- [background-jobs.md](./background-jobs.md) - Jobs Queue architecture and error handling with `pg-boss` (`createJobsCollection`).

## Security & Authentication
- [authentication/overview.md](./authentication/overview.md) - Better Auth integration, middleware, and setup flows.
- [access-control/overview.md](./access-control/overview.md) - Role-based access control (RBAC) and Row-Level Security (RLS) Where queries.

## Fields, Rich Text & Uploads (Data Modeling)
- [fields/overview.md](./fields/overview.md) - Discriminated Unions pattern (`ResourceField`).
- [fields/data-fields.md](./fields/data-fields.md) - Text, Number, Slug, Select, Relation, Array, Blocks, Group, Upload fields.
- [fields/layout-fields.md](./fields/layout-fields.md) - Row, Tabs, Collapsible, UI fields.
- [rich-text/overview.md](./rich-text/overview.md) - Lexical rich text editor and AST storage.
- [upload/overview.md](./upload/overview.md) - Upload collections, S3 storage lifecycle, Sharp image sizes, FFMPEG video transcoding, and Media Picker.

## API, Hooks & Publishing
- [rest-api/overview.md](./rest-api/overview.md) - REST API endpoints, query parsing (`where`, `sort`, `limit`), and bulk operations.
- [rest-api/local-api.md](./rest-api/local-api.md) - Server-side Local API (`getOrmos`, Drizzle type inference, `OrmosTypeRegistry`, lifecycle hooks, access control, shortcuts).
- [hooks/overview.md](./hooks/overview.md) - Lifecycle hooks (`beforeValidate`, `beforeChange`, `afterChange`, `beforeRead`, `afterRead`, `beforeDelete`, `afterDelete`).
- [publishing.md](./publishing.md) - Private NPM registry publishing workflow via Forgejo Actions.

## MDC Rules (Modular Documentation for Cursor/AI)
- [rules/database-rules.md](./rules/database-rules.md)
- [rules/ui-rules.md](./rules/ui-rules.md)
- [rules/fields-rules.md](./rules/fields-rules.md)
