Use and adapt sonicjs
Use and adapt sonicjs: SonicJS - The edge-native headless CMS for Cloudflare Workers. Sub-100ms response times, zero cold starts, TypeScript-first. Built on D1, R2, and Hono.
Use the documented interfaces and source layout for sonicjs. The sections below retain the README’s examples and configuration details.
Project Structure
sonicjs/
├── packages/
│ ├── core/ # 📦 Main CMS package (@sonicjs-cms/core)
│ │ ├── src/
│ │ │ ├── routes/ # Route handlers (admin, API, auth)
│ │ │ ├── templates/ # HTML templates & components
│ │ │ ├── middleware/# Authentication & middleware
│ │ │ ├── utils/ # Utility functions
│ │ │ └── db/ # Database schemas & migrations
│ │ └── package.json
│ ├── templates/ # Template system package
│ └── scripts/ # Build scripts & generators
│
├── my-sonicjs-app/ # 🧪 Test application (gitignored)
│ # Created with: npx create-sonicjs@latest
│
├── www/ # 🌐 Marketing website
└── tests/e2e/ # End-to-end test suites⚠️ This is NOT an application repository — it's for developing the @sonicjs-cms/core npm package.
Plugin Development
// src/plugins/my-plugin/index.ts
import type { Plugin, PluginContext } from '@sonicjs-cms/core'
export default {
name: 'my-plugin',
version: '1.0.0',
description: 'My custom plugin',
async activate(context: PluginContext) {
// Runs when the plugin is activated
},
async install(context: PluginContext) {
// Runs once on install — migrations, seed data, etc.
},
} satisfies PluginCommands in the root manifest
The captured package.json declares the following scripts. Run them from the directory containing that manifest.
| Command | Script |
|---|---|
npm run dev | npm run dev --workspace=my-sonicjs-app |
npm run build | npm run build:core && npm run build --workspace=my-sonicjs-app |
npm run test | npm run test --workspace=@sonicjs-cms/core |
npm run lint | npm run type-check |
Troubleshoot a local change
- Reproduce the smallest example from the quick-start guide.
- Compare required configuration and dependency versions with the README.
- Check the linked issue tracker for the same error. Include the command, runtime version, and relevant error when reporting a problem; omit credentials.
Source and help
The catalog identifies the license as MIT. Read the repository license before redistributing source or assets.
This catalog entry is a fork. The README may describe upstream packages, domains, or release procedures; those destinations do not establish a separate release of this fork.
Source captured: 2026-10-11
