pactown 0.1.5__tar.gz → 0.1.16__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. {pactown-0.1.5 → pactown-0.1.16}/.bumpversion.cfg +1 -1
  2. pactown-0.1.16/CHANGELOG.md +36 -0
  3. {pactown-0.1.5 → pactown-0.1.16}/Makefile +23 -5
  4. {pactown-0.1.5 → pactown-0.1.16}/PKG-INFO +61 -9
  5. {pactown-0.1.5 → pactown-0.1.16}/README.md +60 -8
  6. pactown-0.1.16/TODO.md +38 -0
  7. pactown-0.1.16/docs/CLOUDFLARE_WORKERS_COMPARISON.md +336 -0
  8. {pactown-0.1.5 → pactown-0.1.16}/docs/CONFIGURATION.md +2 -1
  9. {pactown-0.1.5 → pactown-0.1.16}/docs/DEPLOYMENT.md +2 -1
  10. pactown-0.1.16/docs/FAST_START.md +322 -0
  11. {pactown-0.1.5 → pactown-0.1.16}/docs/GENERATOR.md +13 -16
  12. pactown-0.1.16/docs/LOGGING.md +346 -0
  13. {pactown-0.1.5 → pactown-0.1.16}/docs/QUADLET.md +12 -0
  14. pactown-0.1.16/docs/SECURITY.md +244 -0
  15. pactown-0.1.16/docs/SECURITY_POLICY.md +310 -0
  16. pactown-0.1.16/docs/USER_ISOLATION.md +390 -0
  17. pactown-0.1.16/examples/api-gateway-webhooks/README.md +391 -0
  18. pactown-0.1.16/examples/email-llm-responder/README.md +398 -0
  19. {pactown-0.1.5 → pactown-0.1.16}/examples/microservices/services/go-gateway/README.md +1 -0
  20. {pactown-0.1.5 → pactown-0.1.16}/examples/microservices/services/python-ml/README.md +1 -0
  21. pactown-0.1.16/examples/realtime-notifications/README.md +372 -0
  22. {pactown-0.1.5 → pactown-0.1.16}/examples/saas-platform/services/api/README.md +1 -0
  23. {pactown-0.1.5 → pactown-0.1.16}/examples/saas-platform/services/cli/README.md +4 -4
  24. {pactown-0.1.5 → pactown-0.1.16}/examples/saas-platform/services/database/README.md +2 -0
  25. {pactown-0.1.5 → pactown-0.1.16}/examples/saas-platform/services/gateway/README.md +4 -4
  26. {pactown-0.1.5 → pactown-0.1.16}/examples/saas-platform/services/web/README.md +4 -4
  27. pactown-0.1.16/project.functions.toon +567 -0
  28. {pactown-0.1.5 → pactown-0.1.16}/project.toon +123 -34
  29. {pactown-0.1.5 → pactown-0.1.16}/pyproject.toml +1 -1
  30. pactown-0.1.16/src/pactown/__init__.py +91 -0
  31. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/cli.py +80 -80
  32. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/config.py +12 -11
  33. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/deploy/base.py +34 -32
  34. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/deploy/compose.py +59 -58
  35. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/deploy/docker.py +40 -41
  36. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/deploy/kubernetes.py +43 -42
  37. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/deploy/podman.py +55 -56
  38. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/deploy/quadlet.py +369 -108
  39. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/deploy/quadlet_api.py +66 -70
  40. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/deploy/quadlet_shell.py +111 -116
  41. pactown-0.1.16/src/pactown/fast_start.py +514 -0
  42. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/generator.py +30 -29
  43. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/markpact_blocks.py +1 -2
  44. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/network.py +34 -35
  45. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/orchestrator.py +90 -93
  46. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/parallel.py +40 -40
  47. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/registry/client.py +45 -46
  48. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/registry/models.py +25 -25
  49. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/registry/server.py +24 -24
  50. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/resolver.py +30 -30
  51. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/sandbox_manager.py +224 -75
  52. pactown-0.1.16/src/pactown/security.py +682 -0
  53. pactown-0.1.16/src/pactown/service_runner.py +1106 -0
  54. pactown-0.1.16/src/pactown/user_isolation.py +356 -0
  55. {pactown-0.1.5 → pactown-0.1.16}/tests/test_config.py +4 -5
  56. pactown-0.1.16/tests/test_markpact_blocks.py +51 -0
  57. {pactown-0.1.5 → pactown-0.1.16}/tests/test_network.py +22 -24
  58. {pactown-0.1.5 → pactown-0.1.16}/tests/test_parallel.py +25 -28
  59. pactown-0.1.16/tests/test_quadlet_security.py +690 -0
  60. {pactown-0.1.5 → pactown-0.1.16}/tests/test_registry.py +18 -21
  61. {pactown-0.1.5 → pactown-0.1.16}/tests/test_resolver.py +11 -11
  62. pactown-0.1.5/TODO.md +0 -5
  63. pactown-0.1.5/examples/quadlet-vps/sample.container +0 -44
  64. pactown-0.1.5/project.functions.toon +0 -364
  65. pactown-0.1.5/src/pactown/__init__.py +0 -23
  66. {pactown-0.1.5 → pactown-0.1.16}/.gitignore +0 -0
  67. {pactown-0.1.5 → pactown-0.1.16}/LICENSE +0 -0
  68. {pactown-0.1.5 → pactown-0.1.16}/docs/NETWORK.md +0 -0
  69. {pactown-0.1.5 → pactown-0.1.16}/docs/SPECIFICATION.md +0 -0
  70. {pactown-0.1.5 → pactown-0.1.16}/examples/microservices/README.md +0 -0
  71. {pactown-0.1.5 → pactown-0.1.16}/examples/microservices/saas.pactown.yaml +0 -0
  72. {pactown-0.1.5 → pactown-0.1.16}/examples/microservices/services/node-api/README.md +0 -0
  73. {pactown-0.1.5 → pactown-0.1.16}/examples/quadlet-vps/README.md +0 -0
  74. {pactown-0.1.5 → pactown-0.1.16}/examples/saas-platform/README.md +0 -0
  75. {pactown-0.1.5 → pactown-0.1.16}/examples/saas-platform/saas.pactown.yaml +0 -0
  76. {pactown-0.1.5 → pactown-0.1.16}/examples.md +0 -0
  77. {pactown-0.1.5 → pactown-0.1.16}/img.png +0 -0
  78. {pactown-0.1.5 → pactown-0.1.16}/project.sh +0 -0
  79. {pactown-0.1.5 → pactown-0.1.16}/project.toon-schema.json +0 -0
  80. {pactown-0.1.5 → pactown-0.1.16}/saas.pactown.yaml +0 -0
  81. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/deploy/__init__.py +3 -3
  82. {pactown-0.1.5 → pactown-0.1.16}/src/pactown/registry/__init__.py +1 -1
  83. {pactown-0.1.5 → pactown-0.1.16}/tests/__init__.py +0 -0
  84. {pactown-0.1.5 → pactown-0.1.16}/tests/test_deploy_dockerfile.py +0 -0
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 0.1.5
2
+ current_version = 0.1.16
3
3
  commit = False
