CDN Manager is a native desktop application for managing Cloudflare Workers KV through a local desktop interface.
Instead of working directly in the Cloudflare dashboard, the app syncs KV records into a local SQLite database so records can be searched, reviewed, inserted, and deleted quickly from a desktop UI.
The application is built with:
- Go
- Wails
- SQLite
- Vanilla JavaScript
- Fuse.js for approximate table search
macOS releases are packaged as a universal DMG containing a universal app bundle for both Apple Silicon (arm64) and Intel (x86_64) Macs. Release builds are Developer ID signed and Apple notarized.
- Syncs records from a Cloudflare Workers KV namespace into a local SQLite database
- Inserts KV records with structured metadata
- Deletes KV records from Cloudflare and the local database
- Uses the configured domain to generate shareable entry links
-
Maintains a local SQLite cache of KV records for fast lookups
-
Supports search by:
- all entries
- UUID
- URL (single result)
- URL (multiple results)
-
Supports approximate in-table search using Fuse.js on metadata fields:
- name
- mimetype
- location
- description
Each KV record can include structured metadata:
- name
- external
- mimetype
- location
- cloud_storage_id
- md5Checksum
- description
- Downloadable CSV template for bulk inserts
- CSV-based insert workflow from the desktop UI
- Universal macOS app bundle (arm64 + x86_64)
- Universal DMG installer
- Developer ID signed
- Apple notarized
- Gatekeeper-compatible distribution
- Signed Git commits
- Signed Git tags
- Tagged GitHub releases
- Universal macOS build generation
- App bundle signing (Developer ID)
- DMG packaging
- Apple notarization
- Stapling and verification
Note: Git tagging and GitHub release publishing are performed outside of the Makefile.
.
βββ Makefile # Build, package, and release automation
βββ README.md # Project documentation
βββ app.go # Wails application bindings and exposed methods
βββ data
β βββ schema.sql # SQLite schema used to initialize the local database
βββ frontend
β βββ dist # Production frontend build output
β β βββ assets
β β β βββ IBMPlexMono-Regular.49ce58b4.woff2 # Bundled IBM Plex Mono font
β β β βββ appicon.d007682b.png # Bundled application icon
β β β βββ glyphicons-halflings-regular.fe185d11.woff2 # Bundled glyphicon font
β β β βββ index.24410bbd.css # Compiled frontend styles
β β β βββ index.6078d637.js # Compiled frontend logic
β β βββ index.html # Built frontend entrypoint
β βββ index.html # Frontend HTML shell used during development/build
β βββ package-lock.json # Locked frontend dependency versions
β βββ package.json # Frontend package manifest
β βββ package.json.md5 # Integrity hash for package manifest
β βββ src # Frontend source code
β β βββ assets
β β β βββ fonts
β β β β βββ IBM_Plex_Mono
β β β β β βββ IBMPlexMono-Regular.woff2 # Primary monospace UI font
β β β β β βββ license.txt # IBM Plex Mono license
β β β β βββ glyphicons_halflings
β β β β βββ glyphicons-halflings-regular.woff2 # Icon font
β β β β βββ license.txt # Glyphicon license
β β β βββ images
β β β βββ appicon.png # Raster app icon
β β β βββ appicon.svg # Vector app icon
β β βββ controllers # Frontend behavior and UI orchestration
β β β βββ appController.js # Application bootstrap/controller coordination
β β β βββ configController.js # Setup form behavior and submission handling
β β β βββ deleteController.js # Delete flow and event handling
β β β βββ exportController.js # Export flow and event handling
β β β βββ insertController.js # Manual/CSV insert workflows
β β β βββ searchController.js # Search flow and result handling
β β βββ main.js # Frontend entrypoint
β β βββ services # Thin wrappers around Wails/Go APIs
β β β βββ appService.js # App-level backend service calls
β β β βββ dbService.js # Database-related backend service calls
β β βββ state
β β β βββ appState.js # Shared frontend state
β β βββ styles
β β β βββ app.css # Application styling
β β βββ utils
β β β βββ clipboard.js # Clipboard helpers
β β β βββ domain.js # Domain/link normalization helpers
β β β βββ uuid.js # UUID helper functions
β β βββ views # DOM rendering and UI templates
β β βββ configView.js # Initial setup/configuration view
β β βββ shellView.js # Main application shell
β β βββ tableView.js # Search result table rendering
β βββ wailsjs # Auto-generated Wails JS bindings
β βββ go
β β βββ database
β β β βββ Database.d.ts # TypeScript definitions for DB bindings
β β β βββ Database.js # JS bindings for DB methods
β β βββ main
β β β βββ App.d.ts # TypeScript definitions for app bindings
β β β βββ App.js # JS bindings for app methods
β β βββ models.ts # Shared generated model definitions
β βββ runtime
β βββ package.json # Wails runtime package metadata
β βββ runtime.d.ts # Wails runtime TypeScript definitions
β βββ runtime.js # Wails runtime helpers
βββ go.mod # Go module definition
βββ go.sum # Go dependency checksums
βββ hooks
β βββ postbuild.sh # Post-build automation hook
β βββ prebuild.sh # Pre-build automation hook
βββ main.go # Go application entrypoint
βββ pkg # Internal Go packages
β βββ config
β β βββ config.go # App configuration loading, validation, normalization
β βββ database
β β βββ database.go # SQLite/database access layer
β βββ models
β β βββ models.go # Shared Go data models
β βββ reconcile
β β βββ reconcile.go # Cloudflare/database reconciliation logic
β βββ session
β βββ session.go # Session/runtime state management
βββ wails.json # Wails project configuration
Application entry point. Responsible for:
- resolving app data/config paths
- initializing the config file
- initializing the SQLite database from embedded schema
- embedding frontend assets and schema
- launching the Wails desktop app
Main application bridge exposed to the frontend. Handles:
- config checks and saves
- retrieving the configured domain
- Cloudflare session initialization
- syncing Cloudflare KV into the local database
- insert/delete actions
- generating the CSV bulk insert template
Defines the application config structure and JSON load/save behavior.
Wraps Cloudflare Workers KV API operations, including:
- listing keys
- reading values
- inserting entries
- deleting entries
- loading KV entries
- concurrent retrieval of KV values
Responsible for synchronizing Cloudflare KV state with the local SQLite database.
- Compares remote KV data against the local cache
- Determines when a full rebuild or update is required
- Ensures local database consistency with Cloudflare
- Acts as the coordination layer between
pkg/sessionandpkg/database
This package isolates synchronization logic from both the API layer and storage layer.
Local SQLite cache layer for:
- creating/dropping the records table
- inserting entries
- deleting entries
- querying records
- retrieving cached entries
Shared record and metadata models with JSON serialization helpers.
Handles:
- initial config flow
- syncing on startup
- search and rendering
- approximate search
- insert/delete workflows
- CSV processing
- dynamic link generation
- resolves user config directory
- creates
cdnmanager/ - initializes
config.jsonand database - loads frontend
Prompts for:
- Cloudflare API token
- Cloudflare account ID
- Cloudflare namespace ID
- domain
- initializes Cloudflare session
- retrieves KV state
- runs reconciliation against local DB via
pkg/reconcile - updates or rebuilds cache as needed
All reads occur against the local SQLite cache.
Writes are applied to:
- Cloudflare Workers KV
- local SQLite database
config.json
{
"cloudflare_api_token": "your_api_token",
"account_id": "0123456789abcdef0123456789abcdef",
"namespace_id": "fedcba9876543210fedcba9876543210",
"domain": "cdn.example.com"
}cloudflare_api_tokenaccount_idnamespace_iddomain
cdnmanager/
βββ config.json
βββ cdnmanager.sqlite3
Table: records
name(primary key)valuemetadata(JSON text)
- All
- By UUID
- By URL (single)
- By URL (multiple)
CDN Manager Bulk Insert Template.csv
Header:
name,value,metadata_name,metadata_external,metadata_mimetype,metadata_location,metadata_description,metadata_cloud_storage_id,metadata_md5Checksum
https://your-domain.example/?id=<uuid>
Fallback:
?id=<uuid>
- Go
- Node.js / npm
- Wails v2
- Apple Developer account
- Developer ID certificate
- Xcode CLI tools
notarytoolconfigured
cd frontend
npm install
wails devmake build
make release
make clean- Config centralized in
pkg/config - Token-based Cloudflare auth
- Reconciliation logic isolated in
pkg/reconcile - SQLite used as primary read layer
- Parallel KV retrieval
- Go
- Wails v2
- Cloudflare Go SDK
- SQLite
- Vanilla JS
- Fuse.js
William Veith