{"id":28237026,"url":"https://github.com/pyfunc/cookiecutter","last_synced_at":"2025-06-10T15:30:59.985Z","repository":{"id":293274153,"uuid":"983508725","full_name":"pyfunc/cookiecutter","owner":"pyfunc","description":"Cookiecutter Modular Project Template","archived":false,"fork":false,"pushed_at":"2025-05-14T19:54:33.000Z","size":283,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-23T07:49:22.954Z","etag":null,"topics":["client","cookiecutter","imap","llm","mcp","modular","modules","mqtt","project","protocols","rtsp","server","template"],"latest_commit_sha":null,"homepage":"https://pyfunc.github.io/cookiecutter/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyfunc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-14T13:39:48.000Z","updated_at":"2025-05-14T19:54:36.000Z","dependencies_parsed_at":"2025-05-14T14:57:44.737Z","dependency_job_id":"a947355c-dc61-4d25-831c-46a6ba1c5ae6","html_url":"https://github.com/pyfunc/cookiecutter","commit_stats":null,"previous_names":["pyfunc/cookiecutter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyfunc%2Fcookiecutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyfunc%2Fcookiecutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyfunc%2Fcookiecutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyfunc%2Fcookiecutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyfunc","download_url":"https://codeload.github.com/pyfunc/cookiecutter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyfunc%2Fcookiecutter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259101156,"owners_count":22805217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","cookiecutter","imap","llm","mcp","modular","modules","mqtt","project","protocols","rtsp","server","template"],"created_at":"2025-05-19T00:17:17.097Z","updated_at":"2025-06-10T15:30:59.968Z","avatar_url":"https://github.com/pyfunc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cookiecutter Modular Project Template\n\n\u003e **Quickstart:**\n\u003e 1. Install Cookiecutter:\n\u003e    ```bash\n\u003e    pip install cookiecutter\n\u003e    ```\n\u003e 2. Generate your project:\n\u003e    ```bash\n\u003e    cookiecutter gh:pyfunc/cookiecutter\n\u003e    ```\n\u003e 3. Answer prompts to select name, protocols, services, etc.\n\u003e 4. Enter the generated directory and follow the instructions below.\n\u003e\n\u003e **Navigation:** Use the menu for quick access to any section.\n\n---\n\n## Menu\n- [Solution Overview](#solution-overview)\n- [Requirements](#requirements)\n- [Project Structure](#project-structure)\n- [How to Use the Modules](#how-to-use-the-modules)\n- [Tool Installation](#tool-installation)\n- [Project Installation](#project-installation)\n- [Running the Project](#running-the-project)\n- [Plugin Development](#plugin-development)\n- [Environment Configuration](#environment-configuration)\n- [Testing](#testing)\n- [Additional Resources](#additional-resources)\n- [About Tom Sapletta](#about-tom-sapletta)\n\n---\n\n\u003e **Coming Soon:**\n\u003e 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.\n\n---\n\n## Solution Overview\n\nThis 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.\n\n---\n\n## Requirements\n- Python 3.8+\n- pipx (recommended)\n- Poetry (recommended)\n\n---\n\n## Project Structure\n\n```\n.\n├── core\n│   ├── config_manager.py\n│   ├── ...\n├── grpc\n│   ├── server.py\n│   ├── client.py\n│   ├── Dockerfile\n│   └── ...\n├── rest\n│   ├── server.py\n│   ├── client.py\n│   ├── Dockerfile\n│   └── ...\n├── mqtt\n│   ├── server.py\n│   ├── client.py\n│   ├── Dockerfile\n│   └── ...\n├── process\n│   ├── plugin_system.py\n│   └── plugins\n│       └── my_plugin.py\n└── ...\n```\n\n---\n\n## How to Use the Modules\n\n---\n\n## Tool Installation\n\n### pipx\n\n**Linux/macOS:**\n```bash\npython3 -m pip install --user pipx\npython3 -m pipx ensurepath\n```\n**Ubuntu:**\n```bash\nsudo apt update\nsudo apt install pipx\npipx ensurepath\n```\n**macOS:**\n```bash\nbrew install pipx\npipx ensurepath\n```\n**Windows:**\n```powershell\npy -m pip install --user pipx\n.\\pipx.exe ensurepath\n```\n\n### Poetry\n\n**Linux/macOS:**\n```bash\ncurl -sSL https://install.python-poetry.org | python3 -\n```\n**Windows:**\n```powershell\n(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -\n```\nCheck installation:\n```bash\npoetry --version\n```\n\n---\n\n### Project Installation\n\n1. Clone the repository or generate a project with cookiecutter:\n    ```bash\n    pip install cookiecutter\n    cookiecutter gh:pyfunc/cookiecutter\n    ```\n2. Enter the project directory.\n3. Install dependencies:\n    ```bash\n    poetry install\n    ```\n\n---\n\n### Generate Your Project\n\n```bash\ncookiecutter gh:pyfunc/cookiecutter\n```\nYou will be prompted to select project name, description, author, protocols (gRPC, REST, MQTT, etc.), and other options. Example prompt:\n\n```\n[1/25] project_name ( Project): tts\n[2/25] project_slug (tts):\n[3/25] project_description (A modular text-to-speech system with MCP integration):\n...\n[6/25] Select license\n  1 - MIT\n  2 - Apache-2.0\n  3 - GPL-3.0\n  4 - BSD-3-Clause\n  Choose from [1/2/3/4] (1):\n...\n```\n\n### Install Poetry (Dependency Manager)\n\n#### Linux/macOS\n```bash\ncurl -sSL https://install.python-poetry.org | python3 -\n```\n#### Windows (PowerShell)\n```powershell\n(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -\n```\nCheck installation:\n```bash\npoetry --version\n```\n\n### 3. Install Dependencies\n\n```bash\npoetry install\n```\n\n### 4. Activate the Environment\n\n```bash\npoetry shell\n```\n\n### 5. Run Services\n\nEach protocol/service (gRPC, REST, MQTT, etc.) can be run independently. For example:\n\n```bash\npoetry run python grpc/server.py\npoetry run python rest/server.py\n```\nOr use Makefile/Docker Compose if available:\n```bash\nmake up\n```\n\n### 6. Add or Extend Modules\n\n- To add a new protocol/service, create a new directory (e.g., `graphql/`), add your `server.py`, `client.py`, and `Dockerfile`.\n- Register new plugins in `process/plugins/`.\n- Use environment variables for configuration.\n\n#### Example: Adding a Custom Plugin\n\n```python\n# process/plugins/my_text_plugin.py\nfrom process.process_base import ProcessBase\nfrom process.plugin_system import register_plugin\n\nclass MyTextPlugin(ProcessBase):\n    def process_text(self, text, **kwargs):\n        return self.create_result(\n            data=text[::-1],\n            format='text',\n            metadata={'plugin': 'my_text_plugin'}\n        )\n\nregister_plugin('my_text_plugin', MyTextPlugin)\n```\n\n---\n\n## Tool Installation\n\nSee above for Poetry. For pipx:\n```bash\npython3 -m pip install --user pipx\npython3 -m pipx ensurepath\n```\n\n---\n\n## Project Installation\n\nSee steps above (Poetry, dependencies, environment activation).\n\n---\n\n## Running the Project\n\nSee \"How to Use the Modules\" above for running individual services or all at once.\n\n---\n\n## Plugin Development\n\nSee example above. Place your plugin in `process/plugins/`, inherit from `ProcessBase`, and register it.\n\n---\n\n## Environment Configuration\n\nCopy `.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.\n\n---\n\n## Testing\n\nRun tests for all modules:\n```bash\nmake test\n```\nOr for a specific module:\n```bash\ncd process\npoetry run pytest\n```\n\n\n\n## Solution Overview\n\nThis 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.\n\n### What is this solution for?\n\n- **Rapid Prototyping:** Quickly scaffold new projects with best practices for code quality, testing, and deployment.\n- **Multi-Protocol Support:** Out-of-the-box support for gRPC, REST, MQTT, WebRTC, WebSocket, IMAP, FTP, and more.\n- **Separation of Concerns:** Each service (e.g., API, messaging, processing) lives in its own directory, with its own dependencies, configuration, and Dockerfile.\n- **Edge, Cloud, and IoT:** Suitable for distributed, cloud-native, and edge computing scenarios.\n- **AI/LLM Integration:** Ready for Model Context Protocol (MCP), LangChain, and other AI/LLM integrations.\n\n### Future Possibilities \u0026 Extensibility\n\nThe architecture is designed to grow with your needs:\n\n- **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.\n- **Polyglot Services:** Implement services in different languages (Python, Go, Node.js, etc.)—each can have its own tech stack and dependencies.\n- **Plug-and-Play Modules:** Swap, upgrade, or remove services without affecting the rest of the system.\n- **Custom Plugins:** Extend the core processing engine with your own plugins, registered dynamically.\n- **AI/LLM Expansion:** Integrate new AI models, NLP pipelines, or ML inference endpoints as independent modules.\n- **Scalable Deployment:** Each service can be scaled independently using Docker Compose, Kubernetes, or serverless platforms.\n\n\ninit your repository and run:\n\n```bash\ncookiecutter gh:pyfunc/cookiecutter\n```\nresult\n```bash\nYou've downloaded /home/tom/.cookiecutters/cookiecutter before. Is it okay to delete and re-download it? [y/n] (y): y\n  [1/25] project_name ( Project): tts\n  [2/25] project_slug (tts): \n  [3/25] project_description (A modular text-to-speech system with MCP integration): \n  [4/25] author_name (Tom Sapletta): \n  [5/25] author_email (info@softreck.dev): \n  [6/25] Select license\n    1 - MIT\n    2 - Apache-2.0\n    3 - GPL-3.0\n    4 - BSD-3-Clause\n    Choose from [1/2/3/4] (1): \n  [7/25] Select python_version\n```\n\n\n### Example: Adding a New Service\n\nSuppose you want to add a GraphQL API:\n\n1. **Create a new directory:**\n    ```bash\n    mkdir graphql\n    cd graphql\n    poetry init\n    ```\n2. **Add dependencies:**\n    ```bash\n    poetry add strawberry-graphql fastapi uvicorn\n    ```\n3. **Create service files:**\n    - `server.py` (GraphQL server)\n    - `client.py` (optional client)\n    - `Dockerfile` (containerization)\n4. **Integrate with other modules:**\n    - Use shared environment variables, connect to the process engine, or expose new endpoints.\n\n### Example: Integrating a New Protocol\n\nTo add support for AMQP (RabbitMQ):\n\n- Create an `amqp/` directory with `server.py`, `client.py`, and a `Dockerfile`.\n- Add AMQP client/server logic using `pika` (Python) or `amqplib` (Node.js).\n- Register the AMQP service in your orchestration (Docker Compose, Kubernetes).\n\n### Example: Custom Plugin for Text Processing\n\n```python\n# process/plugins/my_text_plugin.py\nfrom process.process_base import ProcessBase\nfrom process.plugin_system import register_plugin\n\nclass MyTextPlugin(ProcessBase):\n    def process_text(self, text, **kwargs):\n        # Custom text transformation\n        return self.create_result(\n            data=text[::-1],  # Example: reverse text\n            format='text',\n            metadata={'plugin': 'my_text_plugin'}\n        )\n\nregister_plugin('my_text_plugin', MyTextPlugin)\n```\n\n### Modular Architecture Benefits\n\n- **Independent Components:** Each service (gRPC, REST, MCP, MQTT, WebSocket, etc.) can run as a standalone repository or within the same monorepo.\n- **Language Independence:** Services can be implemented in Python, Go, Node.js, or any language.\n- **Minimal Coupling:** Each module only depends on what it needs.\n- **Standardized Interfaces:** Clear API contracts and communication protocols.\n- **Shared Tools:** Common utilities are available but not required.\n\n### AI/LLM Integration\n\n- **MCP (Model Context Protocol):** Standard protocol for integrating with LLMs and AI tools.\n- **LangChain:** Easily add LLM-powered chains and agents.\n- **MQTT/WebSocket:** Connect to real-time systems, IoT devices, or chatbots.\n\n### Why This Structure?\n\n- **Separate Dockerfiles:** Tailor environments for each service.\n- **Modular:** Develop, test, and deploy services independently.\n- **Clear Boundaries:** Each service has its own directory, configuration, and lifecycle.\n- **Easy Code Generation:** Consistent structure enables automated code generation and scaffolding.\n\nFor more details, see the [Modular Architecture](docs/modular_architecture.md) and [Developer Guide](docs/developer_guide.md).\n\n\n## Full Project Structure\n\n```\n.  \n├── core\n│   ├── config_manager.py\n│   ├── config.py\n│   ├── error_handling.py\n│   ├── __init__.py\n│   ├── logging.py\n│   ├── monitoring.py\n│   ├── README.md\n│   ├── scaffold.py\n│   ├── test_config.py\n│   └── utils.py\n├── deploy\n│   ├── ansible\n│   ├── fabfile.py\n│   ├── kubernetes\n│   └── scripts\n├── dev_setup.py\n├── docker-compose.prod.yml\n├── docker-compose.yml\n├── ftp\n│   ├── client.py\n│   ├── __init__.py\n│   ├── server.py\n│   ├── test_ftp_client.py\n│   └── test_ftp_server.py\n├── grpc\n│   ├── client.py\n│   ├── Dockerfile\n│   ├── __init__.py\n│   ├── Makefile\n│   ├── proto\n│   ├── pyproject.toml\n│   ├── server.py\n│   └── test_grpc.py\n├── hooks\n│   ├── post_gen_project.py\n│   └── pre_gen_project.py\n├── imap\n│   ├── client.py\n│   ├── server.py\n│   └── test_imap_client.py\n├── langchain\n├── Makefile\n├── mcp\n│   ├── Dockerfile\n│   ├── __init__.py\n│   ├── Makefile\n│   ├── mcp_server.py\n│   ├── process\n│   ├── protocol\n│   ├── pyproject.toml\n│   ├── README.md\n│   ├── resources\n│   ├── sampling\n│   ├── tests\n│   ├── tools\n│   └── transports\n├── mqtt\n│   ├── client.py\n│   ├── __init__.py\n│   ├── server.py\n│   ├── test_mqtt_client.py\n│   └── test_mqtt_server.py\n├── process\n│   ├── adapters\n│   ├── Dockerfile\n│   ├── __init__.py\n│   ├── languages.py\n│   ├── Makefile\n│   ├── plugin_system.py\n│   ├── process_base.py\n│   ├── process_config.py\n│   ├── process.py\n│   ├── process.py.bak\n│   ├── pyproject.toml\n│   ├── README.md\n│   └── test_process.py\n├── pyproject.toml\n├── quality\n│   ├── bandit.yaml\n│   ├── conftest.py\n│   ├── doc_checker.py\n│   ├── formatters.py\n│   ├── hooks.py\n│   ├── __init__.py\n│   ├── linters.py\n│   ├── Makefile\n│   ├── pyproject.toml\n│   ├── reporters.py\n│   ├── security.py\n│   ├── testers.py\n│   └── tox.ini\n├── README.md\n├── rest\n│   ├── client.py\n│   ├── Dockerfile\n│   ├── __init__.py\n│   ├── Makefile\n│   ├── models\n│   ├── pyproject.toml\n│   ├── server.py\n│   └── test_rest.py\n├── scripts\n│   └── quality.sh\n├── shell\n│   ├── client.py\n│   ├── __init__.py\n│   ├── interactive.py\n│   ├── main.py\n│   ├── Makefile\n│   └── pyproject.toml\n├── tests\n│   ├── conftest.py\n│   ├── e2e_tests\n│   ├── __init__.py\n│   └── __pycache__\n├── webrtc\n│   ├── client.py\n│   ├── Dockerfile\n│   ├── __init__.py\n│   ├── Makefile\n│   ├── pyproject.toml\n│   ├── session.py\n│   ├── signaling.py\n│   ├── static\n│   ├── test_webrtc.py\n│   └── test_websocket_client.py\n└── websocket\n    ├── client.py\n    └── server.py\n```\n\n\n\n## Additional Resources\n- [pipx Documentation](https://pipx.pypa.io/)\n- [Poetry Documentation](https://python-poetry.org/docs/)\n- [Developer Guide](docs/developer_guide.md)\n- [Modular Architecture](docs/modular_architecture.md)\n\n---\n\n## About Tom Sapletta\n\n### Professional Overview\nWith 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.\n\nCurrently, 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.\n\n### Areas of Expertise\n- **DevOps \u0026 Cloud Engineering:** Docker, Kubernetes, CI/CD pipelines, infrastructure automation\n- **Software Development:** Java, Python, PHP, NodeJS, microservices architecture\n- **Edge Computing \u0026 IoT:** Distributed systems, sensor networks, real-time processing\n- **Hardware-Software Integration:** Embedded systems, power management solutions\n- **Research:** TextToSoftware, Hypermodularization, Model-Based Systems Engineering\n\n### Notable Projects\n- **Portigen:** Innovative power supply with edge computing, 500Wh capacity, ultra-low latency, modular design for IoT/edge scenarios.\n- **TextToSoftware Ecosystem:** Systems converting natural language into functional applications, bridging human communication and code generation.\n- **Python Packages:** Creator of pifunc, mdirtree, markdown2code, dynapsys, and more—focusing on automation, modularity, and DSLs.\n\n### Publications \u0026 Creative Works\n- \"System sterowania dla osób niepełnosprawnych\" (Control System for People with Disabilities) – Elektronika dla Wszystkich, 1999\n- \"Hexagonal Sandbox with Smartphones\" – Illustrated book explaining hypermodularization for children\n- Hyper Modularity – Software modularization insights\n\n### Last Professional Experience\n- **Telemonit, Frankfurt Oder**\n  - Founder \u0026 CEO, Hardware and Software Developer (06.2024 – Present)\n  - Leading development and production of Portigen energy supply stations with edge computing\n- **Link11 GmbH, Frankfurt**\n  - DevOps Engineer CDN/DNS (07.2023 – 01.2024)\n  - Optimized CDN/DNS services for improved security and performance\n- **IT-NRW (SEVEN PRINCIPLES AG), Düsseldorf**\n  - Java Developer and DevOps (09.2020 - 04.2023)\n  - Developed integration platforms for public service applications\n\n### Research Interests\n- TextToSoftware: Automated Code Generation from Natural Language\n- Hypermodularization in Software Architecture\n- Edge Computing and Distributed Systems\n- Model-Based Systems Engineering (MBSE)\n- Component-Based Software Development\n- Digital Twin Technology\n\n### Collaboration Opportunities\nI 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.\n\n### Contact Information\n- **ORCID:** 0009-0000-6327-2810\n- **GitHub:** [tom-sapletta-com](https://github.com/tom-sapletta-com)\n- **PyPI:** [Python Packages](https://pypi.org/user/tom-sapletta-com/)\n- **LinkedIn:** [Tom Sapletta](https://www.linkedin.com/in/tom-sapletta/)\n- **English Blog:** [tom.sapletta.com](https://tom.sapletta.com)\n- **Deutsch:** [tom.sapletta.de](https://tom.sapletta.de)\n- **Polski:** [tom.sapletta.pl](https://tom.sapletta.pl)\n- [Softreck, Software Development](https://softreck.com)\n- [Telemonit, Hardware Development](https://telemonit.com)\n\n#### Areas of Expertise\nHypermodularity, ModDevOps, Edge Computing, MBSE, Text to Software, Python, DSL, Automation, DevOps, Digital Twin\n\n#### Research Areas\n- TextToSoftware: Automated Code Generation from Natural Language\n- Hypermodularization in Software Architecture and Development\n- Edge Computing and Distributed Systems\n- Model-Based Systems and Software Engineering (MBSE and ModDevOps)\n- Component-Based Software Development (CBSD)\n- Digital Twin Technology\n- Open Source Development Methodologies\n- Hardware-Software Integration\n\n#### Open Source Projects\n- [Modules.webstream.dev](https://modules.webstream.dev) – WebStream modular solutions\n\n#### Services Offered\n- **Infrastructure Development:** DevOps, Cloud Engineer, Solutions Architect\n- **Software Development:** Python, Java, Kotlin, Scala, JavaScript, TypeScript, Node.js, PHP\n- **Hardware Development:** Network, IoT, Mobile Servers\n- **SaaS Services:**\n  - Automatyzer.com (Automation)\n  - OneDayRun.com (One-day SaaS services)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyfunc%2Fcookiecutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyfunc%2Fcookiecutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyfunc%2Fcookiecutter/lists"}