YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Drex

Python monorepo for microservices and shared libraries.
Services communicate via gRPC and Kafka. All data contracts live in a single shared schema library.

License: All Rights Reserved Python Kafka gRPC


Architecture Overview

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  HTTP clients ───▢ β”‚    Gateway      β”‚  routing + aggregation only
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚ gRPC
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β–Ό                  β–Ό                  β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚  Service A  β”‚   β”‚  Service B  β”‚   β”‚  Service C  β”‚
   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
          β”‚                  β”‚                  β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚  Kafka  β”‚  event bus
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

  Shared: libs/schema  Β·  libs/util  Β·  libs/feature

All services import schemas from drex.schema and helpers from drex.util.
No business logic lives in the Gateway. No domain crosses its bounded context.


Repository Layout

drex/
β”œβ”€β”€ libs/
β”‚   β”œβ”€β”€ schema/          # Single source of truth β€” Pydantic models, Protobuf defs
β”‚   β”œβ”€β”€ util/            # Infra helpers β€” Kafka wrappers, gRPC clients, config
β”‚   └── feature/         # Reusable business logic (no transport / DB wiring)
β”œβ”€β”€ services/
β”‚   └── example_service/ # Scaffold for a real microservice
β”œβ”€β”€ gateway/             # API Gateway (routing + aggregation only)
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ adr/             # Architecture Decision Records
β”‚   β”œβ”€β”€ worklog/         # Task worklogs (per-session)
β”‚   └── features/        # Long-lived feature documentation
β”œβ”€β”€ AGENTS.md            # AI agent operating rules
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ CHANGELOG.md
β”œβ”€β”€ LICENSE
β”œβ”€β”€ .env.example
β”œβ”€β”€ .env.test
└── pyproject.toml       # Root workspace config (Poetry / Hatch)

Microservices

Service Purpose Docs
gateway HTTP β†’ gRPC routing and aggregation gateway/README.md
services/example_service Scaffold / reference implementation services/example_service/README.md

Shared Libraries

Library Purpose
libs/schema Pydantic models, Protobuf definitions, event schemas
libs/util Kafka producer/consumer wrappers, gRPC client helpers, config loader
libs/feature Portable business logic with no side-effects

Quick Start

# 1. Clone
git clone https://github.com/swordenkisk/Drex.git && cd drex

# 2. Copy environment files
cp .env.example .env

# 3. Start infrastructure (Kafka + databases)
docker compose up -d

# 4. Install all packages (from workspace root)
poetry install

# 5. Run a service
cd services/example_service
poetry run python -m example_service

Running Tests

# All tests (real Kafka + DB via test containers)
pytest

# Async tests only
pytest -m asyncio

# A single service
pytest services/example_service/tests/

See CONTRIBUTING.md for testing conventions.


Documentation Index


Β© 2025 swordenkisk β€” All Rights Reserved

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support