Enhance CDN Manager: Add Cloudflare API token support, update documentation, and introduce new routes for managing nodes, aliases, and topology. Improve UI components and status badges for better user experience.
quality / commitlint (push) Skipped
quality / changes (push) Successful in 5s
quality / docker-check (push) Skipped
CD / update-wiki (push) Successful in 6s
quality / web (push) Successful in 53s
quality / api (push) Successful in 49s
CD / quality (push) Successful in 1m57s
CD / publish (push) Successful in 27s
quality / commitlint (push) Skipped
quality / changes (push) Successful in 5s
quality / docker-check (push) Skipped
CD / update-wiki (push) Successful in 6s
quality / web (push) Successful in 53s
quality / api (push) Successful in 49s
CD / quality (push) Successful in 1m57s
CD / publish (push) Successful in 27s
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
# CDN Manager
|
||||
|
||||
Self-hosted CDN management (каркас). Стек как у CFDM: pnpm monorepo, Vite + React + TanStack + shadcn/ReUI, Fastify + Drizzle + SQLite.
|
||||
Self-hosted панель **desired-state DNS** для флота CHR/VPS: канонические ноды (A/AAAA) + сервисные CNAME (failover / geo / ix), синхронизация с Cloudflare DNS-only.
|
||||
|
||||
## Vs CFDM
|
||||
|
||||
| CDNManager | Cloudflare Domain Manager |
|
||||
|------------|---------------------------|
|
||||
| Флот нод + алиасы + drift/orphan | Домены, сервисы, LB, health-checks, сертификаты |
|
||||
| Роутинг-зона (напр. `rtnt.top`) | Мультидоменный ops |
|
||||
| Retarget CNAME как основной UX | Service bindings / HC |
|
||||
|
||||
App id в auth-portal: **`cdn`**.
|
||||
|
||||
## Стек
|
||||
|
||||
@@ -9,28 +19,53 @@ Self-hosted CDN management (каркас). Стек как у CFDM: pnpm monorep
|
||||
- `apps/api` — Fastify + Drizzle + SQLite
|
||||
- Packages: `@cdnmanager/ui`, `@cdnmanager/shared`, `@cdnmanager/db`
|
||||
|
||||
## Доменная модель
|
||||
|
||||
- **Location** — справочник кодов (`msk`, `fra`, `ams`, `hel`, `par`)
|
||||
- **Node** — канонический FQDN + A/AAAA (`msk-hub01.rtnt.top`)
|
||||
- **Alias** — CNAME → node (`msk.rtnt.top`, `ix-eu.rtnt.top`)
|
||||
- **Zone** — Cloudflare zone + naming template / TTL
|
||||
- Managed-записи всегда **`proxied: false`** (туннели WG/GRE)
|
||||
|
||||
Нейминг: шаблон `{loc}-{role}{nn}.{zone}` (см. документ по CHR DNS).
|
||||
|
||||
## Команды
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm --filter @cdnmanager/shared build
|
||||
pnpm --filter @cdnmanager/db build
|
||||
pnpm --filter @cdnmanager/api dev
|
||||
pnpm --filter web dev
|
||||
pnpm --filter @cdnmanager/api dev # :8081
|
||||
pnpm --filter web dev # :5176
|
||||
pnpm --filter web build
|
||||
```
|
||||
|
||||
Локально: API `http://localhost:8081`, web `http://localhost:5176`.
|
||||
Env: `CLOUDFLARE_API_TOKEN` (Zone DNS Edit + Zone Read). Локально `AUTH_REQUIRED=false`, логин `admin` / `admin`.
|
||||
|
||||
## ReUI PRO
|
||||
## UI (ReUI PRO + DNA CFDM)
|
||||
|
||||
Surface: **frame**. Hierarchy: **ReUI PRO > shadcn**. Contract: [`docs/ui-design-contract.md`](docs/ui-design-contract.md).
|
||||
MCP `user-reui` primary + `plugin-shadcn-shadcn` primitives. CLI из `apps/web`.
|
||||
License: `REUI_LICENSE_KEY` в `apps/web/.env.local`.
|
||||
Surface: **frame**. Contract: [`docs/ui-design-contract.md`](docs/ui-design-contract.md).
|
||||
|
||||
## Auth
|
||||
| Экран | Kit / pattern |
|
||||
|-------|----------------|
|
||||
| Dashboard | `OpsDashboard` + `KpiStatGrid` + `QuickActionGrid` + charts + `AttentionQueue` (как CFDM) |
|
||||
| Ноды / Алиасы | `ResourcePage` |
|
||||
| Топология | Frame grid + IconTile |
|
||||
| Зоны / Sync | Frame Item rows + sync/apply/BIND export |
|
||||
| Settings | `SettingsShell` (appearance + cloudflare) |
|
||||
|
||||
App id в auth-portal: **`cdn`**. Локально `AUTH_REQUIRED=false`, логин `admin` / `admin`.
|
||||
Preview: [stats-12](https://reui.io/preview/base/stats-12) · [data-grid-filtering-2](https://reui.io/preview/base/data-grid-filtering-2) · [settings-16](https://reui.io/preview/base/settings-16) · [app-shell-12](https://reui.io/preview/base/app-shell-12).
|
||||
|
||||
MCP `user-reui` primary + `plugin-shadcn-shadcn` primitives. License: `REUI_LICENSE_KEY` в `apps/web/.env.local`.
|
||||
|
||||
## API (кратко)
|
||||
|
||||
```
|
||||
GET/POST /api/v1/zones · POST .../sync · POST .../apply · GET .../export/bind
|
||||
GET/POST /api/v1/nodes · GET/POST /api/v1/aliases · POST .../retarget
|
||||
GET /api/v1/locations · GET /api/v1/dashboard/stats · GET /api/v1/topology
|
||||
GET /api/v1/cloudflare/zones
|
||||
```
|
||||
|
||||
## CI / Docker
|
||||
|
||||
|
||||
Reference in New Issue
Block a user