Mycel Documentation¶
Mycel is a declarative microservice runtime — you describe what connects to what, and it runs the service.
You point Mycel at the things you want to connect — an API, a database, a queue, a gRPC service — and it runs the microservice that moves data between them. The plumbing every service repeats (HTTP server, connection pools, marshalling, retries) is Mycel's job; the only logic you write is your service's own, and only when it needs it. Same binary for every service — only the configuration changes.
Every Mycel service automatically includes health checks, Prometheus metrics, hot reload, and rate limiting — zero configuration needed.
Getting Started¶
New to Mycel? Start here.
| Document | Description |
|---|---|
| Introduction | What Mycel is, the core model, and how it differs from traditional microservice development |
| Installation | Docker, Go binary, Helm, and Docker Compose setup |
| Quick Start | Build and run your first Mycel service in 5 minutes |
Core Concepts¶
The foundational building blocks of every Mycel service.
| Document | Description |
|---|---|
| Connectors | Bidirectional adapters: REST, database, queues, gRPC, WebSocket, file, and more |
| Flows | The unit of work — wiring connectors together with transforms, validation, caching, and error handling |
| Transforms | CEL-based data transformations and the complete built-in function reference |
| Types | Schema validation with field constraints, custom validators, and federation directives |
| Aspects | Cross-cutting concerns (AOP) — audit, metrics, alerting, response enrichment — applied across flows by name pattern |
| Environments | Environment variables, .env files, and per-environment configuration overlays |
Guides¶
Step-by-step guides for specific features and patterns.
| Document | Description |
|---|---|
| Common Use Cases | Complete examples: CRUD + Slack notification, welcome emails, audit logs, caching, event publishing, error alerting, and more |
| Multi-Step Flows | Orchestrate data from multiple sources in a single flow using steps, enrich, and after blocks |
| Caching | In-memory and Redis caching: inline cache, named cache, invalidation, and deduplication |
| Synchronization | Distributed locks, semaphores, and coordinate (signal/wait) for concurrent flow safety |
| Sagas & State Machines | Distributed transactions with automatic compensation, entity lifecycle management, and long-running workflows |
| Real-Time | WebSocket, Server-Sent Events, Change Data Capture, and GraphQL subscriptions |
| Batch Processing | Process large datasets in chunks: migrations, ETL, reindexing |
| Notifications | Email, Slack, Discord, SMS, push notifications, and webhooks |
| Auth | JWT authentication, presets, MFA (TOTP, WebAuthn), and SSO/social login |
| Security | Secure-by-default sanitization, XXE protection, SQL injection prevention, and WASM sanitizers |
| Error Handling | Retry with backoff, dead letter queues, circuit breakers, custom error responses, and on_error aspects |
| Resilience & Failure Recovery | What survives a crash or power cut: availability vs durability, broker redelivery, sync vs async ingestion, idempotency, and the resilience toolbox |
| Format System | Multi-format support (JSON, XML) at connector, flow, and step level |
| Extending Mycel | Custom validators, WASM functions, mocks for testing, and plugins |
| Debugging | Trace flows step-by-step, interactive breakpoints, dry-run, DAP server for IDE debugging (VS Code, IntelliJ, Neovim) |
| Observability | Prometheus metrics, Grafana dashboards, alerting rules, and monitoring setup |
| Troubleshooting | Common errors, diagnosis steps, and solutions for startup, database, flow, and deployment issues |
Reference¶
Complete syntax reference for configuration and CLI.
| Document | Description |
|---|---|
| Configuration Reference | Complete HCL syntax for every block type: service, connector, flow, type, transform, aspect, auth, saga, state_machine |
| CEL Functions | All built-in transform functions with signatures and examples |
| CLI Reference | All commands and flags: start, validate, check, export, plugin |
| API Endpoints | Built-in HTTP endpoints: health, metrics, workflow, auth |
Deployment¶
Running Mycel in production.
| Document | Description |
|---|---|
| Docker | Docker run, Docker Compose, custom images, environment variables |
| Kubernetes | Helm chart, manual deployment, health probes, HPA, Prometheus scraping |
| Production Guide | Security checklist, database pooling, logging, monitoring, common issues |
Advanced¶
Advanced features for complex requirements.
| Document | Description |
|---|---|
| GraphQL Federation | Building federated subgraphs: entities, cross-subgraph references, subscriptions, gateway setup |
| WASM | Building WASM modules in Rust, Go/TinyGo, C, C++, AssemblyScript, and Zig |
| Plugins | Extending Mycel with WASM plugins: connectors, validators, sanitizers |
| Integration Patterns | Common architectural patterns: protocol bridge, event sourcing, CDC pipeline, saga orchestration |
Connector Catalog¶
Documentation for each connector type.
| Connector | Type | Description |
|---|---|---|
| REST | Server + Client | HTTP endpoints and API calls |
| Database | Read + Write | PostgreSQL, MySQL, SQLite, MongoDB |
| GraphQL | Server + Client | Schema-based API with Federation v2 |
| Queue | Consumer + Producer | RabbitMQ, Kafka, and Redis Pub/Sub |
| MQTT | Subscribe + Publish | IoT messaging (QoS 0/1/2) |
| FTP | Read + Write | FTP, FTPS, and SFTP |
| gRPC | Server + Client | Protocol Buffers RPC |
| TCP | Server + Client | JSON, msgpack, NestJS protocols |
| Cache | Read + Write | Memory and Redis |
| File | Read + Write | Local filesystem with watch mode |
| S3 | Read + Write | AWS S3 and MinIO |
| WebSocket | Bidirectional | Real-time with rooms and per-user targeting |
| SSE | Server Push | Server-Sent Events with rooms |
| CDC | Stream | PostgreSQL WAL change capture |
| Elasticsearch | Write | Search and analytics |
| OAuth | Server | Social login and OIDC |
| SOAP | Server + Client | SOAP 1.1/1.2 web services |
| Send | SMTP, SendGrid, AWS SES | |
| Slack | Send | Slack Bot API |
| Discord | Send | Discord Bot API |
| SMS | Send | Twilio, AWS SNS |
| Push | Send | FCM, APNs |
| Webhook | Send | HTTP callbacks |
Project¶
| Document | Description |
|---|---|
| Architecture | Design decisions: why HCL, why CEL, why WASM, why Go, trade-offs |
| Roadmap | Implementation status, phase history, and pending work |
| Changelog | Version history with detailed change descriptions |