Skip to content

TooonyChen/sbsm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 简体中文

SBSM

Sing-box Subscription Manager

Deploy to Cloudflare Workers


SBSM is a lightweight admin console and Cloudflare Worker based for managing Sing-box subscription links, groups, and share tokens. It combines an edge-deployed API (via Cloudflare Workers + D1) with a modern Next.js dashboard for administrators.


🚀 Quick Start

1. Environment Setup

Make sure you have:

  • Node.js v18+

  • pnpm or npm

  • Wrangler CLI

    npm install -g wrangler

2. Prepare and Configure the Worker

cd worker
npm install
cp wrangler.toml.example wrangler.toml
# Fill in your Cloudflare account_id, D1 database_id, and bindings
npm run migrate --remote   # Apply migrations to the D1 database

3. Deploy to Cloudflare

npm run deploy

4. Access the Dashboard

Use the hosted dashboard at 👉 sbsm.pages.dev

Or, if you prefer to self-host the frontend:

Self-hosting (Optional)

cd ../frontend
npm install
npm run build
npm run export     # Static output under /out

Upload the contents of out/ to your hosting platform (e.g., Cloudflare Pages, Vercel). Then visit your deployed dashboard, log in with your configured credentials, and connect it to the Worker endpoint.


🧱 Project Architecture

Directory Description
worker/src/ Cloudflare Worker entrypoint (index.ts), route handlers (routes/), database layer (db/), and shared utilities (lib/).
frontend/src/app/ Next.js 13+ app router, layouts, routes, and metadata. Components and hooks live under components/ and hooks/.
migrations/ D1 schema migrations (0001_init.sql) defining VPN link, group, subscription, and configuration tables.
docs/ Design notes, frontend guidelines, and operational walkthroughs.

🖥️ Screenshot

Screenshot 2025-10-12 at 06 10 12

Light Mode

Screenshot 2025-10-12 at 06 08 15

Dark Mode

Screenshot 2025-10-12 at 06 09 19

VPN nodes

image

VPN groups

Screenshot 2025-10-12 at 06 09 44

Base Configs

Screenshot 2025-10-12 at 06 09 51

Sing-box Configs

Screenshot 2025-10-12 at 06 10 03

Settings


💡 Tech Stack

  • Cloudflare Workers + D1 — Edge runtime and SQLite-compatible DB.
  • Next.js, shadcn/ui, Tailwind CSS — Modern, component-driven dashboard.
  • Node.js + TypeScript — Strongly typed backend logic.
  • Wrangler CLI — One-command deploy and migration workflow.

🙌 Acknowledgements

About

sing-box subscription manager | 基于Cloudflare workers的sing-box订阅管理

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published