# Project Structure

Reference

- [Getting Started](https://spacepress.dev/docs/getting-started/)
  - [Installation & Setup](https://spacepress.dev/docs/getting-started/installation/)
  - [Project Structure](https://spacepress.dev/docs/getting-started/project-structure/)
- [Core Framework](https://spacepress.dev/docs/core/)
  - [Schema & Storage](https://spacepress.dev/docs/core/schema-and-storage/)
  - [Queries & Access Control](https://spacepress.dev/docs/core/queries-and-access/)
  - [Actions, Jobs, Hooks & HTTP Routes](https://spacepress.dev/docs/core/actions-jobs-routes/)
  - [Pages, Layouts & Interactive Islands](https://spacepress.dev/docs/core/pages-and-islands/)
- [Integrations & Ecosystem](https://spacepress.dev/docs/integrations/)
  - [Two-Way Markdown & Git Sync](https://spacepress.dev/docs/integrations/markdown-sync/)
  - [WooCommerce Native Storefront](https://spacepress.dev/docs/integrations/woocommerce/)
  - [React Email Templates](https://spacepress.dev/docs/integrations/react-email/)
  - [Astro & Generated Typed Clients](https://spacepress.dev/docs/integrations/astro-and-clients/)
- [Operations & Tooling](https://spacepress.dev/docs/operations/)
  - [CLI & Deployment](https://spacepress.dev/docs/operations/cli-and-deploy/)
  - [MCP & AI Agents](https://spacepress.dev/docs/operations/mcp-and-agents/)
  - [Deploy on Spacefast](https://spacepress.dev/docs/operations/deploy-spacefast/)
  - [Deploy on Pressable & WordPress.com (WP Cloud)](https://spacepress.dev/docs/operations/deploy-wp-cloud/)
  - [Deploy on Self-hosted WordPress](https://spacepress.dev/docs/operations/deploy-self-hosted/)
- [Reference](https://spacepress.dev/docs/reference/)
  - [Host Contract](https://spacepress.dev/docs/reference/host-contract/)
  - [Tested Compiler Compatibility](https://spacepress.dev/docs/reference/language-support/)

# Project Structure

> For AI coding agents: start with [/start.md](/start.md) (build playbook) and [/rules.md](/rules.md) (compiler rules), see [/llms.txt](/llms.txt) for the complete documentation index, or read this page as Markdown at [/md/docs/getting-started/project-structure.md](/md/docs/getting-started/project-structure.md).

[View Markdown.md source ↗](/md/docs/getting-started/project-structure.md)[Open in ChatGPTAsk about this page ↗](https://chatgpt.com/?q=Read%20https%3A%2F%2Fspacepress.dev%2Fmd%2Fdocs%2Fgetting-started%2Fproject-structure.md%20%28Project%20Structure%29%20and%20help%20me%20with%20questions%20about%20it.)[Open in ClaudeAsk about this page ↗](https://claude.ai/new?q=Read%20https%3A%2F%2Fspacepress.dev%2Fmd%2Fdocs%2Fgetting-started%2Fproject-structure.md%20%28Project%20Structure%29%20and%20help%20me%20with%20questions%20about%20it.)[start.mdAgent build playbook ↗](/start.md)[rules.mdCompiler rules ↗](/rules.md)[llms.txtFull site index ↗](/llms.txt)

Layout of a SpacePress repository, authored files vs generated artifacts.

## Directory layout

```text
my-app/
├── typedpress.config.ts   # Entry point: defineConfig() + re-exports
├── tsconfig.json          # Maps "typedpress", "typedpress/*", "typedpress:db"
├── tp/
│   ├── schema.ts          # Collections, SQL tables, globals, taxonomies, stores
│   ├── server.ts          # Actions, background jobs, mail helpers
│   ├── app/               # File-based TSX pages, layouts, and route.ts handlers
│   ├── components/        # Server and "use client" components
│   ├── wp-hooks/          # Typed WordPress core action & filter handlers
│   ├── _generated/        # db.d.ts, routes.d.ts, openapi.json, client/, migrations/
│   └── dist/wp-content/   # Compiled WordPress plugins ready to deploy
├── content/               # Markdown/JSON content synced with WordPress
├── emails/                # React Email (.tsx) templates
└── public/                # Static assets served from site root
```

## What to commit to Git

Commit everything you author (`typedpress.config.ts`, `tp/schema.ts`, `tp/app/`, `content/`, `emails/`, `public/`) **plus** these compiler lock/ledger files:

- `tp/\_generated/migrations/` (`snapshot.json` and numbered `\*.sql` files) — tracks schema history for safe incremental deploys.
- `tp/\_generated/wp-plugins.lock.json` — locks WordPress plugin versions and SHA-256 checksums.
- `tp/\_generated/plugins.lock.json` — locks capability grants for `use` plugin packages.
- `tp/\_generated/abilities.json` & `tp/\_generated/runtime-schema.json` — when using pulled WordPress Abilities or runtime schema versions.

`tp/dist/` is a build artifact and is typically git-ignored.

[← Previous**Installation & Setup**](https://spacepress.dev/docs/getting-started/installation/)[Next →**Core Framework**](https://spacepress.dev/docs/core/)

On this page

- [Directory layout](#directory-layout)
- [What to commit to Git](#what-to-commit-to-git)
