Go to file
jml 3e7eddc074 feat: add enterprise production readiness infrastructure
This commit implements comprehensive production hardening across multiple
layers to prepare StemeDB for enterprise pilot deployments:

## API Layer
- Add rate limiting middleware with configurable limits per endpoint
- Enhance error handling with detailed context and proper HTTP status codes
- Add security hardening tests for input validation and boundary conditions
- Create store_helpers module for defensive storage access patterns

## Storage & WAL
- Optimize group commit batching for higher throughput
- Add defensive error handling in hybrid backend with proper fallbacks
- Enhance WAL journal durability guarantees with fsync validation
- Improve index store query performance with better caching

## Operations & Deployment
- Add comprehensive operations documentation (deployment, monitoring, DR)
- Create systemd units for backup, WAL archival, and verification
- Add monitoring configs (Prometheus alerts, metrics exporters)
- Implement backup/restore scripts with verification and S3 archival
- Add DR drill automation and runbook procedures
- Create load balancer configs (nginx, envoy) with health checks

## Documentation
- Update CLAUDE.md with operations and troubleshooting guides
- Expand roadmap with production readiness milestones
- Add pilot success criteria and deployment reference architecture
- Document TLS setup, monitoring integration, and incident response

## Configuration
- Add .env.example with all required environment variables
- Document resource sizing for different deployment scales
- Add configuration examples for various deployment topologies

This positions StemeDB for successful enterprise pilots with proper
operational discipline, monitoring, backup/DR, and security hardening.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-12 06:08:15 +00:00
.agentive-remediation feat: Complete Aphoria Phase 8-9 + UAT suite (90/90 tests passing) 2026-02-06 22:50:55 -07:00
.aphoria feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
.cargo Initial project setup with Claude Code monorepo structure 2026-01-31 10:56:26 -07:00
.claude docs: reorganize documentation structure for clarity 2026-02-11 07:33:40 +00:00
ai-lookup docs: reorganize documentation structure for clarity 2026-02-11 07:33:40 +00:00
applications docs: reorganize documentation structure for clarity 2026-02-11 07:33:40 +00:00
batteries feat: WAL hardening (Phase 5B) - CRC32C, crash recovery, group commit, log rotation 2026-02-02 12:36:35 -07:00
cmd feat: Complete Aphoria Phase 8-9 + UAT suite (90/90 tests passing) 2026-02-06 22:50:55 -07:00
community feat: Ingestor deadlock fix + blessed assertion tracking + patent docs 2026-02-04 03:41:08 -07:00
crates feat: add enterprise production readiness infrastructure 2026-02-12 06:08:15 +00:00
demo/keys feat: Complete Aphoria Phase 8-9 + UAT suite (90/90 tests passing) 2026-02-06 22:50:55 -07:00
docs feat: add enterprise production readiness infrastructure 2026-02-12 06:08:15 +00:00
latent feat: Multi-application expansion with chaos testing and community UI 2026-02-04 01:24:14 -07:00
research-requests feat(aphoria): implement claims architecture (A1-A5) with verify engine, corpus, coverage, and explain 2026-02-08 09:11:47 +00:00
scripts feat: add enterprise production readiness infrastructure 2026-02-12 06:08:15 +00:00
sdk/go docs: reorganize documentation structure for clarity 2026-02-11 07:33:40 +00:00
tools/grafana docs: reorganize documentation structure for clarity 2026-02-11 07:33:40 +00:00
uat feat: add enterprise production readiness infrastructure 2026-02-12 06:08:15 +00:00
use-cases feat: Multi-application expansion with chaos testing and community UI 2026-02-04 01:24:14 -07:00
.aphoriaignore feat(aphoria): implement ignore & exclusion system (Phase 16) 2026-02-07 17:28:50 -07:00
.dockerignore feat: Complete Aphoria Phase 8-9 + UAT suite (90/90 tests passing) 2026-02-06 22:50:55 -07:00
.env.example feat: add enterprise production readiness infrastructure 2026-02-12 06:08:15 +00:00
.gitignore chore(dogfood): archive dated documentation and remove database files from git 2026-02-11 06:12:34 +00:00
.jscpd.json Initial project setup with Claude Code monorepo structure 2026-01-31 10:56:26 -07:00
aphoria.toml feat(aphoria): implement ignore & exclusion system (Phase 16) 2026-02-07 17:28:50 -07:00
architecture.md feat: Complete Phase 2 (The Cortex) - query, lens, and API layers 2026-02-01 13:22:44 -07:00
Cargo.toml perf: speed up test suite with profile.test optimization 2026-02-07 20:21:25 -07:00
CLAUDE.md feat: add enterprise production readiness infrastructure 2026-02-12 06:08:15 +00:00
clippy.toml Initial project setup with Claude Code monorepo structure 2026-01-31 10:56:26 -07:00
CONTRIBUTING.md docs: reorganize documentation structure for clarity 2026-02-11 07:33:40 +00:00
docker-compose.yml feat: Multi-application expansion with chaos testing and community UI 2026-02-04 01:24:14 -07:00
Dockerfile feat: Multi-application expansion with chaos testing and community UI 2026-02-04 01:24:14 -07:00
GEMINI.md docs: reorganize documentation structure for clarity 2026-02-11 07:33:40 +00:00
Makefile perf: speed up test suite with profile.test optimization 2026-02-07 20:21:25 -07:00
quickstart.md feat: Multi-application expansion with chaos testing and community UI 2026-02-04 01:24:14 -07:00
README.md docs: reorganize documentation structure for clarity 2026-02-11 07:33:40 +00:00
roadmap-archive.md feat(aphoria): implement claims architecture (A1-A5) with verify engine, corpus, coverage, and explain 2026-02-08 09:11:47 +00:00
roadmap.md feat: add enterprise production readiness infrastructure 2026-02-12 06:08:15 +00:00
rustfmt.toml Initial project setup with Claude Code monorepo structure 2026-01-31 10:56:26 -07:00
scan-results-v1.json feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
vision.md feat: Complete Aphoria Phase 14 - Governance Workflows 2026-02-07 05:16:26 -07:00
what-is-episteme.md feat: WAL hardening (Phase 5B) - CRC32C, crash recovery, group commit, log rotation 2026-02-02 12:36:35 -07:00

