CtrlK
BlogDocsLog inGet started
Tessl Logo

sonicjs-cms/sonicjs-cms

SonicJS headless CMS knowledge base, coding standards, and architectural guidelines.

74

Quality

93%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

SonicJS CMS Documentation Index

This index provides a structured map of all available documentation for SonicJS CMS. AI Agents should refer to these references to learn about domain-specific concepts, configurations, and APIs before executing implementation tasks.

📦 Package Installation

To install SonicJS in a Cloudflare Workers or Hono environment:

# Using npm
npm create sonicjs@latest my-project
cd my-project
npm install

🔗 Core Imports

Most functionality is accessed via the @sonicjs-cms/core package.

import { requireAuth, requireRole } from '@sonicjs-cms/core'
import { collections } from './db/schema'
import { eq } from 'drizzle-orm'

💻 Usage Examples

Initialize D1 Database and Run Migrations

# Create local and production D1 instances
wrangler d1 create sonicjs-ai
npm run db:migrate:local

Basic API Route with RBAC

app.use('/api/admin/*', requireRole(['admin', 'editor']))
app.get('/api/admin/stats', async (c) => {
  return c.json({ status: 'success', data: {} })
})

📖 API Reference & Documentation Map

🚀 Getting Started

  • Quickstart - Get up and running with SonicJS.
  • Configuration - Setting up the environment and general configurations.

🏗️ Core Concepts

  • Architecture - System architecture and overall design patterns.
  • Collections - Defining and interacting with data collections.
  • Database - D1 Database configuration, queries, and migrations.
  • API - Utilizing the internal and external REST/GraphQL APIs.
  • Routing - Handling paths and endpoints in SonicJS.

⚡ Features & Modules

  • Authentication - Auth workflows, permissions, and session management.
  • Plugins - Creating and consuming SonicJS plugins.
  • Templating - UI Templating and rendering.
  • Webhooks - Emitting and handling webhooks.
  • Attachments - Handling file attachments and media processing.
  • Forms - Form creation and submission handling.
  • Pagination - Fetching paginated records.

🧩 Additional Features

🛠️ Developer Reference

  • Coding Standards - Best practices and conventions.
  • Hooks - Lifecycle hooks available to developers.
  • Field Types - Supported schema field types.
  • Errors - Error handling and common status codes.
  • Caching - KV caching mechanisms and cache invalidation.
  • Security - Securing collections and access control logic.
  • Testing - Playwright and unit testing instructions.
  • Telemetry - Instrumentation and logging.
  • SDKs - Client SDK usage.

🚀 Operations

💡 Guides & Community

  • Examples - Code snippets and use-cases.
  • FAQ - Frequently asked questions.
  • Community - Community discussion links.
  • Contributing - How to contribute to the open-source repo.
  • Contacts - Team and support contacts.
  • Sponsor - Project sponsorship info.

📅 Updates & Roadmap

Workspace
sonicjs-cms
Visibility
Public
Created
Last updated
Publish Source
CLI
Badge
sonicjs-cms/sonicjs-cms badge