Skip to content

Getting Started

Prerequisites

Quick Start

The fastest way to create a new Viseed CMS project is with the viseed CLI.

bash
bunx @viseed/cli init my-site
cd my-site
bun install

Set your database connection string:

bash
export DATABASE_URL="postgresql://user:password@localhost:5432/hana"

Push the schema to your database and start the server:

bash
bunx viseed db push
bun run dev

Your CMS is now running at http://localhost:3000. The admin panel is available at http://localhost:3000/admin.

Default admin credentials (first run only):

FieldValue
Emailadmin@local.dev
Password12345678

Custom admin account

Override the defaults with environment variables before the first run:

bash
export HANA_ADMIN_EMAIL="you@example.com"
export HANA_ADMIN_PASSWORD="secure-password"
export HANA_ADMIN_NAME="Admin"

Manual Setup

If you prefer to scaffold the project yourself instead of using the CLI:

bash
mkdir my-site && cd my-site
bun init -y
bun add @viseed/core @viseed/plugin-auth @viseed/plugin-blog
bun add -d @viseed/cli

Create src/index.ts:

typescript
import { createCMS } from '@viseed/core'
import { authPlugin } from '@viseed/plugin-auth'
import { blogPlugin } from '@viseed/plugin-blog'

const cms = createCMS({
  db: {
    driver: 'postgres',
    url: process.env.DATABASE_URL ?? 'postgresql://localhost:5432/hana',
  },
})

cms.use(authPlugin())
cms.use(blogPlugin())

const app = await cms.launch()

Bun.serve({
  port: Number(process.env.PORT) || 3000,
  fetch: app.fetch,
})

Push schema and run:

bash
export DATABASE_URL="postgresql://user:password@localhost:5432/hana"
bunx viseed db push
bun run src/index.ts

Project Structure

A minimal Viseed CMS project looks like this:

my-site/
├── src/
│   └── index.ts       # Entry point — createCMS, plugins, themes
├── package.json
└── tsconfig.json

The CLI-generated project (viseed init) produces the same structure with sensible defaults already configured.


Next Steps