Quickstart:
- Install Cookiecutter:
pip install cookiecutter- Generate your project:
cookiecutter gh:pyfunc/cookiecutter- Answer prompts to select name, protocols, services, etc.
- Enter the generated directory and follow the instructions below.
Navigation: Use the menu for quick access to any section.
- Solution Overview
- Requirements
- Project Structure
- How to Use the Modules
- Tool Installation
- Project Installation
- Running the Project
- Plugin Development
- Environment Configuration
- Testing
- Additional Resources
- About Tom Sapletta
Coming Soon: The next release will introduce standardized modules, letting you add new services and protocols (e.g., GraphQL, AMQP) to your Cookiecutter project with just a few steps—either at generation time or later as plug-and-play modules.
This template enables you to build modular, multi-protocol, production-ready backend systems. Each service or protocol lives in its own directory, with independent configuration, dependencies, and Dockerfile. You can rapidly prototype, scale, and extend your system for edge, cloud, IoT, and AI/LLM-powered applications.
- Python 3.8+
- pipx (recommended)
- Poetry (recommended)
.
├── core
│ ├── config_manager.py
│ ├── ...
├── grpc
│ ├── server.py
│ ├── client.py
│ ├── Dockerfile
│ └── ...
├── rest
│ ├── server.py
│ ├── client.py
│ ├── Dockerfile
│ └── ...
├── mqtt
│ ├── server.py
│ ├── client.py
│ ├── Dockerfile
│ └── ...
├── process
│ ├── plugin_system.py
│ └── plugins
│ └── my_plugin.py
└── ...
Linux/macOS:
python3 -m pip install --user pipx
python3 -m pipx ensurepath
Ubuntu:
sudo apt update
sudo apt install pipx
pipx ensurepath
macOS:
brew install pipx
pipx ensurepath
Windows:
py -m pip install --user pipx
.\pipx.exe ensurepath
Linux/macOS:
curl -sSL https://install.python-poetry.org | python3 -
Windows:
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
Check installation:
poetry --version
- Clone the repository or generate a project with cookiecutter:
pip install cookiecutter cookiecutter gh:pyfunc/cookiecutter
- Enter the project directory.
- Install dependencies:
poetry install
cookiecutter gh:pyfunc/cookiecutter
You will be prompted to select project name, description, author, protocols (gRPC, REST, MQTT, etc.), and other options. Example prompt:
[1/25] project_name ( Project): tts
[2/25] project_slug (tts):
[3/25] project_description (A modular text-to-speech system with MCP integration):
...
[6/25] Select license
1 - MIT
2 - Apache-2.0
3 - GPL-3.0
4 - BSD-3-Clause
Choose from [1/2/3/4] (1):
...
curl -sSL https://install.python-poetry.org | python3 -
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
Check installation:
poetry --version
poetry install
poetry shell
Each protocol/service (gRPC, REST, MQTT, etc.) can be run independently. For example:
poetry run python grpc/server.py
poetry run python rest/server.py
Or use Makefile/Docker Compose if available:
make up
- To add a new protocol/service, create a new directory (e.g.,
graphql/
), add yourserver.py
,client.py
, andDockerfile
. - Register new plugins in
process/plugins/
. - Use environment variables for configuration.
# process/plugins/my_text_plugin.py
from process.process_base import ProcessBase
from process.plugin_system import register_plugin
class MyTextPlugin(ProcessBase):
def process_text(self, text, **kwargs):
return self.create_result(
data=text[::-1],
format='text',
metadata={'plugin': 'my_text_plugin'}
)
register_plugin('my_text_plugin', MyTextPlugin)
See above for Poetry. For pipx:
python3 -m pip install --user pipx
python3 -m pipx ensurepath
See steps above (Poetry, dependencies, environment activation).
See "How to Use the Modules" above for running individual services or all at once.
See example above. Place your plugin in process/plugins/
, inherit from ProcessBase
, and register it.
Copy .env.example
to .env
in the main directory or for each module as needed. Use environment variable prefixes for each component: CORE_*
, PROCESS_*
, GRPC_*
, etc.
Run tests for all modules:
make test
Or for a specific module:
cd process
poetry run pytest
This project provides a highly modular, extensible, and production-ready template for building multi-service, multi-protocol applications. Its architecture is designed to support rapid development, easy integration, and scalable deployment of various backend services—each encapsulated in its own module and container.
- Rapid Prototyping: Quickly scaffold new projects with best practices for code quality, testing, and deployment.
- Multi-Protocol Support: Out-of-the-box support for gRPC, REST, MQTT, WebRTC, WebSocket, IMAP, FTP, and more.
- Separation of Concerns: Each service (e.g., API, messaging, processing) lives in its own directory, with its own dependencies, configuration, and Dockerfile.
- Edge, Cloud, and IoT: Suitable for distributed, cloud-native, and edge computing scenarios.
- AI/LLM Integration: Ready for Model Context Protocol (MCP), LangChain, and other AI/LLM integrations.
The architecture is designed to grow with your needs:
- Add New Protocols Easily: Create new directories (e.g.,
graphql
,coap
,amqp
), add a Dockerfile and service code, and integrate with the rest of the stack. - Polyglot Services: Implement services in different languages (Python, Go, Node.js, etc.)—each can have its own tech stack and dependencies.
- Plug-and-Play Modules: Swap, upgrade, or remove services without affecting the rest of the system.
- Custom Plugins: Extend the core processing engine with your own plugins, registered dynamically.
- AI/LLM Expansion: Integrate new AI models, NLP pipelines, or ML inference endpoints as independent modules.
- Scalable Deployment: Each service can be scaled independently using Docker Compose, Kubernetes, or serverless platforms.
init your repository and run:
cookiecutter gh:pyfunc/cookiecutter
result
You've downloaded /home/tom/.cookiecutters/cookiecutter before. Is it okay to delete and re-download it? [y/n] (y): y
[1/25] project_name ( Project): tts
[2/25] project_slug (tts):
[3/25] project_description (A modular text-to-speech system with MCP integration):
[4/25] author_name (Tom Sapletta):
[5/25] author_email ([email protected]):
[6/25] Select license
1 - MIT
2 - Apache-2.0
3 - GPL-3.0
4 - BSD-3-Clause
Choose from [1/2/3/4] (1):
[7/25] Select python_version
Suppose you want to add a GraphQL API:
- Create a new directory:
mkdir graphql cd graphql poetry init
- Add dependencies:
poetry add strawberry-graphql fastapi uvicorn
- Create service files:
server.py
(GraphQL server)client.py
(optional client)Dockerfile
(containerization)
- Integrate with other modules:
- Use shared environment variables, connect to the process engine, or expose new endpoints.
To add support for AMQP (RabbitMQ):
- Create an
amqp/
directory withserver.py
,client.py
, and aDockerfile
. - Add AMQP client/server logic using
pika
(Python) oramqplib
(Node.js). - Register the AMQP service in your orchestration (Docker Compose, Kubernetes).
# process/plugins/my_text_plugin.py
from process.process_base import ProcessBase
from process.plugin_system import register_plugin
class MyTextPlugin(ProcessBase):
def process_text(self, text, **kwargs):
# Custom text transformation
return self.create_result(
data=text[::-1], # Example: reverse text
format='text',
metadata={'plugin': 'my_text_plugin'}
)
register_plugin('my_text_plugin', MyTextPlugin)
- Independent Components: Each service (gRPC, REST, MCP, MQTT, WebSocket, etc.) can run as a standalone repository or within the same monorepo.
- Language Independence: Services can be implemented in Python, Go, Node.js, or any language.
- Minimal Coupling: Each module only depends on what it needs.
- Standardized Interfaces: Clear API contracts and communication protocols.
- Shared Tools: Common utilities are available but not required.
- MCP (Model Context Protocol): Standard protocol for integrating with LLMs and AI tools.
- LangChain: Easily add LLM-powered chains and agents.
- MQTT/WebSocket: Connect to real-time systems, IoT devices, or chatbots.
- Separate Dockerfiles: Tailor environments for each service.
- Modular: Develop, test, and deploy services independently.
- Clear Boundaries: Each service has its own directory, configuration, and lifecycle.
- Easy Code Generation: Consistent structure enables automated code generation and scaffolding.
For more details, see the Modular Architecture and Developer Guide.
.
├── core
│ ├── config_manager.py
│ ├── config.py
│ ├── error_handling.py
│ ├── __init__.py
│ ├── logging.py
│ ├── monitoring.py
│ ├── README.md
│ ├── scaffold.py
│ ├── test_config.py
│ └── utils.py
├── deploy
│ ├── ansible
│ ├── fabfile.py
│ ├── kubernetes
│ └── scripts
├── dev_setup.py
├── docker-compose.prod.yml
├── docker-compose.yml
├── ftp
│ ├── client.py
│ ├── __init__.py
│ ├── server.py
│ ├── test_ftp_client.py
│ └── test_ftp_server.py
├── grpc
│ ├── client.py
│ ├── Dockerfile
│ ├── __init__.py
│ ├── Makefile
│ ├── proto
│ ├── pyproject.toml
│ ├── server.py
│ └── test_grpc.py
├── hooks
│ ├── post_gen_project.py
│ └── pre_gen_project.py
├── imap
│ ├── client.py
│ ├── server.py
│ └── test_imap_client.py
├── langchain
├── Makefile
├── mcp
│ ├── Dockerfile
│ ├── __init__.py
│ ├── Makefile
│ ├── mcp_server.py
│ ├── process
│ ├── protocol
│ ├── pyproject.toml
│ ├── README.md
│ ├── resources
│ ├── sampling
│ ├── tests
│ ├── tools
│ └── transports
├── mqtt
│ ├── client.py
│ ├── __init__.py
│ ├── server.py
│ ├── test_mqtt_client.py
│ └── test_mqtt_server.py
├── process
│ ├── adapters
│ ├── Dockerfile
│ ├── __init__.py
│ ├── languages.py
│ ├── Makefile
│ ├── plugin_system.py
│ ├── process_base.py
│ ├── process_config.py
│ ├── process.py
│ ├── process.py.bak
│ ├── pyproject.toml
│ ├── README.md
│ └── test_process.py
├── pyproject.toml
├── quality
│ ├── bandit.yaml
│ ├── conftest.py
│ ├── doc_checker.py
│ ├── formatters.py
│ ├── hooks.py
│ ├── __init__.py
│ ├── linters.py
│ ├── Makefile
│ ├── pyproject.toml
│ ├── reporters.py
│ ├── security.py
│ ├── testers.py
│ └── tox.ini
├── README.md
├── rest
│ ├── client.py
│ ├── Dockerfile
│ ├── __init__.py
│ ├── Makefile
│ ├── models
│ ├── pyproject.toml
│ ├── server.py
│ └── test_rest.py
├── scripts
│ └── quality.sh
├── shell
│ ├── client.py
│ ├── __init__.py
│ ├── interactive.py
│ ├── main.py
│ ├── Makefile
│ └── pyproject.toml
├── tests
│ ├── conftest.py
│ ├── e2e_tests
│ ├── __init__.py
│ └── __pycache__
├── webrtc
│ ├── client.py
│ ├── Dockerfile
│ ├── __init__.py
│ ├── Makefile
│ ├── pyproject.toml
│ ├── session.py
│ ├── signaling.py
│ ├── static
│ ├── test_webrtc.py
│ └── test_websocket_client.py
└── websocket
├── client.py
└── server.py
With over 12 years of experience as a DevOps Engineer, Software Developer, and Systems Architect, I specialize in creating human-technology connections through innovative solutions. My expertise spans edge computing, hypermodularization, and automated software development lifecycles, focusing on building bridges between complex technical requirements and human needs.
Currently, as the founder and CEO of Telemonit, I'm developing Portigen—an innovative power supply system with integrated edge computing functionality that enables natural human-machine interactions even in environments with limited connectivity.
- DevOps & Cloud Engineering: Docker, Kubernetes, CI/CD pipelines, infrastructure automation
- Software Development: Java, Python, PHP, NodeJS, microservices architecture
- Edge Computing & IoT: Distributed systems, sensor networks, real-time processing
- Hardware-Software Integration: Embedded systems, power management solutions
- Research: TextToSoftware, Hypermodularization, Model-Based Systems Engineering
- Portigen: Innovative power supply with edge computing, 500Wh capacity, ultra-low latency, modular design for IoT/edge scenarios.
- TextToSoftware Ecosystem: Systems converting natural language into functional applications, bridging human communication and code generation.
- Python Packages: Creator of pifunc, mdirtree, markdown2code, dynapsys, and more—focusing on automation, modularity, and DSLs.
- "System sterowania dla osób niepełnosprawnych" (Control System for People with Disabilities) – Elektronika dla Wszystkich, 1999
- "Hexagonal Sandbox with Smartphones" – Illustrated book explaining hypermodularization for children
- Hyper Modularity – Software modularization insights
- Telemonit, Frankfurt Oder
- Founder & CEO, Hardware and Software Developer (06.2024 – Present)
- Leading development and production of Portigen energy supply stations with edge computing
- Link11 GmbH, Frankfurt
- DevOps Engineer CDN/DNS (07.2023 – 01.2024)
- Optimized CDN/DNS services for improved security and performance
- IT-NRW (SEVEN PRINCIPLES AG), Düsseldorf
- Java Developer and DevOps (09.2020 - 04.2023)
- Developed integration platforms for public service applications
- TextToSoftware: Automated Code Generation from Natural Language
- Hypermodularization in Software Architecture
- Edge Computing and Distributed Systems
- Model-Based Systems Engineering (MBSE)
- Component-Based Software Development
- Digital Twin Technology
I welcome collaboration in edge computing, hypermodularization, text-to-software technologies, and open-source hardware/software development. Especially interested in projects bridging academic research with practical industry applications and technology education initiatives.
- ORCID: 0009-0000-6327-2810
- GitHub: tom-sapletta-com
- PyPI: Python Packages
- LinkedIn: Tom Sapletta
- English Blog: tom.sapletta.com
- Deutsch: tom.sapletta.de
- Polski: tom.sapletta.pl
- Softreck, Software Development
- Telemonit, Hardware Development
Hypermodularity, ModDevOps, Edge Computing, MBSE, Text to Software, Python, DSL, Automation, DevOps, Digital Twin
- TextToSoftware: Automated Code Generation from Natural Language
- Hypermodularization in Software Architecture and Development
- Edge Computing and Distributed Systems
- Model-Based Systems and Software Engineering (MBSE and ModDevOps)
- Component-Based Software Development (CBSD)
- Digital Twin Technology
- Open Source Development Methodologies
- Hardware-Software Integration
- Modules.webstream.dev – WebStream modular solutions
- Infrastructure Development: DevOps, Cloud Engineer, Solutions Architect
- Software Development: Python, Java, Kotlin, Scala, JavaScript, TypeScript, Node.js, PHP
- Hardware Development: Network, IoT, Mobile Servers
- SaaS Services:
- Automatyzer.com (Automation)
- OneDayRun.com (One-day SaaS services)