Generate Privately.
Serve Statically.
Update Continuously.
Staticraft decouples HTML rendering from public serving. An isolated background generator builds pages with atomic file swaps, while Nginx or CDNs serve high-speed traffic with zero exposed public app ports.
npm install -g staticraft
___ _____ _ _____ ___ ___ ___ _ ___ _____
/ __|_ _/_\_ _|_ _/ __| _ \ /_\ | __|_ _| Staticraft v0.1.7
\__ \ | |/ _ \| | | | (__| / / _ \| _| | | Generate privately.
|___/ |_/_/ \_\_| |___\___|_|_\/_/ \_\_| |_| Serve statically.
Update continuously.
Decoupled Architecture
How Staticraft Operates
By severing the connection between public web traffic and your dynamic database backend, Staticraft delivers bulletproof security, zero-downtime updates, and sub-millisecond static response times.
Background Generator
A daemon process running inside a private network or CI/CD runner. It pulls data from DBs, CMS, or APIs and compiles static HTML.
Nginx / Caddy / CDN
The public web server serves pre-rendered static HTML files directly from `.raft/`. Zero Node.js runtime overhead on HTTP hits.
Core Features
Built for Security, Speed, and Simplicity
Everything required for high-performance static websites without complex toolchains or runtime attack vectors.
Zero Exposed Ports
In production mode (staticraft start), the generator opens zero public HTTP listening ports. Web traffic hits only static files.
Atomic Swapping
HTML pages are written to staging files before an atomic POSIX rename(2) swap, eliminating half-rendered pages or torn reads.
Timer Revalidation
Define revalidate: 600 to automatically refresh HTML every 10 minutes in the background without manual CI redeploys.
Zero Dependencies
Zero third-party npm runtime dependencies. Built entirely with native Node.js standard modules for minimal supply-chain risk.
Asset Fingerprinting
Staticraft automatically hashes static CSS and JS assets (e.g. styles.07eef7b1.css) and rewrites template references.
Auto Sitemap & Robots
Generates sitemap.xml and robots.txt out of the box during build and dev mode automatically.
Developer Workflow
Clean, Expressive Code Structures
File-based routing with colocated route controllers and HTML templates.
export default { // Background revalidation interval (refresh HTML every 10 minutes) revalidate: 600, // Data hook called by Staticraft rendering engine data: async () => { const res = await fetch('https://api.github.com/repos/Abhay-Vachhani/staticraft'); const repo = await res.json(); return { title: 'Staticraft Engine', stars: repo.stargazers_count || 120, license: repo.license?.spdx_id || 'MIT' }; } };
Start Building with Staticraft Today
Zero configuration setup. Zero npm dependencies. Deploy high-performance, security-hardened static sites in minutes.