跳到正文

SonicJS

热门趋势维护中
SonicJs-Org/sonicjs

SonicJs 无头 CMS——基于 Cloudflare Workers 的极速无头 CMS,100% 使用 JavaScript,可在全球任意位置于 100 毫秒内响应 API 请求。

在 GitHub 查看
星标
1628
Fork
206
关注
1628
未关闭 Issue
88

该介绍目前仅提供英文版本。

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/argon2 and 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

  1. You’ll need a free Cloudflare account: https://dash.cloudflare.com/sign-up

Installation Steps

  1. Clone the repository:

    git clone https://github.com/lane711/sonicjs.git
    cd sonicjs
    npm install
  2. Create config file:

    cp wrangler.example.toml wrangler.toml
  3. Create Cloudflare D1 database:

    npx wrangler d1 create sonicjs

    Follow the prompts to log into your Cloudflare account, then copy the database ID from the output

  4. Update config file: Add the database ID to wrangler.toml:

    [[d1_databases]]
    binding = "D1"
    database_name = "sonicjs"
    database_id = "your-database-id"
  5. Apply database schema:

    npm run up
  6. Run the app:

    npm run dev
  7. 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

按共同分类和标签排序的同类开源项目。

全部 CMS 项目 →