A lightweight, edge-first web framework built on Cloudflare Workers with authentication, D1 database, and a clean dark UI. Deploy a blog or small site globally in under 5 minutes.



- 🚀 Zero cold starts - Runs on Cloudflare Workers edge network
- 🔐 Authentication built-in - JWT-based auth with secure sessions
- 📝 Markdown support - Write posts in Markdown, rendered safely
- 🌓 Dark/Light themes - Smooth theme switching with localStorage
- 💾 D1 Database - SQLite at the edge for your content
- ⚡ Fast - Under 150KB total, loads instantly worldwide
- 🛡️ Secure - XSS protection, CSRF safe, proper password hashing

- Cloudflare account (free tier works)
- Node.js 16+
- Wrangler CLI (
npm install -g wrangler
)
- Clone and install:
git clone https://github.com/gnarzilla/deadlight-bootstrap.git
cd deadlight-bootstrap
npm install
- Create your D1 database:
wrangler d1 create blog_content
- Create the database ID to wrangler.toml:
[[d1_databases]]
binding = "DB" database_name = "blog_content" database_id = "your-database-id-here"
- Initialize the database:
wrangler d1 execute blog_content --file=schema.sql
- Configure your domain in wrangler.toml:
[[routes]]
pattern = "yourdomain.com/*" zone_id = "your-zone-id"
- Deploy:
wrangler deploy
- Create your admin user:
- Visit https://yourdomain.com/admin/add-user
- Note the credentials
- Remove the setup route from blog.js for security
deadline-bootstrap/
├── blog.js # Main router and request handler
├── admin.js # Admin routes (create/edit/delete)
├── auth.js # Authentication logic
├── jwt.js # JWT token handling
├── render.js # Page rendering functions
├── templates.js # HTML templates
├── styles.js # CSS (dark/light themes)
├── utils.js # Utility functions
├── schema.sql # Database schema
└── wrangler.toml # Cloudflare configuration
Add an A record pointing to 192.0.2.1 (dummy IP) with proxy enabled.
Make sure to use url.origin in redirects, not relative paths.
Edit styles.js - both darkMinCSS and lightMinCSS are fully customizable.
Add new routes in blog.js following the existing pattern.
Edit templates.js for layout changes
- 📄 Individual post pages with permalinks
- Post excerpts on homepage
- 📰 RSS feed generation
- 🏷️ Tags and categories
- 🔍 Search functionality
- 📅 Draft/scheduled posts
- 💬 Comments (considering privacy-first approach)
- 🖼️ Image uploads via R2 (with content safety measures)
- 📊 Analytics (privacy-respecting, no Google)
- 🔔 Email notifications for new posts
- 🌐 i18n/multi-language support
- 🎨 Theme marketplace
- 📱 PWA support
- Extensible with Workers modules
- Custom themes beyond dark/light
- Webhook integrations
This is a personal project shared for others to use and learn from. Feel free to:
- Fork it for your own use
- Submit PRs for bug fixes
- Open issues for major bugs
- Share what you build!
Note: I'm moving on to other projects, so response time may vary.
MIT - Use this however you want!
- Built to learn Cloudflare Workers
- Inspired by the need for simple, fast, edge-native websites
- Special thanks to LLMs and vibe coding; Use the tools that you have at hand.
Built by @gnarzilla at deadlight.boo