4
4
  tag = False
5
5
 
@@ -0,0 +1,36 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ - Podman Quadlet deployment backend (`pactown.deploy.quadlet`) with templates, backend operations, and Traefik integration.
13
+ - Interactive Quadlet shell (`pactown quadlet shell`).
14
+ - Quadlet REST API (`pactown quadlet api`) and entrypoint `pactown-quadlet-api`.
15
+ - Security hardening and injection test suite (`tests/test_quadlet_security.py`).
16
+ - Quadlet security guide (`docs/SECURITY.md`).
17
+ - Cloudflare Workers comparison (`docs/CLOUDFLARE_WORKERS_COMPARISON.md`).
18
+ - Practical Quadlet examples in `examples/*` where the user edits only `README.md` (embedded code blocks) and deployment artifacts are generated into `./sandbox`.
19
+
20
+ ### Changed
21
+
22
+ - Dockerfile Python healthcheck now uses `MARKPACT_PORT` with fallback to `PORT` to maintain compatibility.
23
+ - Registry timestamps use timezone-aware datetimes (`datetime.now(timezone.utc)`) to avoid Python 3.13 deprecations.
24
+ - Makefile:
25
+ - Prefers project venv python if present.
26
+ - `lint`/`format` fall back to `pipx run ruff` when ruff is not installed in the interpreter.
27
+ - `test` explicitly loads `pytest_asyncio.plugin` to work with `PYTEST_DISABLE_PLUGIN_AUTOLOAD=1`.
28
+
29
+ ### Fixed
30
+
31
+ - Multiple Quadlet injection vectors (container name, env var, volume, Traefik label, systemd unit) mitigated via input sanitization.
32
+ - Ruff lint issues across `src/` and `tests/`.
33
+
34
+ ## [0.1.5]
35
+
36
+ - Initial public version.
@@ -1,6 +1,6 @@
1
1
  .PHONY: help install dev test test-cov lint format build clean registry up down status examples check-pypi-deps publish-pypi bump-patch bump-minor bump-major release
