Feature overview. Marty Microservices Framework (MMF) is designed to meet all of the core needs of a microservice-based system. It bundles an API gateway for intelligent routing and load-balancing, service discovery via Consul, and centralized configuration management with hot-reload. Built-in event streaming uses Kafka for asynchronous messaging, while database integration provides multi-database support with connection pooling and distributed caching via Redis. The framework offers real-time metrics and profiling, with Prometheus, Grafana and Jaeger providing metrics, dashboards and distributed tracing. A rich CLI and project scaffolding system generates FastAPI, gRPC or hybrid services, manages dependencies and automates Docker/Kubernetes deployment. The security module supplies JWT-based auth, OAuth2/OpenID Connect integration, rate limiting, DDoS protection, zero-trust components and certificate management. MMF also includes a comprehensive test suite (unit, integration and e2e), extensive documentation and guides, operations templates for Kubernetes, service-mesh configs, dashboards and CI/CD pipelines, and sample domain services such as order, payment and inventory to illustrate patterns. These features collectively aim to give plugin authors and service teams everything they need out of the box.
Technical stack. MMF is built with PythonΒ 3.10+, using FastAPI for HTTP endpoints and gRPC for high-performance RPC, and provides Jinja-based templates for scaffolding new services. Service discovery uses Consul, while event-driven communication relies on Kafka; data is persisted in multiple databases (e.g., PostgreSQL) with built-in connection pooling and augmented with a Redis cache. Observability is handled by Prometheus for metrics, Grafana for dashboards and Jaeger for distributed tracing, all running inside a local or cloud Kubernetes cluster. The frameworkβs CLI (based on Typer) orchestrates code generation, dependency management, Docker builds and Kubernetes deployments, while the security layer integrates JWT and OAuth2/OIDC providers and includes rate-limiting and certificate management. Operations tooling includes Kubernetes manifests, service-mesh configuration, monitoring dashboards and CI/CD pipelines. Together, this stack ensures that MMF can deliver the full set of microservices features listed above with minimal additional setup.
.
βββ README.md
βββ Makefile
βββ pyproject.toml
βββ docs/ # Documentation
β βββ guides/ # Development guides
β βββ architecture/ # Architecture documentation
β βββ demos/ # Demo documentation & quickstarts
βββ src/ # Source code
β βββ marty_msf/ # Main framework package
β βββ framework/ # Core framework modules
β βββ cli/ # Command-line interface
β βββ security/ # Security modules
β βββ observability/ # Monitoring & observability
βββ services/ # Service templates & examples
β βββ fastapi/ # FastAPI service templates
β βββ grpc/ # gRPC service templates
β βββ hybrid/ # Hybrid service templates
β βββ shared/ # Shared service components & Jinja assets
βββ examples/ # Usage examples
β βββ demos/ # Demo applications
β β βββ order-service/ # Order service demo
β β βββ payment-service/ # Payment service demo
β β βββ inventory-service/ # Inventory service demo
β β βββ runner/ # Demo runner scripts
β βββ notebooks/ # Jupyter notebooks for tutorials
βββ ops/ # Operations & deployment
β βββ k8s/ # Kubernetes manifests
β βββ service-mesh/ # Service mesh configuration
β βββ dashboards/ # Monitoring dashboards
β βββ ci-cd/ # CI/CD pipelines
βββ scripts/ # Utility scripts
β βββ dev/ # Development scripts
β βββ tooling/ # Build & maintenance tools
βββ tests/ # Test suite
β βββ unit/ # Unit tests
β βββ integration/ # Integration tests
β βββ e2e/ # End-to-end tests
β βββ quality/ # Code quality & lint tests
βββ tools/ # Development tools
β βββ scaffolding/ # Project generators & templates
βββ var/ # Runtime files (gitignored logs, pids, reports)
# 1. Clone and setup
git clone https://github.com/your-org/marty-microservices-framework.git
cd marty-microservices-framework
make setup
# 2. Start local Kubernetes cluster with full observability stack
make kind-upThat's it! You now have a complete local development environment running:
- π― Prometheus: http://localhost:9090 (metrics & monitoring)
- π Grafana: http://localhost:3000 (dashboards - login: admin/admin)
- βΈοΈ Kubernetes cluster: Full local cluster for development
- π Complete observability stack: Logging, metrics, tracing
# Check cluster status
make kind-status
# View logs
make kind-logs
# Stop the cluster
make kind-down
# Restart everything
make kind-restartThe framework includes comprehensive automated E2E testing using KIND (Kubernetes in Docker):
# Run full E2E test suite (complete validation)
make test-e2e
# Quick E2E tests for development (faster iteration)
make test-e2e-quick
# Smoke tests only (basic health checks)
make test-e2e-smoke
# Development mode (keep cluster for debugging)
make test-e2e-dev
# Clean up all test resources
make test-e2e-cleanTest Coverage: 21/23 tests passing (91.3% success rate)
- β Health checks, authentication, user management
- β Kubernetes deployment, service discovery, ingress
- β Docker containerization, cluster orchestration
- β Hexagonal architecture validation
See E2E Testing Documentation for detailed information.
# Generate a FastAPI service
make generate TYPE=fastapi NAME=my-api
# Generate a gRPC service
make generate TYPE=grpc NAME=my-grpc-service
# Generate a hybrid service (FastAPI + gRPC)
make generate TYPE=hybrid NAME=my-hybrid-service- API Gateway: Intelligent routing and load balancing
- Service Discovery: Consul-based service registration
- Configuration Management: Centralized config with hot-reload
- Event Streaming: Kafka integration for messaging
- Database Integration: Multi-database support with connection pooling
- Caching: Redis-based distributed caching
- Performance Monitoring: Real-time metrics and profiling
- Project scaffolding and code generation
- Service templates and boilerplate
- Dependency management
- Docker and Kubernetes deployment automation
- Configuration validation and management
- JWT-based authentication and authorization
- OAuth2 and OpenID Connect integration
- Rate limiting and DDoS protection
- Zero-trust networking components
- Certificate management
- Prometheus metrics collection
- Grafana dashboard templates
- Distributed tracing with Jaeger
- Structured logging
- Performance analytics and alerting
The framework includes several demo applications to showcase different patterns:
# Run the complete store demo (order, payment, inventory services)
cd examples/demos/runner
./start_demo.sh
# Stop the demo
./stop_demo.sh- Order Service: Handles order processing and workflow
- Payment Service: Manages payment processing and transactions
- Inventory Service: Tracks inventory levels and stock management
The framework includes comprehensive testing at multiple levels:
# Run unit tests
make test-unit
# Run integration tests
make test-integration
# Run end-to-end tests
make test-e2e
# Run all tests with coverage
make test-all- Architecture Guide: System design and patterns
- Development Guides: Setup and development workflows
- Demo Documentation: Tutorial walkthroughs
- API Reference: Complete API documentation
- Python 3.10+
- Docker & Docker Compose
- kubectl
- Make
# Install development dependencies
make install-dev
# Set up pre-commit hooks
make setup-hooks
# Run code quality checks
make lint
# Run security scans
make securityThe framework supports multiple deployment targets:
# Deploy to local Kubernetes
make deploy-local
# Deploy to staging
make deploy-staging
# Deploy to production
make deploy-prodMIT License - see LICENSE for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
- π§ Email: team@marty-msf.com
- π Issues: GitHub Issues
- π Documentation: marty-msf.readthedocs.io