RaisFastRaisFast
Getting Started

Quick Start

Get RaisFast running in 5 minutes — install, launch, and start building.

This guide gets you from zero to a running RaisFast server in the fastest way possible.

Step 1 — Start the Server

Make sure RaisFast is installed (see Installation), then just run:

raisfast

That's it. The server starts at http://0.0.0.0:9898 with sensible defaults.

What happens on first run?

  • Database — SQLite file is auto-created at ./storage/db/raisfast.db
  • Schema — All tables are auto-created with IF NOT EXISTS
  • APP_KEY — A 32-byte encryption key is auto-generated and persisted to .env

Verify it works

curl http://localhost:9898/health

Open your browser:

URLDescription
http://localhost:9898/adminAdmin SPA
http://localhost:9898/api/docsSwagger UI (OpenAPI)
http://localhost:9898/api/v1/routesList all registered routes
http://localhost:9898/api/v1/infoServer name, version, API style

Seed admin user

Create the initial admin account:

# Use defaults: admin@raisfast.dev / admin / admin123
raisfast db seed

# Or specify credentials
raisfast db seed --email admin@example.com --username superadmin --password MyStr0ngP@ss

The seed command is idempotent — it skips if the username already exists.

Test the API

# Login as admin
curl -X POST http://localhost:9898/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"admin@raisfast.dev","password":"admin123"}'

# Create a post (replace TOKEN with the access_token from login response)
curl -X POST http://localhost:9898/api/v1/admin/posts \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer TOKEN" \
  -d '{"title":"Hello World","content":"My first post!"}'

Step 2 — Create a Project (Optional)

For a structured project with content types and plugins, use the scaffolding command:

# Create a blank project
raisfast app new my-site

# Or use a template
raisfast app new my-blog -t blog
raisfast app new my-shop -t ecommerce

The generated structure:

my-site/
├── config.toml
├── .env.example
├── .gitignore
├── extensions/
│   ├── content_types/    — Content Type TOML definitions
│   └── plugins/          — Plugin JS/Lua/WASM files
├── migrations/
├── data/
├── logs/
└── public/uploads/

Then configure and run:

cd my-site
cp .env.example .env
raisfast db migrate   # Only needed for subsequent schema updates
raisfast db seed
raisfast

Common Configuration

The minimal .env you need:

APP_ENV=development
DATABASE_URL=sqlite:./storage/db/raisfast.db?mode=rwc

All other settings have sensible defaults. Here are the most important ones:

# ── Core ──
APP_HOST=0.0.0.0
APP_PORT=9898
APP_ENV=development           # development | production

# ── Security (MUST change in production) ──
JWT_SECRET=change-me-in-production-at-least-32-chars
JWT_ACCESS_EXPIRES=900        # 15 minutes
JWT_REFRESH_EXPIRES=604800    # 7 days

# ── Storage ──
STORAGE_DRIVER=local          # local | s3
UPLOAD_DIR=./storage/uploads
MAX_UPLOAD_SIZE=104857600     # 100 MB

# ── Plugins ──
PLUGIN_DIR=./extensions/plugins
PLUGIN_HOT_RELOAD=false

# ── Search ──
SEARCH_ENGINE=none            # none | tantivy

# ── Worker ──
WORKER_ENABLED=false
WORKER_CONCURRENCY=2

Production Checklist

Before deploying to production, make sure to:

  1. Change JWT_SECRET — The server will refuse to start with the default value in production mode
  2. Set CORS_ORIGINS — The server will refuse to start without it in production mode
  3. Set APP_ENV=production — Enables production safety checks
  4. Enable TLS — Either via TLS_CERT_PATH / TLS_KEY_PATH or a reverse proxy
  5. Set BASE_URL — Required for correct media URLs, RSS feeds, etc.
  6. Backup strategy — Use raisfast db backup or configure external backup
APP_ENV=production
JWT_SECRET=<your-strong-secret-at-least-32-chars>
CORS_ORIGINS=https://yourdomain.com
BASE_URL=https://api.yourdomain.com

CLI Reference

RaisFast comes with a full-featured CLI:

raisfast <command> [options]

Server Management

CommandDescription
raisfast server startStart the HTTP server
raisfast server stopStop the running server
raisfast server restartRestart the server
raisfast server statusShow running status

Database

CommandDescription
raisfast db migrateRun pending migrations
raisfast db rollbackRollback last migration batch
raisfast db backupBackup database to timestamped file
raisfast db seedCreate initial admin user

Scaffolding

CommandDescription
raisfast app new <name>Create a new project
raisfast ct new <name>Create a content type TOML file
raisfast plugin new <id>Create a plugin scaffold

Diagnostics

CommandDescription
raisfast doctorSystem diagnostics
raisfast route listList all registered routes
raisfast route statsRoute statistics

Next Steps

On this page