2
2
 
3
- PYTHON ?= python3
3
+ PYTHON ?= $(shell if [ -x ./venv/bin/python3 ]; then echo ./venv/bin/python3; elif [ -x ./.venv/bin/python3 ]; then echo ./.venv/bin/python3; else echo python3; fi)
4
4
  CONFIG ?= saas.pactown.yaml
5
5
  README ?= README.md
6
6
  SANDBOX ?= ./sandbox
@@ -22,16 +22,34 @@ dev: ## Install dev dependencies
22
22
  $(PYTHON) -m pip install -e ".[dev]"
23
23
 
24
24
  test: ## Run tests
25
- PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTHONPATH=src $(PYTHON) -m pytest tests/ -v
25
+ PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTHONPATH=src $(PYTHON) -m pytest -p pytest_asyncio.plugin tests/ -v
26
26
 
27
27
  test-cov: ## Run tests with coverage
28
- PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTHONPATH=src $(PYTHON) -m pytest tests/ -v --cov=src/pactown --cov-report=term-missing
28
+ PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTHONPATH=src $(PYTHON) -m pytest -p pytest_asyncio.plugin tests/ -v --cov=src/pactown --cov-report=term-missing
29
29
 
30
30
  lint: ## Run linter
31
- $(PYTHON) -m ruff check src/ tests/
31
+ @if $(PYTHON) -c "import ruff" >/dev/null 2>&1; then \
32
+ $(PYTHON) -m ruff check src/ tests/; \
33
+ elif command -v ruff >/dev/null 2>&1; then \
34
+ ruff check src/ tests/; \
35
+ elif command -v pipx >/dev/null 2>&1; then \
36
+ pipx run ruff check src/ tests/; \
37
+ else \
38
+ echo "Missing dependency: ruff. Run: make dev (or install via pipx)."; \
39
+ exit 1; \
40
+ fi
32
41
 
33
42
  format: ## Format code
34
- $(PYTHON) -m ruff format src/ tests/
43
+ @if $(PYTHON) -c "import ruff" >/dev/null 2>&1; then \
44
+ $(PYTHON) -m ruff format src/ tests/; \
45
+ elif command -v ruff >/dev/null 2>&1; then \
46
+ ruff format src/ tests/; \
47
+ elif command -v pipx >/dev/null 2>&1; then \
48
+ pipx run ruff format src/ tests/; \
49
+ else \
50
+ echo "Missing dependency: ruff. Run: make dev (or install via pipx)."; \
51
+ exit 1; \
52
+ fi
35
53
 
36
54
  build: clean ## Build package
