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.
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 installDatabase 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 --remoteConfiguration
Copy the example environment file and configure your settings:
cp .env.example .envUpdate the wrangler.toml file with your database ID.
Development
Start the development server:
npm run devYour 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/pagesDeployment
Deploy to Cloudflare Pages:
npm run build\nnpx wrangler pages deploy .svelte-kit/cloudflareYour 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