Skip to content

all-source-os/chronos-monorepo

Repository files navigation

AllSource Event Store - Chronos Monorepo

crates.io docs.rs Rust Core Go Control Plane Elixir Query Service MCP Server

High-performance event sourcing platform with distributed architecture and AI-native tooling.


Quick Links

Category Links
Documentation 📋 Docs Hub · Architecture · SOLID Principles · Performance
Bug Fixes ✅ Critical Bugs Fixed · AllFrame Integration Unblocked (Nov 30, 2025)
Quality ✅ Quality Gates · Setup Guide · make check before commit
Query Service Roadmap · Implementation Guide · Architecture Optimization
Roadmaps Comprehensive Roadmap · Phase 1.5 Progress · TDD Results
Guides Quick Start · Demo
Services Rust Core · Go Control Plane · Query Service · MCP Server (Elixir) · Web

Project Status

✅ Current State (November 2025)

Rust Core (v0.1.0)

  • Event store with 469K events/sec throughput
  • Schema registry with JSON Schema validation
  • Event replay engine for point-in-time rebuilds
  • Stream processing pipelines (Filter, Map, Reduce, Window, Branch, Enrich)
  • Multi-tenancy, RBAC, audit logging
  • Parquet storage + WAL for durability
  • Zero external database dependencies (DashMap in-memory + Parquet)

Go Control Plane (v1.0)

  • JWT authentication & RBAC (4 roles, 7 permissions)
  • Policy enforcement engine (5 default policies)
  • OpenTelemetry distributed tracing
  • Complete audit logging
  • Authenticated proxying to Core

Elixir Query Service (Phase 1 Complete)

  • 242 tests passing (7 doctests + 235 tests)
  • Query DSL with fluent Elixir pipes
  • GenServer-based projections with OTP supervision
  • Event pipelines (Filter, Transform, Enrich, Validate, Route, Aggregate)
  • Phoenix HTTP API (11 endpoints)
  • Tesla client with Core integration
  • Phase 2: 3-4 weeks (WebSocket integration, Broadway refinement)

MCP Server (Elixir)

  • AI-native interface to event store via Claude Desktop
  • 11 core tools for event operations
  • TOON format by default (~50% fewer tokens than JSON)
  • Real-time streaming and projections
  • OTP supervision for fault tolerance
  • Migrated from TypeScript to Elixir for better stack alignment
  • v2.0 planned: 55+ tools

Web Demo

  • Interactive Next.js showcase
  • Real-time event visualization

Architecture

Monorepo Structure

apps/
├── core/               # Rust event store (port 3900)
├── control-plane/      # Go control plane (port 3901)
├── query-service/      # Elixir query service (port 3902)
├── mcp-server-elixir/ # MCP server (Elixir)
└── web/                # Next.js web app (port 3000)

packages/
└── ui/                 # Shared UI components

tooling/
├── biome/             # Linting config
└── e2e/               # E2E tests

Service Architecture

Distributed Services:

  • Rust Core (port 3900): High-performance event storage and processing
  • Go Control Plane (port 3901): Enterprise orchestration and management
  • Elixir Query Service (port 3902): Fault-tolerant query processing with OTP
  • MCP Server (Elixir): AI-native interface for Claude Desktop
  • Web Demo (port 3000): Interactive Next.js showcase

Key Principle: Zero External Databases

  • Core uses DashMap (in-memory) + Parquet files + WAL
  • 11.9 μs query latency
  • No PostgreSQL, no Redis, no external dependencies

Rust Core (apps/core)

Version: v0.2.0 · crates.io · docs.rs

# Add to your Cargo.toml (pin to minor version)
cargo add [email protected]
[dependencies]
allsource-core = "0.2"  # Pin to minor version for stability

Features: Schema registry, event replay, stream processing pipelines (6 operators) Storage: DashMap + Parquet + WAL (zero external databases) Documentation: Core README · Changelog · Features · Security · docs.rs

Go Control Plane (apps/control-plane)

Version: v1.0 Features: JWT auth, RBAC (4 roles, 7 permissions), policy enforcement, audit logging, OpenTelemetry tracing Documentation: Control Plane README

Elixir Query Service (apps/query-service)

Status: Phase 1 Complete, Phase 2 in planning (3-4 weeks) Port: 3902 Features: Query DSL, GenServer projections, event pipelines, Phoenix HTTP API Tests: 242 passing (7 doctests + 235 tests) Documentation: Query Service README · Roadmap