Episteme (StemeDB)

A probabilistic knowledge graph database that stores Claims, not Facts.

Append-only Merkle DAG with read-time resolution via Lenses. Think of it as "Git for Truth" - conflicting assertions coexist, resolved at query time through Consensus, Recency, Authority, or custom Lenses.


Quick Start

# Get running in under 5 minutes
make validate

# Start the server
cargo run --package stemedb-api

# Open API docs
open http://localhost:18180/swagger-ui

→ Full Quick Start Guide


Understanding Episteme

  • What is Episteme? - Concept overview and real-world examples
  • Vision - Product philosophy and "Git for Truth" principles
  • Architecture - Technical design and data structures
  • Use Cases - Consumer health, financial due diligence, AI agents

Documentation


For Developers

Getting Started

Project Management

Architecture Deep Dives


Applications

Episteme powers multiple applications:

  • Aphoria - Code-level truth linter and continuous learning system
  • Admin Dashboard - Web UI for cluster management
  • Disputed - Claim disagreement visualization

For AI Agents


Core Principles

ZERO TOLERANCE FOR MEDIOCRITY: We build enterprise-grade products that must survive in production. Panics are UNACCEPTABLE. Broken pipe errors are UNACCEPTABLE. Sloppy testing is UNACCEPTABLE. Every line of code ships to paying customers who depend on it. Test everything. Handle every error. No shortcuts. No excuses.

Technical Principles

  • Append-Only: NEVER mutate existing Assertions. Create new ones.
  • Content-Addressed: Assertion ID = BLAKE3 hash of content
  • No Unwrap: NEVER use unwrap() or expect() in production code
  • Defensive Writes: All writes go through WAL with fsync
  • Structured Logging: Use tracing (info!, warn!, error!)

→ Full Coding Guidelines


Port Scheme (181XX)

Service Port Env Var
HTTP API 18180 STEMEDB_BIND_ADDR
Cluster Gateway 18181 STEMEDB_NODE_API_ADDR
Cluster RPC 18182 STEMEDB_NODE_RPC_ADDR
SWIM Gossip 18183 via SwimConfig
StemeDB Dashboard 18188 -
Aphoria Dashboard 18189 -

Quick Reference

# Build
cargo build --workspace

# Test
cargo test --workspace --lib      # Unit tests (~3min)
cargo nextest run                 # Parallel runner (~5min)

# Lint (must pass before commit)
cargo clippy --workspace -- -D warnings
cargo fmt --check

# Run server
cargo run --package stemedb-api

# Run cluster node
cargo run --package stemedb-cluster --bin stemedb-node

Community & Support


What Makes Episteme Different?

Traditional databases force you to pick "the right answer." Episteme holds all the answers, tracks who said them and why, and lets you decide how to resolve disagreements at query time.

Traditional DB Episteme
One canonical truth Multiple competing claims
Update overwrites Append-only history
Consensus enforced at write Resolution deferred to read
Time-travel via backups Built-in temporal queries
Source tracking via app logic First-class provenance

When a Reddit community reports gastroparesis months before the FDA adds a warning label, both claims coexist in Episteme. You can query by authority tier (FDA wins), by recency (Reddit was first), or by consensus (see the disagreement).

This is critical for domains where truth is contested, evolving, or depends on perspective: health, finance, research, intelligence.


Getting Help

Question Resource
How do I... Documentation Index
Why did you... Architecture + Vision
Can I use this for... Use Cases
It's not working... GitHub Issues
I want to contribute... Contributing Guide

Get Started →