FsusBlogV3 is a zero-dependency, deployment-oriented content platform built on pure C++23 Named Modules (import std;), PostgreSQL 18, and a Vue 3 / TypeScript web frontend consuming @ozwasyd/fsusui (FsusUI 2.0). It fuses the complete FsusBlog V2 content, authoring, community, and integrity architecture (sql/01..04) with FsusBlog V1-Fusion security, zero-knowledge anonymous comments, moderation, WAF, observability, and extensibility (sql/05-v1-fusion.sql) inside three native binaries.
- Full navigation: Documentation Index
- Release status and remaining exit gates: Release Readiness Matrix
- Engineering and agent boundaries:
AGENTS.md
- Zero-Dependency Native C++23 Engine: 32 named modules compiled with Clang 19/20 +
libc+++ ThinLTO (tools/build.py) with zero third-party runtime libraries—no OpenSSL, BoringSSL, ngtcp2, libpq, hiredis, libsqlite3, libmysqlclient, QuickJS, Lua C library, or zlib. - Native HTTP/1.1, WebSocket, HTTP/2 (
h2c), and HTTP/3 (QUIC v1 + TLS 1.3 + QPACK): Shared-port HTTP/1.1 + RFC 6455 WebSocket +h2cprior knowledge alongside a dedicated zero-dependency UDP QUIC v1 / TLS 1.3 / QPACK HTTP/3 engine with hardware-accelerated AES-GCM, closed-loopServerPressureLevelbackpressure, adaptive BDP receive windows, and uniform RFC 8470Early-Dataenforcement (425 Too Earlyon mutations). - Lock-Free Read Plane & Native PostgreSQL 18 Engine: Exclusive PostgreSQL session advisory lease guarding wait-free striped RCU (
WaitFreeStripedRcu<T, 64, 128>) immutablePublicSnapshotprojections, incremental body loading, Tier-1 prewarm (1,200 articles) + Tier-2 16-shardColdArticleCacheSingleFlight, full-duplex PG v3 wire pipelining, 4-class connection pool bulkheads, and a lock-free stepped async SQL readiness scheduler (PgQueryScheduler). - Online Server vs. Offline CLI Isolation:
fsusblog-serverruns under a DML-only database role and validates the 182-table core+fusion schema read-only (fail-closed) at startup; DDL planning/bootstrap (plan/apply/verify), secret generation (init-secrets), offline break-glass admin identity (admin-identity), daily transparency checkpoints, deterministic backup measurement, and legacy V1 database migration (migrate-legacy) live exclusively infsusblog-cli. - Unified Identity & Defense in Depth: Unified
blog_user(role IN ('user', 'admin')),passkey_credential,user_session, and single session cookie (__Host-FsusSessionon HTTPS /fsus-v2-sessionon loopback HTTP), 15-action one-time Passkey Step-Up (45 s proof), AEAD-sealed TOTP MFA, Recovery Key rebinding, persistent session refresh with compromise-family revocation, pre-route WAF shield, 8 security challenge providers, and tamper-evident hash-chained audit logs. - Complete V2 + V1-Fusion Feature Set: AEDS v2 binary wire protocol (
contracts/wire.schema.json), 3-mode public search (server BM25+WAND FAS4, local FSPK v4 + FSPT v4 deltas, disk-spooled wide corpus), dual-pane authoring workspace, 8-type properties, 10k-node Canvas, private/public media & multi-format exports (Markdown/HTML/DOCX/EPUB/PDF), scoped-PoW comments + dual-control appeals + ZK anonymous comments (BN254 Groth16 + RFC 9474 Blind RSA), Aho-Corasick + logistic anti-spam + regional moderation, ECDSA P-256 publication proofs & transparency logs, sandboxed JS/Lua plugins, signed.fstheme/.fsfontappearance, Redis L2 + OTLP telemetry, Article Vault watcher, and sandboxed AOT SSR.
| Path / Artifact | Responsibility |
|---|---|
src/base/, src/sys/, src/core/ |
Core types, wait-free RCU/MPSC/AC primitives, embedded resources, POSIX/kqueue/epoll/sandbox syscalls, native crypto (fsus.crypto, fsus.v1_crypto), JS, Lua, JSON, ZIP/DEFLATE, Image (PNG/JPEG/WebP), Redis RESP |
src/wire/, src/contracts/, contracts/ |
AEDS v2 framing, generated wire module (src/wire/wire_generated.cppm from contracts/wire.schema.json), custom POD codecs, FAS4/FSPK search engine, ZK circuit & locale JSON assets |
src/pg_storage/ |
Native PostgreSQL 18 v3 wire client, SCRAM-SHA-256, duplex pipeline, binary COPY, 4-class PgPool, exclusive advisory lease, read-only schema admission, PgQueryScheduler |
src/http_public/ |
Multi-reactor HTTP/1.1 + WebSocket + h2c + QUIC v1 / TLS 1.3 / QPACK HTTP/3 engines, SiteCapabilities, PublicSnapshot, ColdArticleCache, public & media endpoints |
src/server_domains/, src/server_main/ |
Identity, authoring, properties, Canvas, comments, inbox, media/exports, integrity/appearance/plugins, all 5 V1-Fusion domains, and fsusblog-server entrypoint |
src/cli_worker/ |
Offline fsusblog-cli (21 top-level commands, including pure-C++ SQLite3/MySQL/PG migrate-legacy) and OS-sandboxed fsusblog-plugin-worker |
sql/ |
Authoritative PostgreSQL 18 schema: 01-core.sql (55), 02-authoring.sql (41), 03-community.sql (39), 04-operations.sql (14), 05-v1-fusion.sql (33), plus optional/private-media-import-origin.sql (2) |
web/ |
TypeScript AEDS/V3 contracts (web/src/Contracts/) and Vue 3.5 + @ozwasyd/fsusui@2.0.0 frontend (web/src/Web/) |
deploy/, tools/, tests/ |
Caddy/Nginx/Docker Compose/systemd templates, C++23 module DAG build/codegen/unified test runner (tools/test.py), modular C++23 native/PG18/Python E2E/Playwright tests and benchmarks |
See System Architecture Overview and C++23 Modules and Build System for full architectural details.
Prerequisites: Clang 19 or 20 with libc++ std.cppm (on macOS: brew install llvm postgresql@18; on Ubuntu 24.04: clang-19 lld-19 libc++-19-dev libc++abi-19-dev postgresql-18) and Python 3.
# Fast local edit-compile-test loop (skips ThinLTO; builds & runs native C++23 unit/loopback suites)
python3 tools/test.py native
# Clean -O3 ThinLTO production + test build and full CI gate
python3 tools/test.py ci --cleanBuilt binaries land in build/bin/:
build/bin/fsusblog-serverbuild/bin/fsusblog-clibuild/bin/fsusblog-plugin-worker
# 1. Generate 32-byte CSPRNG secrets (export into server environment)
./build/bin/fsusblog-cli init-secrets
# 2. Plan, apply, and verify the 182-table schema (01..05) using a DDL owner role
export FSUSBLOG_DB="postgres://fsus_owner:PASSWORD@127.0.0.1:5432/fsusblog_v3"
./build/bin/fsusblog-cli plan plan.json
./build/bin/fsusblog-cli apply plan.json
./build/bin/fsusblog-cli verify
# 3. Bootstrap the first administrator account (offline break-glass; outputs 10-min Passkey ticket)
./build/bin/fsusblog-cli admin-identity bootstrap lyuao
# 4. Start the online server with a DML-only PostgreSQL 18 role
export FSUSBLOG_DB="postgres://fsus_app:PASSWORD@127.0.0.1:5432/fsusblog_v3"
export FSUSBLOG_PUBLIC_ORIGIN="http://localhost:5080"
./build/bin/fsusblog-server --host 127.0.0.1 --port 5080Requires Node 24 + pnpm 10 and @ozwasyd/fsusui@2.0.0 (with bundled native Wasm assets):
pnpm --dir web/src/Web install --frozen-lockfile
pnpm --dir web/src/Web dev # Vite dev server on http://localhost:5173 proxying to 127.0.0.1:5080
pnpm --dir web/src/Web typecheck && pnpm --dir web/src/Web buildAll verification tiers, filters, and benchmarks share a single stdlib entry point (tools/test.py):
# List all native C++23, PG 18 integration, E2E modules, and benchmark suites
python3 tools/test.py list
# Static gate: docs/code parity, wire/resource generation parity, and test harness unit tests
python3 tools/test.py static
# Fast local gate (no-LTO incremental build + static + native + pg-int + e2e)
python3 tools/test.py fast
# Full CI gate (clean -O3 ThinLTO + static + native + pg-int + pg-explain + e2e)
python3 tools/test.py ci --clean
# Full regression gate (includes all concurrency, fault-injection, and 1-slot pool contention suites)
python3 tools/test.py full --clean
# Standalone frontend gate (vue-tsc + Vite build + Playwright 4-quadrant smoke against isolated PG18/server)
python3 tools/test.py web
# Standalone performance benchmarks (micro, pg-explain, http-protocols, mixed-arrivals)
python3 tools/test.py bench --suite micro,pg-explain,http-protocols,mixed-arrivalsFull test matrix, tiering, filters, JUnit reporting, and CI/Nightly jobs are documented in Testing and Benchmarks and CI Guide.
| Topic | Entry Point |
|---|---|
| Complete directory | Documentation Index |
| Architecture & native engines | System Architecture Overview, C++23 Modules & Build, Native HTTP/2, Native HTTP/3, Concurrency & Snapshots, PG 18 Wire & Scheduler |
| Protocol, lease & references | AEDS v2 Protocol, Publication Lease, Configuration Reference, CLI Reference, Schema Reference, API & Routes Reference |
| Deployment, migration & frontend | Production Deployment Guide, PostgreSQL Operations & Legacy Migration, FsusUI Frontend Integration, Web Validation |
| Governance & release | Release Readiness Matrix, Changelog, Contributing, Security Policy, Documentation Policy |
- Report vulnerabilities privately per SECURITY.md.
- Released under the MIT License.