The project's README from github.com/romshark/datapages. As one markdown file: README.md.
[!NOTE] Beta: Datapages is ready for production use. APIs are close to stable but can still change.
Datapages is a web framework and toolchain for Go, Templ and Datastar. It supports collaborative web applications, HTMX-style sites and installable desktop applications.
See FAQ.md for frequently asked questions.
datapages init writes instructions and skills for coding agents. datapages lint and datapages gen report invalid application declarations and template calls with file positions and suggested fixes.
Datapages parses and checks the application package, then generates the HTTP wiring. The generated code covers routes, sessions, SSE streams, per-tab state, CSRF protection, typed URL and action helpers, Prometheus metrics and offline service workers. Application code remains Go and Templ.
counter: 2 real-time counters in 1 module. app/simple is the smallest example, and app/fancy adds a polished interface.todolist: Collaborative todo list with per-tab server-side state.calculator: Calculator that runs as a multi-client server or a single-client desktop app.desktop-multiwindow: Desktop app with any number of windows, each with an SSE stream, loaded from a port of its own.classifieds: Full-featured classifieds marketplace with sessions, auth, Prometheus metrics, Grafana dashboards and load testing.tailwindcss: Minimal static page with Tailwind CSS.webcomponents: Landing page with vanilla and Lit-based Web Components bundled via esbuild through a custom watcher.sqlitesessions: Custom sessions.Manager backed by SQLite through sqinn-go, without cgo.fast-shim: A cached placeholder shown immediately and replaced with the live response.offline-cache: Service worker support with handler-cached pages, a PageOffline fallback, and tickets available without a connection.file-upload: Chunked file uploads to disk that can be paused, resumed and continued after a reload or a server restart, with server-enforced transfer limits.docs: Collaborative rich-text editor built on Quill, with operational transformation in Go.See the documentation. Start with the installation and the tutorial.
SPECIFICATION.md defines handler signatures, parameters, return values, events, sessions and modules.
Datapages includes modules with replaceable implementations:
Manager[Data]
Broker
TokenWriter, TokenValidatorTokens - the built-in default: HMAC-SHA256 over the session token under a fixed domain-separator key, BREACH-resistant masking, nothing to configureTokenGeneratorassetcompress.Storedisk - Compressed assets in a directory (kept across restarts, shared by the processes that use it)Go, Templ and Datastar are a direct way to build server-rendered applications. Projects built with them still repeat the same work for routes, SSE streams, NATS, sessions, CSRF protection, development reloads and deployment.
Datapages defines conventions for that repeated work and checks them with the CLI:
datapages init creates a project with a working server, development setup and CI workflow.datapages gen generates the routes, streams and typed template helpers from Go declarations.datapages lint checks the declarations and templates in CI without writing files.datapages watch rebuilds the application, reports build errors in the browser and serves it through Toxiproxy to test slow and failing networks.These conventions also give coding agents a stable application model. The generated instructions describe the model, and the CLI reports violations with source positions and fixes.
Datapages fits projects where:
See CONTRIBUTING.md for development setup and commands, DEV.md for the watcher of the documentation pages, and AGENTS.md for code style, testing conventions, commit message format and project structure.