MCP Server (apps/mcp-server-elixir)

Status: Active, migrated from TypeScript to Elixir Features: 11 core tools, AI-native interface via Claude Desktop, OTP supervision, TOON format for ~50% token reduction Documentation: MCP README · Setup Guide

Web Demo (apps/web)

Status: Interactive showcase Port: 3000 Features: Real-time event visualization Documentation: Web README


Performance

Current (v1.0)

  • Ingestion: 469,000 events/sec
  • Query p99: 11.9μs
  • Concurrent writes: 7.98ms (8 threads)

Optimizations Applied

  • ✅ Lock-free data structures (DashMap)
  • ✅ Zero-cost field access (public fields)
  • ✅ No validation in hot path
  • ✅ Batch processing support

Full details: Performance Guide · Architecture Optimization


Development

Prerequisites

  • Rust: 1.75+
  • Go: 1.21+
  • Elixir: 1.19+ (with Erlang/OTP 27+)
  • Node.js: 18+ (for MCP server)

Quick Start

# Clone the repository
git clone https://github.com/allsource/chronos-monorepo.git
cd chronos-monorepo

# Run Rust tests
cd apps/core
cargo test --lib

# Run Go tests
cd ../control-plane
go test ./...

# Run Elixir tests
cd ../query-service
mix test

# Run benchmarks
cd ../core
cargo bench --bench performance_benchmarks

Detailed guide: Quick Start


Testing

Rust Core

cd apps/core

# All tests
cargo test --lib

# Specific module
cargo test --lib -- domain::

# With coverage
cargo tarpaulin --lib --out Html

Status: ✅ 86/86 tests passing (100%) Coverage: 100% for domain and application layers

Go Control Plane

cd apps/control-plane

# All tests
go test ./...

# With coverage
go test ./... -cover

# Verbose
go test -v ./...

Status: ✅ All tests passing, 23.2% coverage

Elixir Query Service

cd apps/query-service

# All tests
mix test

# Watch mode
mix test.watch

# With coverage
mix test --cover

Status: ✅ 281/281 tests passing (100%)


Documentation Organization

All documentation uses timestamp-based organization with clear deprecation markers:

docs/
├── current/          # ✅ Active documentation
├── archive/          # ⚠️ Historical/deprecated docs
├── roadmaps/         # 📋 Planning and progress
├── guides/           # 📚 How-to guides
├── architecture/     # 🏗️ ADRs
└── operations/       # 🔧 Ops guides

Status Markers

  • CURRENT - Active, up-to-date
  • ⚠️ DEPRECATED - Historical only
  • 🔄 SUPERSEDED - Replaced by newer doc
  • 📝 DRAFT - Work in progress
  • PLANNED - Not yet implemented

Full index: Documentation Index


Key Design Principles

Clean Architecture

  • Layer 1 (Domain): Pure business entities with zero dependencies
  • Layer 2 (Application): Use cases orchestrating domain logic
  • Layer 3 (Infrastructure): Concrete implementations of abstractions
  • Layer 4 (Frameworks): Web servers, databases, external services

SOLID Principles

  • SRP: Each module has one reason to change
  • OCP: Open for extension via traits
  • LSP: Subtypes are substitutable
  • ISP: Segregated read/write interfaces
  • DIP: Depend on abstractions, not concretions

Full details: SOLID Principles


Additional Resources

Documentation:

Service-Specific:


Contributing

We follow a TDD approach for all refactoring:

  1. Let tests guide the refactoring
  2. Fix compilation errors systematically
  3. Use tests as validation
  4. Move aggressively - don't worry about backward compatibility during refactoring

Detailed guide: Contributing


Roadmap

Current Focus (November 2025):

  • ✅ Rust Core v0.1.0 with schema registry, replay engine, stream processing
  • ✅ Go Control Plane v1.0 with enterprise features
  • ✅ Elixir Query Service Phase 1 complete (242 tests passing)
  • 📋 Query Service Phase 2 (3-4 weeks): WebSocket integration, Broadway refinement
  • 📋 MCP Server v2.0: Expanding from 11 to 55+ tools

Detailed Roadmaps:


License

MIT License


Support


Last Updated: November 4, 2025 Versions: Rust Core v0.1.0 · Go Control Plane v1.0 · Elixir Query Service Phase 1 Complete

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •