Quickstart Guide
Welcome to FlowCMS. This guide will help you install, configure, and run your first content project in under 5 minutes. By the end, you'll have a fully functional headless CMS instance ready for development.
1. Install the CLI
The FlowCMS CLI is the primary tool for project initialization, development server management, and deployment.
# Install globally using npm
npm install -g @flowcms/cli
# Verify installation
flowcms --version
2. Initialize a Project
Create a new directory and initialize a FlowCMS project. The CLI will scaffold the recommended structure, including configuration files, content models, and sample data.
mkdir my-flowcms-site \&\& cd my-flowcms-site
flowcms init
# Choose template: "Starter" (recommended)
# Confirm configuration: "Yes"
3. Configure API Credentials
FlowCMS uses API keys for secure communication. Copy your keys from the dashboard and update the environment file.
| Variable | Description | Required |
|---|---|---|
FLOWCMS_API_KEY |
Your project's secret API key | â Yes |
FLOWCMS_PROJECT_ID |
Unique identifier for your workspace | â Yes |
FLOWCMS_ENV |
Runtime environment (development, production) | â No |
.env files to version control. Add them to your .gitignore and use environment variables in production deployments.
4. Start the Development Server
Once configured, spin up the local development environment. This includes the admin dashboard, API endpoints, and hot-reload support.
flowcms dev
# Output:
# â FlowCMS v2.4.1 started
# đ Dashboard: http://localhost:3000/admin
# đĄ API: http://localhost:3000/api/v2
# ⥠HMR enabled. Press Ctrl+C to stop.
5. Create Your First Content Model
Models define your content structure. Use the visual editor in the dashboard or define them programmatically via flowcms/models.
import { defineModel, fields } from '@flowcms/core';
export default defineModel('blog-post', {
title: fields.text({ required: true, maxLength: 120 }),
slug: fields.slug('title'),
content: fields.richText(),
author: fields.relation('user', { multiple: false }),
status: fields.select([
{ value: 'draft', label: 'Draft' },
{ value: 'published', label: 'Published' }
], { defaultValue: 'draft' })
});
http://localhost:3000/admin to start creating content. Check out the API Reference to query your data in your applications.