Skip to content

dawidurbanski/publr

Repository files navigation

zig-cms

A single-file CMS written in Zig. Zero dependencies, one binary, one SQLite database.

Philosophy

No frameworks, no npm, no external dependencies. Single binary, zero runtime dependencies. Every line of code is ours.

Tech Stack

  • Language: Zig 0.15.x
  • Database: SQLite (embedded)
  • Frontend: Server-rendered HTML + vanilla JS + plain CSS

Quick Start

# Build
zig build

# Run
zig build run -- serve --port 8080

# Test
zig build test

Documentation

Current Status

Phase: Phase 1 complete

Completed:

  • build.zig with SQLite compilation and static asset embedding
  • vendor/ with SQLite amalgamation and stb_image headers
  • src/main.zig with CLI (serve command, --port, --dev flags, PORT env var)
  • src/http.zig with HTTP server (/, /admin, /static/*)
  • Graceful shutdown on SIGINT/SIGTERM
  • Thread-per-connection request handling

Next steps:

  1. Add router with path parameters
  2. Add middleware pattern
  3. Build admin authentication

Resources

About

A single-binary, pure-Zig CMS with embedded SQLite, server-rendered templates, and no external dependencies.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors