Tools & Utilities
Open Source

LiveDocGen: Live-Reloading C++ Documentation Server

C++Boost.BeastBoost.AsioStandard Template Library (STL)Custom AST ParserHTTP Server

A bespoke C++ documentation generator and local HTTP server utilizing Boost.Beast. It parses Doxygen-style header comments, features a live-reloading web interface via timestamp hashing, and automatically exports to both HTML and Markdown.

Tech Stack

C++Boost.BeastBoost.AsioStandard Template Library (STL)Custom AST ParserHTTP Server

System Metrics

Near-instantaneous parsing of massive codebases by skipping non-signed files explicitly at the I/O boundary
Minimal heap fragmentation and memory footprint achieved through localized string streaming and `std::stringstream` buffer reuse
Single-threaded asynchronous I/O ensures absolute zero blocking during HTTP payload transmissions

Why Did I Build This?

"While Doxygen and Sphinx are incredibly powerful, they are often bloated and slow for rapid, localized API documentation during active development. I engineered this lightweight, hyper-focused tool to drop into any C++ project and instantly visualize API contracts. By enforcing a specific file signature, the parser intelligently ignores massive third-party dependency trees. The built-in live-reloading HTTP server allows me to write code, hit save, and instantly see the formatted documentation on a secondary monitor without manually triggering any build scripts."

Architecture & Decisions

Written entirely in modern C++, the tool utilizes `std::filesystem` for recursive directory traversal and the `Boost.Beast`/`Boost.Asio` networking stack to stand up a lightweight local server. The parsing engine uses a stateful text tokenizer to extract specific tags (`\brief`, `\param`, `\warning`) and programmatically infer the corresponding C++ signatures (functions, macros, typedefs, variables) directly from the abstract syntax tree. The server operates on a single-threaded asynchronous context (`net::io_context{1}`). A long-polling `/version` endpoint calculates file-modification hashes to trigger automated client-side UI refreshes via dynamically injected JavaScript.

Key Features

  • 01.Zero-configuration local HTTP server utilizing Boost.Beast and Boost.Asio
  • 02.Targeted header parsing using a custom file signature to aggressively bypass third-party library inclusion
  • 03.Automated live-reloading web interface via JS polling and OS-level timestamp hashing
  • 04.Simultaneous static artifact generation directly to the filesystem (`index.html` and `index.md`)
  • 05.In-line C++ signature extraction for functions, macros, and typedefs without requiring heavy compiler frontends
This tool bridges the gap between raw source code and readable documentation during rapid development cycles. Instead of wrestling with complex XML or Doxyfiles, I can simply tag a header, write standard block comments, and let the Boost-powered server render a cleanly styled, live-updating HTML view. It is a direct testament to my philosophy of writing highly specialized, low-dependency internal tooling to aggressively accelerate my own C++ systems engineering workflow.