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> |
||
|---|---|---|
| .agentive-remediation | ||
| .aphoria | ||
| .cargo | ||
| .claude | ||
| ai-lookup | ||
| applications | ||
| batteries | ||
| cmd | ||
| community | ||
| crates | ||
| demo/keys | ||
| docs | ||
| latent | ||
| research-requests | ||
| scripts | ||
| sdk/go | ||
| tools/grafana | ||
| uat | ||
| use-cases | ||
| .aphoriaignore | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .jscpd.json | ||
| aphoria.toml | ||
| architecture.md | ||
| Cargo.toml | ||
| CLAUDE.md | ||
| clippy.toml | ||
| CONTRIBUTING.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| GEMINI.md | ||
| Makefile | ||
| quickstart.md | ||
| README.md | ||
| roadmap-archive.md | ||
| roadmap.md | ||
| rustfmt.toml | ||
| scan-results-v1.json | ||
| vision.md | ||
| what-is-episteme.md | ||
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
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
- 📚 Full Documentation Index - Complete documentation hub
- App Development Guide - Build applications on Episteme
- Go SDK - Client library and examples
- ADK-Go Integration - AI agent integration
- RFCs & Specs - Technical specifications
For Developers
Getting Started
- Development Setup - Local environment setup
- Testing Guide - Running tests
- Coding Guidelines - Rust standards and patterns
- Quality Checks - Pre-commit hooks and CI
Project Management
- Roadmap - Current and planned work
- Roadmap Archive - Completed phases
- Contributing Guide - How to contribute
Architecture Deep Dives
- Data Structures - Core types and design
- Consistency Model - Conflict resolution
- Distributed Architecture - Clustering and sharding
- Storage Engine - WAL and recovery
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()orexpect()in production code - Defensive Writes: All writes go through WAL with fsync
- Structured Logging: Use
tracing(info!, warn!, error!)
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
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- License: See LICENSE file
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 |