tutorialsgetting-started

Getting Started Guide

A comprehensive guide to getting started with Edge CMS. Learn how to set up your environment, create your first content, and deploy to production in minutes.

usr_admin_001
Getting Started Guide

Getting Started Guide

This guide will walk you through setting up and using Edge CMS for your projects. Let's get started!

Prerequisites

Before you begin, make sure you have:

  • Node.js 18+ installed
  • A Cloudflare account (free tier works great)
  • Basic knowledge of JavaScript/TypeScript
  • Git for version control

Installation

Clone the repository and install dependencies:

git clone https://github.com/yourusername/svelte-edge-cms.git\ncd svelte-edge-cms\nnpm install

Database Setup

Create a Cloudflare D1 database:

# Create the database\nnpx wrangler d1 create svelte-edge-cms-db\n\n# Run migrations\nnpx wrangler d1 migrations apply svelte-edge-cms-db --remote

Configuration

Copy the example environment file and configure your settings:

cp .env.example .env

Update the wrangler.toml file with your database ID.

Development

Start the development server:

npm run dev

Your CMS will be available at http://localhost:5173

Creating Your First Content

1. Register an Admin User

Navigate to /admin/register and create your admin account.

2. Create a Page

Go to /admin/pages and click "New Page". Fill in the details and publish.

3. Write a Blog Post

Visit /admin/posts to create your first blog post with the rich text editor.

API Usage

Edge CMS provides a RESTful API for headless CMS use cases:

# Get all published pages\nGET /api/v1/pages\n\n# Get a specific post\nGET /api/v1/posts/:slug\n\n# Create new content (requires authentication)\nPOST /api/v1/pages

Deployment

Deploy to Cloudflare Pages:

npm run build\nnpx wrangler pages deploy .svelte-kit/cloudflare

Your CMS is now live on Cloudflare's global edge network!

Next Steps

  • Explore the API documentation
  • Customize the frontend theme
  • Set up custom domains
  • Configure caching strategies
  • Add custom content types

Need Help?

Check out our documentation or reach out to the community for support.

About the Author

Written by usr_admin_001

Share this article

Want to Learn More?

Explore more articles or get in touch with our team