Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ See the [Self-Hosting guide](https://sonicjs.com/self-hosting) for Docker Compos

### AI-Native Content Layer
- **🤖 Native MCP Server**: Auto-generated tools let Claude Code, Cursor, and VS Code read, create, and publish content
- **⚡ GraphQL API**: Full GraphQL endpoint with GraphiQL playground — opt-in plugin, zero config
- **🔍 RAG-Powered Search**: Semantic search with natural-language queries — zero extra infra
- **🛠 12 Specialized Claude Code Agents**: Purpose-built agents for development ([View all agents](https://sonicjs.com/ai-agents))

Expand Down Expand Up @@ -93,7 +94,7 @@ See the [Self-Hosting guide](https://sonicjs.com/self-hosting) for Docker Compos
| **Global locations** | 300+ | 1 region | 1 region |
| **Version history** | Free | Paywalled | Paywalled |
| **SSO / Audit logs** | Free | $99+/mo | $99+/mo |
| **AI / MCP** | Included | Upsold | Upsold |
| **AI / MCP / GraphQL** | Included | Upsold | Upsold |
| **License** | MIT (all features) | MIT (limited) | MIT (limited) |

> SonicJS is the **only production-ready CMS** built specifically for edge computing.
Expand Down Expand Up @@ -300,6 +301,40 @@ export default createSonicJSApp({ plugins: { register: [] } })
- `GET /api/collections/:collection/content` - Get content by collection
- `GET /api/collections` - List all collections

### GraphQL API

Opt-in plugin — add `graphqlPlugin()` to `plugins.register`:

```typescript
import { graphqlPlugin, createSonicJSApp } from '@sonicjs-cms/core'

export default createSonicJSApp({
plugins: { register: [graphqlPlugin()] },
})
```

- `GET /graphql` — GraphiQL playground (interactive browser IDE)
- `POST /graphql` — Execute queries and mutations (Bearer API key auth)

```graphql
# Query published documents
query {
documents(typeId: "blog_posts", status: "published", limit: 10) {
items { id title slug status publishedAt data }
cursor
}
}

# Create a document (requires API key)
mutation {
createDocument(typeId: "blog_posts", title: "Hello", data: {}) {
id rootId isCurrentDraft
}
}
```

Supports: `documents`, `document(id)` queries · `createDocument`, `updateDocument`, `publishDocument`, `unpublishDocument`, `deleteDocument` mutations · `JSON` scalar · keyset pagination.

## 🚀 Deployment

```bash
Expand Down
3 changes: 2 additions & 1 deletion my-sonicjs-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
createSonicJSApp,
emailReconciliationPlugin,
getHookSystem,
graphqlPlugin,
mcpPlugin,
redirectPlugin,
registerCollections,
Expand All @@ -35,7 +36,7 @@ const config: SonicJSConfig = {
plugins: {
// Add plugins to this array to activate them. Each plugin's register()
// runs synchronously at startup; onBoot() runs async on first request.
register: [redirectPlugin, examplePlugin, mcpPlugin()],
register: [redirectPlugin, examplePlugin, mcpPlugin(), graphqlPlugin()],
disableAll: false,
},
};
Expand Down
4 changes: 2 additions & 2 deletions my-sonicjs-app/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ workers_dev = true
# Note: database_name and database_id are automatically updated by GitHub Actions
[[d1_databases]]
binding = "DB"
database_name = "sonicjs-worktree-lane711-v3-beta-issue-triage"
database_id = "02e853a0-e3cc-49fb-990e-2b679513f10a"
database_name = "sonicjs-worktree-lane711-graphql-integration-plan"
database_id = "86a764d1-a166-4243-b8e0-c4a729e06610"
migrations_dir = "./migrations"

# R2 Bucket for media storage (using CI bucket)
Expand Down
Loading
Loading