Quickstart
Get SonicJS running in under 60 seconds and create your first content-driven application.
Prerequisites
Before you begin, ensure you have the following installed:
- Node.js (version 18 or higher)
- npm or pnpm
- Git
For production deployment, you'll also need a Cloudflare account with access to Workers, D1, KV, and R2.
Quick Start
Create a new SonicJS application with a single command. The setup is fully automated and takes less than 60 seconds:
One-Command Setup
# Create a new SonicJS application
npx create-sonicjs my-app
# Navigate to your project
cd my-app
# Start development server
npm run dev
# Your CMS is now running at http://localhost:8787
The create-sonicjs command automatically:
- β Creates a new project directory
- β Installs all dependencies
- β Sets up the database schema
- β Configures Cloudflare Workers
- β Creates the admin user
- β Runs initial migrations
Your SonicJS instance will be available at http://localhost:8787
Access the admin dashboard at http://localhost:8787/admin
First Steps
Access the Admin Dashboard
Navigate to http://localhost:8787/admin and log in with the default credentials.
The admin interface provides:
- System Overview - Real-time health checks and activity feed
- Content Management - Create, edit, and publish content
- Media Library - Upload and manage media files
- Plugin Management - Install and configure plugins
- User Management - Manage users, roles, and permissions
Create Your First Content
Via Admin UI:
- Navigate to Content β New Content
- Select a collection (e.g., "Blog Posts")
- Fill in the fields and click Save
Via API:
Create Content
# Get auth token
curl -X POST http://localhost:8787/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"admin@sonicjs.com","password":"admin123"}'
# Create content
curl -X POST http://localhost:8787/admin/content \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"collection": "blog_posts",
"title": "My First Post",
"data": {
"slug": "my-first-post",
"content": "<p>Hello World!</p>",
"status": "published"
}
}'
Fetch Content via API
Fetch Content
# Get all content
curl http://localhost:8787/api/content
# Get content by collection
curl http://localhost:8787/api/collections/blog_posts/content
# Get single content item
curl http://localhost:8787/api/content/:id
Next Steps
Now that you have SonicJS running, explore these guides: