Skip to content

Getting Started

The fastest way to start a new Arche CMS project:

bash
npx @arche-cms/create-app my-project
cd my-project
pnpm dev

This scaffolds a ready-to-go project with example collections, globals, and configuration.

Manual Setup

Prerequisites

  • Node.js 22+
  • pnpm
  • SQLite (default) or PostgreSQL

Installation

bash
# Clone the repository
git clone https://github.com/Arche-CMS/arche-cms.git
cd arche-cms

# Install dependencies
pnpm install

# Start development servers
pnpm dev

This starts:

  • API server at http://localhost:3000
  • Admin UI at http://localhost:5173 (with --vite flag)
  • Swagger UI at http://localhost:3000/docs
  • GraphiQL at http://localhost:3000/graphiql

In production (cms start), the admin panel is served from the same port as the API.

Project Structure

my-project/
├── cms/
│   ├── collections/    # Your collection definitions
│   ├── globals/        # Your global definitions
│   └── components/     # Your component definitions
├── .env                # Environment variables
├── package.json
└── Dockerfile          # Generated by create-app

Monorepo structure (for contributors):

arche-cms/
├── apps/
│   ├── docs/           # Documentation site
│   └── playground/     # Dev playground
├── packages/
│   ├── cms/            # CLI + server logic + admin panel
│   ├── core/           # DI container, event bus, lifecycle, logger
│   ├── schema/         # Schema definition API
│   ├── database/       # Database adapter layer (Drizzle ORM)
│   ├── auth/           # JWT authentication
│   ├── permissions/    # RBAC / permissions engine
│   ├── storage/        # File storage adapters
│   ├── rest-api/       # REST API generator
│   ├── graphql/        # GraphQL schema generator
│   ├── validation/     # Zod validation generator
│   ├── generators/     # Code generation pipeline
│   ├── plugins/        # Plugin system + official plugins
│   ├── create-app/     # Project scaffolding CLI
│   ├── sdk/            # TypeScript client SDK
│   └── types/          # Shared TypeScript types

Your First Collection

Create cms/collections/posts.ts:

ts
import { defineCollection, text, slug, richText, relation, select } from "@arche-cms/schema";

export default defineCollection({
  slug: "posts",
  labels: { singular: "Post", plural: "Posts" },
  fields: [
    text("title", { validation: { required: true } }),
    slug("slug", { from: "title" }),
    richText("content"),
    relation("author", { to: "users" }),
    select("status", { options: ["draft", "published"] }),
  ],
});

The CMS automatically:

  • Generates TypeScript types
  • Creates database tables and migrations
  • Exposes REST + GraphQL APIs
  • Generates the Admin UI form
  • Creates Zod validation schemas
  • Sets up permissions

Default Admin Account

On first start, Arche auto-creates a default admin account:

EmailPassword
admin@arche-cms.comadmin123

Change this password after your first login.

AUTH_SECRET

In production (cms start), you must set the AUTH_SECRET environment variable:

bash
export AUTH_SECRET=$(openssl rand -hex 32)
cms start

In development (cms dev), a temporary secret is auto-generated if not set.

Released under the MIT License.