37
55
  @$(PYTHON) -c "import build" >/dev/null 2>&1 || (echo "Missing dependency: build. Run: $(PYTHON) -m pip install -e \".[dev]\" (or: $(PYTHON) -m pip install build)" && exit 1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pactown
3
- Version: 0.1.5
3
+ Version: 0.1.16
4
4
  Summary: Decentralized Service Ecosystem Orchestrator - Build interconnected microservices from Markdown using markpact
5
5
  Project-URL: Homepage, https://github.com/wronai/pactown
6
6
  Project-URL: Repository, https://github.com/wronai/pactown
@@ -74,6 +74,7 @@ Pactown enables you to compose multiple independent markpact projects into a uni
74
74
 
75
75
  ## Key Features
76
76
 
77
+ ### Core Features
77
78
  - **🔗 Service Composition** – Combine multiple markpact READMEs into one ecosystem
78
79
  - **📦 Local Registry** – Store and share markpact artifacts across projects
79
80
  - **🔄 Dependency Resolution** – Automatic startup order based on service dependencies
@@ -84,14 +85,43 @@ Pactown enables you to compose multiple independent markpact projects into a uni
84
85
  - **🔍 Service Discovery** – Name-based service lookup, no hardcoded URLs
85
86
  - **⚡ Config Generator** – Auto-generate config from folder of READMEs
86
87
 
87
- ## Documentation
88
+ ### New in v0.4.0
89
+ - **⚡ Fast Start** – Dependency caching for millisecond startup times ([docs](docs/FAST_START.md))
90
+ - **🛡️ Security Policy** – Rate limiting, user profiles, anomaly logging ([docs](docs/SECURITY_POLICY.md))
91
+ - **👤 User Isolation** – Linux user-based sandbox isolation for multi-tenant SaaS ([docs](docs/USER_ISOLATION.md))
92
+ - **📊 Detailed Logging** – Structured logs with error capture ([docs](docs/LOGGING.md))
93
+
94
+ ---
95
+
96
+ ## 📚 Documentation
97
+
98
+ ### Quick Navigation
99
+
100
+ | Category | Documents |
101
+ |----------|-----------|
102
+ | **Getting Started** | [Quick Start](#quick-start) · [Installation](#installation) · [Commands](#commands) |
103
+ | **Core Concepts** | [Specification](docs/SPECIFICATION.md) · [Configuration](docs/CONFIGURATION.md) · [Network](docs/NETWORK.md) |
104
+ | **Deployment** | [Deployment Guide](docs/DEPLOYMENT.md) · [Quadlet/VPS](docs/QUADLET.md) · [Generator](docs/GENERATOR.md) |
105
+ | **Security** | [Security Policy](docs/SECURITY_POLICY.md) · [Quadlet Security](docs/SECURITY.md) · [User Isolation](docs/USER_ISOLATION.md) |
106
+ | **Performance** | [Fast Start](docs/FAST_START.md) · [Logging](docs/LOGGING.md) |
107
+ | **Comparisons** | [vs Cloudflare Workers](docs/CLOUDFLARE_WORKERS_COMPARISON.md) |
108
+
109
+ ### All Documentation
88
110
 
89
111
  | Document | Description |
90
112
  |----------|-------------|
91
113
  | [Specification](docs/SPECIFICATION.md) | Architecture and design |
92
114
  | [Configuration](docs/CONFIGURATION.md) | YAML config reference |
115
+ | [Deployment](docs/DEPLOYMENT.md) | Production deployment guide (Compose/Kubernetes/Quadlet) |
93
116
  | [Network](docs/NETWORK.md) | Dynamic ports & service discovery |
94
117
  | [Generator](docs/GENERATOR.md) | Auto-generate configs |
118
+ | [Quadlet](docs/QUADLET.md) | Podman Quadlet deployment for VPS production |
119
+ | [Security](docs/SECURITY.md) | Quadlet security hardening and injection test suite |
120
+ | [Security Policy](docs/SECURITY_POLICY.md) | Rate limiting, user profiles, resource monitoring |
121
+ | [Fast Start](docs/FAST_START.md) | Dependency caching for fast startup |
122
+ | [User Isolation](docs/USER_ISOLATION.md) | Linux user-based sandbox isolation |
123
+ | [Logging](docs/LOGGING.md) | Structured logging and error capture |
124
+ | [Cloudflare Workers comparison](docs/CLOUDFLARE_WORKERS_COMPARISON.md) | When to use Pactown vs Cloudflare Workers |
95
125
 
96
126
  ### Source Code Reference
97
127
 
@@ -102,7 +132,29 @@ Pactown enables you to compose multiple independent markpact projects into a uni
102
132
  | [`resolver.py`](src/pactown/resolver.py) | Dependency resolution |
103
133
  | [`network.py`](src/pactown/network.py) | Port allocation & discovery |
104
134
  | [`generator.py`](src/pactown/generator.py) | Config file generator |
135
+ | [`service_runner.py`](src/pactown/service_runner.py) | High-level service runner API |
136
+ | [`security.py`](src/pactown/security.py) | Security policy & rate limiting |
137
+ | [`fast_start.py`](src/pactown/fast_start.py) | Dependency caching & fast startup |
138
+ | [`user_isolation.py`](src/pactown/user_isolation.py) | Linux user isolation for multi-tenant |
139
+ | [`sandbox_manager.py`](src/pactown/sandbox_manager.py) | Sandbox lifecycle management |
105
140
  | [`registry/`](src/pactown/registry/) | Local artifact registry |
141
+ | [`deploy/`](src/pactown/deploy/) | Deployment backends (Docker, Podman, K8s, Quadlet) |
142
+
143
+ ---
144
+
145
+ ## 🎯 Examples
146
+
147
+ | Example | What it shows |
148
+ |---------|---------------|
149
+ | [`examples/saas-platform/`](examples/saas-platform/) | Complete SaaS with Web + API + Database + Gateway |
150
+ | [`examples/quadlet-vps/`](examples/quadlet-vps/) | VPS setup and Quadlet workflow |
151
+ | [`examples/email-llm-responder/`](examples/email-llm-responder/) | Email automation with LLM integration |
152
+ | [`examples/api-gateway-webhooks/`](examples/api-gateway-webhooks/) | API gateway / webhook handler |
153
+ | [`examples/realtime-notifications/`](examples/realtime-notifications/) | WebSocket + SSE real-time notifications |
154
+ | [`examples/microservices/`](examples/microservices/) | Multi-language microservices |
155
+ | [`examples/fast-start-demo/`](examples/fast-start-demo/) | **NEW:** Fast startup with dependency caching |
156
+ | [`examples/security-policy/`](examples/security-policy/) | **NEW:** Rate limiting and user profiles |
157
+ | [`examples/user-isolation/`](examples/user-isolation/) | **NEW:** Multi-tenant user isolation |
106
158
 
107
159
  ## Installation
108
160
 
@@ -145,31 +197,31 @@ services:
145
197
 
146
198
  Each service is a standard markpact README:
147
199
 
148
- ```markdown
200
+ ````markdown
149
201
  # API Service
150
202
 
151
203
  REST API for the application.
152
204
 
153
205
  ---
154
206
 
155
- \`\`\`markpact:deps python
207
+ ```python markpact:deps
156
208
  fastapi
157
209
  uvicorn
158
- \`\`\`
210
+ ```
159
211
 
160
- \`\`\`markpact:file python path=main.py
212
+ ```python markpact:file path=main.py
161
213
  from fastapi import FastAPI
162
214
  app = FastAPI()
163
215
 
164
216
  @app.get("/health")
165
217
  def health():
166
218
  return {"status": "ok"}
167
- \`\`\`
219
+ ```
168
220
 
169
- \`\`\`markpact:run python
221
+ ```bash markpact:run
170
222
  uvicorn main:app --port ${MARKPACT_PORT:-8001}
171
- \`\`\`
172
223
  ```
224
+ ````
173
225
 
174
226
  ### 3. Start the ecosystem
175
227
 
@@ -32,6 +32,7 @@ Pactown enables you to compose multiple independent markpact projects into a uni
32
32
 
33
33
  ## Key Features
34
34
 
35
+ ### Core Features
35
36
  - **🔗 Service Composition** – Combine multiple markpact READMEs into one ecosystem
36
37
  - **📦 Local Registry** – Store and share markpact artifacts across projects
37
38
  - **🔄 Dependency Resolution** – Automatic startup order based on service dependencies
@@ -42,14 +43,43 @@ Pactown enables you to compose multiple independent markpact projects into a uni
42
43
  - **🔍 Service Discovery** – Name-based service lookup, no hardcoded URLs
43
44
  - **⚡ Config Generator** – Auto-generate config from folder of READMEs
44
45
 
45
- ## Documentation
46
+ ### New in v0.4.0
47
+ - **⚡ Fast Start** – Dependency caching for millisecond startup times ([docs](docs/FAST_START.md))
48
+ - **🛡️ Security Policy** – Rate limiting, user profiles, anomaly logging ([docs](docs/SECURITY_POLICY.md))
49
+ - **👤 User Isolation** – Linux user-based sandbox isolation for multi-tenant SaaS ([docs](docs/USER_ISOLATION.md))
50
+ - **📊 Detailed Logging** – Structured logs with error capture ([docs](docs/LOGGING.md))
51
+
52
+ ---
53
+
54
+ ## 📚 Documentation
55
+
56
+ ### Quick Navigation
57
+
58
+ | Category | Documents |
59
+ |----------|-----------|
60
+ | **Getting Started** | [Quick Start](#quick-start) · [Installation](#installation) · [Commands](#commands) |
61
+ | **Core Concepts** | [Specification](docs/SPECIFICATION.md) · [Configuration](docs/CONFIGURATION.md) · [Network](docs/NETWORK.md) |
62
+ | **Deployment** | [Deployment Guide](docs/DEPLOYMENT.md) · [Quadlet/VPS](docs/QUADLET.md) · [Generator](docs/GENERATOR.md) |
63
+ | **Security** | [Security Policy](docs/SECURITY_POLICY.md) · [Quadlet Security](docs/SECURITY.md) · [User Isolation](docs/USER_ISOLATION.md) |
64
+ | **Performance** | [Fast Start](docs/FAST_START.md) · [Logging](docs/LOGGING.md) |
65
+ | **Comparisons** | [vs Cloudflare Workers](docs/CLOUDFLARE_WORKERS_COMPARISON.md) |
66
+
67
+ ### All Documentation
46
68
 
47
69
  | Document | Description |
48
70
  |----------|-------------|
49
71
  | [Specification](docs/SPECIFICATION.md) | Architecture and design |
50
72
  | [Configuration](docs/CONFIGURATION.md) | YAML config reference |
73
+ | [Deployment](docs/DEPLOYMENT.md) | Production deployment guide (Compose/Kubernetes/Quadlet) |
51
74
  | [Network](docs/NETWORK.md) | Dynamic ports & service discovery |
52
75
  | [Generator](docs/GENERATOR.md) | Auto-generate configs |
76
+ | [Quadlet](docs/QUADLET.md) | Podman Quadlet deployment for VPS production |
77
+ | [Security](docs/SECURITY.md) | Quadlet security hardening and injection test suite |
78
+ | [Security Policy](docs/SECURITY_POLICY.md) | Rate limiting, user profiles, resource monitoring |
79
+ | [Fast Start](docs/FAST_START.md) | Dependency caching for fast startup |
80
+ | [User Isolation](docs/USER_ISOLATION.md) | Linux user-based sandbox isolation |
81
+ | [Logging](docs/LOGGING.md) | Structured logging and error capture |
82
+ | [Cloudflare Workers comparison](docs/CLOUDFLARE_WORKERS_COMPARISON.md) | When to use Pactown vs Cloudflare Workers |
53
83
 
54
84
  ### Source Code Reference
55
85
 
@@ -60,7 +90,29 @@ Pactown enables you to compose multiple independent markpact projects into a uni
60
90
  | [`resolver.py`](src/pactown/resolver.py) | Dependency resolution |
61
91
  | [`network.py`](src/pactown/network.py) | Port allocation & discovery |
62
92
  | [`generator.py`](src/pactown/generator.py) | Config file generator |
93
+ | [`service_runner.py`](src/pactown/service_runner.py) | High-level service runner API |
94
+ | [`security.py`](src/pactown/security.py) | Security policy & rate limiting |
95
+ | [`fast_start.py`](src/pactown/fast_start.py) | Dependency caching & fast startup |
96
+ | [`user_isolation.py`](src/pactown/user_isolation.py) | Linux user isolation for multi-tenant |
97
+ | [`sandbox_manager.py`](src/pactown/sandbox_manager.py) | Sandbox lifecycle management |
63
98
  | [`registry/`](src/pactown/registry/) | Local artifact registry |
99
+ | [`deploy/`](src/pactown/deploy/) | Deployment backends (Docker, Podman, K8s, Quadlet) |
100
+
101
+ ---
102
+
103
+ ## 🎯 Examples
104
+
105
+ | Example | What it shows |
106
+ |---------|---------------|
107
+ | [`examples/saas-platform/`](examples/saas-platform/) | Complete SaaS with Web + API + Database + Gateway |
108
+ | [`examples/quadlet-vps/`](examples/quadlet-vps/) | VPS setup and Quadlet workflow |
109
+ | [`examples/email-llm-responder/`](examples/email-llm-responder/) | Email automation with LLM integration |
110
+ | [`examples/api-gateway-webhooks/`](examples/api-gateway-webhooks/) | API gateway / webhook handler |
111
+ | [`examples/realtime-notifications/`](examples/realtime-notifications/) | WebSocket + SSE real-time notifications |
112
+ | [`examples/microservices/`](examples/microservices/) | Multi-language microservices |
113
+ | [`examples/fast-start-demo/`](examples/fast-start-demo/) | **NEW:** Fast startup with dependency caching |
114
+ | [`examples/security-policy/`](examples/security-policy/) | **NEW:** Rate limiting and user profiles |
115
+ | [`examples/user-isolation/`](examples/user-isolation/) | **NEW:** Multi-tenant user isolation |
64
116
 
65
117
  ## Installation
66
118
 
@@ -103,31 +155,31 @@ services:
103
155
 
104
156
  Each service is a standard markpact README:
105
157
 
106
- ```markdown
158
+ ````markdown
107
159
  # API Service
108
160
 
109
161
  REST API for the application.
110
162
 
111
163
  ---
112
164
 
113
- \`\`\`markpact:deps python
165
+ ```python markpact:deps
114
166
  fastapi
115
167
  uvicorn
116
- \`\`\`
168
+ ```
117
169
 
118
- \`\`\`markpact:file python path=main.py
170
+ ```python markpact:file path=main.py
119
171
  from fastapi import FastAPI
120
172
  app = FastAPI()
121
173
 
122
174
  @app.get("/health")
123
175
  def health():
124
176
  return {"status": "ok"}
125
- \`\`\`
177
+ ```
126
178
 
127
- \`\`\`markpact:run python
179
+ ```bash markpact:run
128
180
  uvicorn main:app --port ${MARKPACT_PORT:-8001}
129
- \`\`\`
130
181
  ```
182
+ ````
131
183
 
132
184
  ### 3. Start the ecosystem
133
185
 
pactown-0.1.16/TODO.md ADDED
@@ -0,0 +1,38 @@
1
+ # TODO
2
+
3
+ ## Status (done)
4
+
5
+ - Pactown jako paczka Python (`pyproject.toml`, CLI, Makefile).
6
+ - Orchestrator (sandboxes), dependency resolution, registry + API.
7
+ - Podman Quadlet deployment:
8
+ - `pactown quadlet init / deploy / list / logs / shell / api`
9
+ - Traefik + TLS (Let's Encrypt)
10
+ - Security hardening:
11
+ - input sanitization w generatorze Quadlet
12
+ - test suite: `tests/test_quadlet_security.py`
13
+ - dokument: `docs/SECURITY.md`
14
+ - Przykłady Quadlet w `examples/*`:
15
+ - user edytuje tylko `README.md` (kod w markdown)
16
+ - reszta plików do uruchomienia jest generowana do `./sandbox`
17
+
18
+ ## Next steps
19
+
20
+ ### Quadlet / Sandbox generation
21
+
22
+ - Zintegrować generowanie `./sandbox` z README (code blocks `main.py`, `routes.yaml`, `requirements.txt`) bezpośrednio w flow `pactown quadlet deploy`.
23
+ - Dodać walidację, że README zawiera minimalny zestaw blocków wymaganych do uruchomienia.
24
+ - Dodać tryb `pactown quadlet generate --sandbox ./sandbox` (bez deployu) do łatwego review.
25
+
26
+ ### Security (runtime)
27
+
28
+ - Dodać runtime-hardening checklist: SELinux/AppArmor, firewall, limits per tenant.
29
+ - Rozważyć blokowanie dodatkowych mountów (symlinki, `:Z`, `:suid`, itp.) oraz logowanie prób.
30
+
31
+ ### Docs
32
+
33
+ - Uporządkować przewodnik: `docs/QUADLET.md` + `docs/SECURITY.md` + porównanie z CF.
34
+ - Dodać krótkie “quick examples” jak odpalić 3 przykłady na VPS.
35
+
36
+ ### Packaging
37
+
38
+ - Ustalić docelowy flow dla `make dev` i `make lint` (czy zawsze venv, czy pipx fallback).