この紹介文は現在英語版のみです。
SonicJS Headless CMS
🚀🚀🚀 SonicJs is the world’s fastest headless CMS / API framework 🚀🚀🚀
It can deliver API requests anywhere in the world in under 100 milliseconds in most cases, giving end users lightning-fast page and app loading speeds.
Built on Astro and optimized for Cloudflare, SonicJs is a headless CMS that leverages the latest web technologies to provide a flexible and scalable content management solution.
Key Features
- Blazing Performance: By deploying code and syncing the entire database across Cloudflare’s global edge network of 200+ nodes, SonicJs dramatically reduces network latency
- Auto-Generated CRUD Endpoints: Define your data schemas and permission rules in code, and SonicJs will automatically generate the relevant endpoints at runtime
- Admin Interface: Manage all your data from a dynamic admin console with search, sorting, editing, and creating new records
- Built on Astro: The admin interface leverages Astro’s power for fast, optimized static site generation
- Cloudflare Integration: Runs seamlessly on Cloudflare for enhanced performance and security
- Tailwind CSS: Uses Tailwind CSS for rapid UI development
- Secure Authentication: Implements secure authentication using
@node-rs/argon2and other crypto libraries - Database Management: Uses Drizzle ORM for database interactions and migrations
- User Management: Manage user account data including roles from the UI
- Authentication: Handle user registration/login in your app using built-in API endpoints
Performance Benchmarks
| Platform | Average Response Time | Performance Gain |
|---|---|---|
| Strapi | 342.1ms | - Baseline - |
| Node + Postgres | 320.2ms | 1.06x faster |
| SonicJs | 52.7ms | 6.4x faster |
Getting Started
Prerequisites
- You’ll need a free Cloudflare account: https://dash.cloudflare.com/sign-up
Installation Steps
-
Clone the repository:
git clone https://github.com/lane711/sonicjs.git cd sonicjs npm install -
Create config file:
cp wrangler.example.toml wrangler.toml -
Create Cloudflare D1 database:
npx wrangler d1 create sonicjsFollow the prompts to log into your Cloudflare account, then copy the database ID from the output
-
Update config file: Add the database ID to
wrangler.toml:[[d1_databases]] binding = "D1" database_name = "sonicjs" database_id = "your-database-id" -
Apply database schema:
npm run up -
Run the app:
npm run dev -
Access the admin interface: Open your browser and go to http://localhost:4321
Tech Stack
- Frontend: Astro + Tailwind CSS
- Backend: Cloudflare Workers
- Database: Cloudflare D1 (SQLite)
- ORM: Drizzle
- Authentication: @node-rs/argon2
- Deployment: Cloudflare Pages/Workers
License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by lane711