A learning lab, public-facing.
DTG Lab started as a way to learn the Cloudflare developer platform end-to-end. It now hosts my notes on the products I work with, with the same stack powering the page you're looking at.
Not affiliated with Cloudflare's official products or services. Use anything you read here at your own discretion.
Built with
-
Astro
SSR + static islands, built on Vite.
-
Cloudflare Workers
Edge runtime — every request runs near you.
-
D1
Distributed SQLite for posts, comments, audit log.
-
R2
Zero-egress object storage for images.
What's in here
- Custom session-based auth with PBKDF2 hashing + lockout
- CSRF-defended same-origin checks on every state-changing endpoint
- Quill rich-text editor with image upload, drag-resize, gallery & table inserts
- Tag system, draft/scheduled/published statuses
- Moderated comments with status workflow
- AES-GCM-encrypted newsletter subscribers
- Full-text search via D1 FTS5
- Audit log of every admin action with retention
- Light + dark theme with prefers-color-scheme fallback
- GitHub Actions CI: lint / type-check / 128 unit tests / deploy
- Weekly automated D1 backups
Source
The code lives in a private GitHub repo and deploys to Cloudflare Pages on every push to main. Source is shareable on request.