@bluedynamics/cdk8s-plone 0.1.4 → 0.1.6

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 (39) hide show
  1. package/.jsii +26 -7
  2. package/API.md +16 -0
  3. package/CLAUDE.md +352 -0
  4. package/README.md +55 -178
  5. package/documentation/Makefile +357 -0
  6. package/documentation/README.md +284 -0
  7. package/documentation/mx.ini +3 -0
  8. package/documentation/sources/_static/brand-theme.css +685 -0
  9. package/documentation/sources/_static/custom-icons.css +123 -0
  10. package/documentation/sources/_static/fonts/hack/Hack-Regular.woff2 +0 -0
  11. package/documentation/sources/_static/fonts/orbitron/Orbitron-Black.woff2 +11 -0
  12. package/documentation/sources/_static/fonts/orbitron/Orbitron-Bold.woff2 +11 -0
  13. package/documentation/sources/_static/fonts/orbitron/Orbitron-Regular.woff2 +0 -0
  14. package/documentation/sources/_static/fonts/rajdhani/Rajdhani-Bold.woff2 +11 -0
  15. package/documentation/sources/_static/fonts/rajdhani/Rajdhani-Medium.woff2 +11 -0
  16. package/documentation/sources/_static/fonts/rajdhani/Rajdhani-Regular.woff2 +11 -0
  17. package/documentation/sources/_static/fonts/rajdhani/Rajdhani-SemiBold.woff2 +11 -0
  18. package/documentation/sources/_static/kup6s-icon-explanation.svg +32 -0
  19. package/documentation/sources/_static/kup6s-icon-howto.svg +34 -0
  20. package/documentation/sources/_static/kup6s-icon-plone.svg +79 -0
  21. package/documentation/sources/_static/kup6s-icon-reference.svg +34 -0
  22. package/documentation/sources/_static/kup6s-icon-tutorials.svg +30 -0
  23. package/documentation/sources/_static/logo-fix.js +12 -0
  24. package/documentation/sources/conf.py +105 -0
  25. package/documentation/sources/explanation/architecture.md +311 -0
  26. package/documentation/sources/explanation/features.md +353 -0
  27. package/documentation/sources/explanation/index.md +51 -0
  28. package/documentation/sources/how-to/index.md +56 -0
  29. package/documentation/sources/how-to/setup-prerequisites.md +354 -0
  30. package/documentation/sources/index.md +108 -0
  31. package/documentation/sources/reference/api/.gitkeep +1 -0
  32. package/documentation/sources/reference/configuration-options.md +370 -0
  33. package/documentation/sources/reference/index.md +59 -0
  34. package/documentation/sources/tutorials/01-quick-start.md +157 -0
  35. package/documentation/sources/tutorials/index.md +48 -0
  36. package/lib/httpcache.d.ts +6 -0
  37. package/lib/httpcache.js +4 -2
  38. package/lib/plone.js +1 -1
  39. package/package.json +1 -1
package/.jsii CHANGED
@@ -108,7 +108,7 @@
108
108
  },
109
109
  "name": "@bluedynamics/cdk8s-plone",
110
110
  "readme": {
111
- "markdown": "# CDK8S Plone\n\nA CDK8S library for deploying Plone CMS to Kubernetes.\n\nThis library provides constructs to bootstrap a Plone deployment on a Kubernetes cluster using the [CDK8S](https://cdk8s.io) framework.\n\n## Features\n\n- **Backend**: Plone backend (API with `plone.volto` or Classic-UI)\n- **Frontend**: Plone Volto (modern React-based user interface)\n- **Varnish Caching**: Optional HTTP caching layer using [kube-httpcache](https://github.com/mittwald/kube-httpcache) with cluster-wide cache invalidation\n- **High Availability**: Configurable replicas with PodDisruptionBudgets\n- **Multi-language Support**: Published to npm (TypeScript/JavaScript) and PyPI (Python)\n\n\n## Installation\n\n### TypeScript/JavaScript\n\nCreate a new CDK8S project (or use an existing one):\n\n```bash\ncdk8s init typescript-app\n```\n\nInstall the library:\n\n```bash\nnpm install @bluedynamics/cdk8s-plone\n```\n\nPackage: [@bluedynamics/cdk8s-plone](https://www.npmjs.com/package/@bluedynamics/cdk8s-plone)\n\n### Python\n\nCreate a new CDK8S project:\n\n```bash\ncdk8s init python-app\n```\n\nInstall the library:\n\n```bash\npip install cdk8s-plone\n```\n\nPackage: [cdk8s-plone](https://pypi.org/project/cdk8s-plone/)\n\n\n## Quick Start\n\n### Basic Plone Deployment\n\n```typescript\nimport { App, Chart } from 'cdk8s';\nimport { Plone, PloneVariant } from '@bluedynamics/cdk8s-plone';\n\nconst app = new App();\nconst chart = new Chart(app, 'PloneDeployment');\n\nnew Plone(chart, 'my-plone', {\n variant: PloneVariant.VOLTO,\n backend: {\n image: 'plone/plone-backend:6.0.10',\n replicas: 3,\n },\n frontend: {\n image: 'plone/plone-frontend:16.0.0',\n replicas: 2,\n },\n});\n\napp.synth();\n```\n\n### With Varnish HTTP Cache\n\n```typescript\nimport { PloneHttpcache } from '@bluedynamics/cdk8s-plone';\n\nconst plone = new Plone(chart, 'my-plone', {\n variant: PloneVariant.VOLTO,\n backend: { image: 'plone/plone-backend:6.0.10' },\n frontend: { image: 'plone/plone-frontend:16.0.0' },\n});\n\nnew PloneHttpcache(chart, 'cache', {\n plone: plone,\n existingSecret: 'varnish-secret',\n replicas: 2,\n});\n```\n\n### Generate Kubernetes Manifests\n\n```bash\ncdk8s synth\n```\n\nThe manifests are stored in the `dist/` directory.\n\nFor a complete example, see the [example project](https://github.com/bluedynamics/cdk8s-plone-example).\n\n## Prerequisites\n\n- **kubectl** - Command-line tool for deploying Kubernetes manifests. [Install kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)\n- **Helm** (optional) - Only needed if generating Helm charts. [Install Helm](https://helm.sh/docs/intro/install/)\n- **Node.js** - For TypeScript/JavaScript development\n- **Python 3.8+** - For Python development\n\n\n## API Documentation\n\nFor complete API documentation, see [API.md](./API.md).\n\n### Key Constructs\n\n#### `Plone`\n\nMain construct for deploying Plone CMS. Supports two variants:\n- **VOLTO**: Modern React frontend with REST API backend (default)\n- **CLASSICUI**: Traditional server-side rendered Plone\n\nProperties:\n- `backendServiceName` - Name of the backend Kubernetes service\n- `frontendServiceName` - Name of the frontend service (VOLTO only)\n- `variant` - Deployment variant (VOLTO or CLASSICUI)\n- `siteId` - Plone site ID in ZODB (default: 'Plone')\n\n#### `PloneHttpcache`\n\nVarnish HTTP caching layer using the [kube-httpcache](https://github.com/mittwald/kube-httpcache) Helm chart.\n\nProperties:\n- `httpcacheServiceName` - Name of the Varnish service\n\n### Configuration Options\n\n#### `PloneOptions`\n\n- `version` - Version of your project\n- `siteId` - Plone site ID (default: 'Plone')\n- `variant` - PloneVariant.VOLTO or PloneVariant.CLASSICUI (default: VOLTO)\n- `backend` - Backend configuration (PloneBaseOptions)\n- `frontend` - Frontend configuration (PloneBaseOptions, required for VOLTO)\n- `imagePullSecrets` - Image pull secrets for private registries\n\n#### `PloneBaseOptions`\n\nConfiguration for backend or frontend:\n\n**Container:**\n- `image` - Container image (e.g., 'plone/plone-backend:6.0.10')\n- `imagePullPolicy` - Pull policy (default: 'IfNotPresent')\n- `replicas` - Number of replicas (default: 2)\n- `environment` - Environment variables (cdk8s-plus-30.Env)\n\n**Resources:**\n- `requestCpu` / `limitCpu` - CPU requests/limits\n- `requestMemory` / `limitMemory` - Memory requests/limits\n\n**High Availability:**\n- `minAvailable` - Min pods during updates (for PodDisruptionBudget)\n- `maxUnavailable` - Max unavailable pods during updates\n\n**Health Probes:**\n- `readinessEnabled` - Enable readiness probe (default: true)\n- `readinessInitialDelaySeconds` / `readinessTimeoutSeconds` / `readinessPeriodSeconds`\n- `readinessSuccessThreshold` / `readinessFailureThreshold`\n- `livenessEnabled` - Enable liveness probe (default: false, recommended true for frontend)\n- `livenessInitialDelaySeconds` / `livenessTimeoutSeconds` / `livenessPeriodSeconds`\n- `livenessSuccessThreshold` / `livenessFailureThreshold`\n\n**Annotations:**\n- `annotations` - Deployment metadata annotations\n- `podAnnotations` - Pod template annotations (e.g., for Prometheus)\n- `serviceAnnotations` - Service annotations (e.g., for external-dns)\n\n#### `PloneHttpcacheOptions`\n\n- `plone` - Plone construct to attach cache to (required)\n- `varnishVcl` - VCL configuration as string\n- `varnishVclFile` - Path to VCL configuration file\n- `existingSecret` - Kubernetes secret for Varnish admin credentials\n- `replicas` - Number of Varnish replicas (default: 2)\n- `requestCpu` / `limitCpu` - CPU resources\n- `requestMemory` / `limitMemory` - Memory resources\n- `servicemonitor` - Enable Prometheus ServiceMonitor (default: false)\n- `exporterEnabled` - Enable Prometheus exporter sidecar (default: true)\n- `chartVersion` - kube-httpcache Helm chart version (default: latest)\n\n\n## Development\n\nThis project uses [Projen](https://projen.io/) to manage project configuration. **Do not edit generated files directly.**\n\n### Setup\n\nClone the repository and install dependencies:\n\n```bash\nnvm use lts/*\ncorepack enable\nnpx projen\n```\n\n### Common Commands\n\n```bash\n# Run tests\nnpx projen test\n\n# Run tests in watch mode\nnpx projen test:watch\n\n# Build (compile TypeScript + generate JSII bindings)\nnpx projen build\n\n# Lint\nnpx projen eslint\n\n# Generate API documentation\nnpx projen docgen\n\n# Package for distribution\nnpx projen package-all\n```\n\n### Making Changes\n\n1. Edit `.projenrc.ts` for project configuration changes\n2. Run `npx projen` to regenerate project files\n3. Make code changes in `src/`\n4. Run tests and update snapshots if needed: `npx projen test -- -u`\n\n## References\n\n- [CDK8S Documentation](https://cdk8s.io/)\n- [Kubernetes Probes Documentation](https://kubernetes.io/docs/concepts/configuration/liveness-readiness-startup-probes/)\n- [kube-httpcache Helm Chart](https://github.com/mittwald/kube-httpcache)\n- [Example Project](https://github.com/bluedynamics/cdk8s-plone-example)\n\n## License\n\nSee [LICENSE](./LICENSE) file."
111
+ "markdown": "# CDK8S Plone\n\n> TypeScript and Python library for deploying Plone CMS to Kubernetes using CDK8S\n\n[![npm version](https://badge.fury.io/js/%40bluedynamics%2Fcdk8s-plone.svg)](https://www.npmjs.com/package/@bluedynamics/cdk8s-plone)\n[![PyPI version](https://badge.fury.io/py/cdk8s-plone.svg)](https://pypi.org/project/cdk8s-plone/)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n\n## Overview\n\ncdk8s-plone provides CDK8S constructs for deploying [Plone CMS](https://plone.org/) on Kubernetes. Define your infrastructure using TypeScript or Python and generate Kubernetes manifests automatically.\n\n**Key Features:**\n- 🚀 Supports Volto (modern React frontend) and Classic UI\n- 📦 High availability with configurable replicas\n- Optional Varnish HTTP caching layer\n- 🔧 Fine-grained resource and probe configuration\n- 🌍 Multi-language support (TypeScript/JavaScript and Python)\n- ✅ Type-safe infrastructure as code\n\n## Quick Start\n\n### Installation\n\n**TypeScript/JavaScript:**\n```bash\nnpm install @bluedynamics/cdk8s-plone\n```\n\n**Python:**\n```bash\npip install cdk8s-plone\n```\n\n### Basic Example\n\n```typescript\nimport { App, Chart } from 'cdk8s';\nimport { Plone, PloneVariant } from '@bluedynamics/cdk8s-plone';\n\nconst app = new App();\nconst chart = new Chart(app, 'PloneDeployment');\n\nnew Plone(chart, 'my-plone', {\n variant: PloneVariant.VOLTO,\n backend: {\n image: 'plone/plone-backend:6.1.3',\n replicas: 3,\n },\n frontend: {\n image: 'plone/plone-frontend:16.0.0',\n replicas: 2,\n },\n});\n\napp.synth();\n```\n\nGenerate Kubernetes manifests:\n```bash\ncdk8s synth\nkubectl apply -f dist/\n```\n\n## Documentation\n\n**📚 Full documentation:** https://bluedynamics.github.io/cdk8s-plone/\n\n- [Quick Start Tutorial](https://bluedynamics.github.io/cdk8s-plone/tutorials/01-quick-start.html)\n- [Configuration Reference](https://bluedynamics.github.io/cdk8s-plone/reference/configuration-options.html)\n- [Architecture Overview](https://bluedynamics.github.io/cdk8s-plone/explanation/architecture.html)\n- [Complete API Documentation](./API.md)\n\n## Examples\n\nSee the [cdk8s-plone-example](https://github.com/bluedynamics/cdk8s-plone-example) repository for complete working examples.\n\n## Requirements\n\n- **kubectl** - [Install kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)\n- **Node.js 16+** (for TypeScript/JavaScript) - [Install Node.js](https://nodejs.org/)\n- **Python 3.8+** (for Python) - [Install Python](https://www.python.org/)\n- **Kubernetes cluster** (local or cloud)\n\nFor detailed setup instructions, see [Setup Prerequisites](https://bluedynamics.github.io/cdk8s-plone/how-to/setup-prerequisites.html).\n\n## Development\n\nThis project uses [Projen](https://projen.io/) for project management.\n\n```bash\n# Install dependencies\nnpm install\n\n# Run tests\nnpm test\n\n# Build\nnpm run build\n\n# Update project configuration\n# Edit .projenrc.ts, then run:\nnpx projen\n```\n\nFor detailed development instructions, see [CONTRIBUTING.md](./CONTRIBUTING.md) (if available).\n\n## Resources\n\n- [CDK8S Documentation](https://cdk8s.io/)\n- [Plone CMS](https://plone.org/)\n- [kube-httpcache](https://github.com/mittwald/kube-httpcache) (for HTTP caching)\n- [Example Project](https://github.com/bluedynamics/cdk8s-plone-example)\n\n## License\n\n[Apache 2.0](LICENSE)\n\n## Maintainers\n\nMaintained by [Blue Dynamics Alliance](https://github.com/bluedynamics)\n\n**Author:** Jens W. Klein (jk@kleinundpartner.at)\n"
112
112
  },
113
113
  "repository": {
114
114
  "type": "git",
@@ -771,7 +771,7 @@
771
771
  },
772
772
  "locationInModule": {
773
773
  "filename": "src/httpcache.ts",
774
- "line": 113
774
+ "line": 120
775
775
  },
776
776
  "parameters": [
777
777
  {
@@ -797,7 +797,7 @@
797
797
  "kind": "class",
798
798
  "locationInModule": {
799
799
  "filename": "src/httpcache.ts",
800
- "line": 106
800
+ "line": 113
801
801
  },
802
802
  "name": "PloneHttpcache",
803
803
  "properties": [
@@ -810,7 +810,7 @@
810
810
  "immutable": true,
811
811
  "locationInModule": {
812
812
  "filename": "src/httpcache.ts",
813
- "line": 111
813
+ "line": 118
814
814
  },
815
815
  "name": "httpcacheServiceName",
816
816
  "type": {
@@ -852,6 +852,25 @@
852
852
  "fqn": "@bluedynamics/cdk8s-plone.Plone"
853
853
  }
854
854
  },
855
+ {
856
+ "abstract": true,
857
+ "docs": {
858
+ "default": "undefined (chartVersion = with each chart release there is an image release too )",
859
+ "remarks": "If not specified, the latest version from the repository will be used.",
860
+ "stability": "stable",
861
+ "summary": "Version of the kube-httpcache Container Image to use."
862
+ },
863
+ "immutable": true,
864
+ "locationInModule": {
865
+ "filename": "src/httpcache.ts",
866
+ "line": 88
867
+ },
868
+ "name": "appVersion",
869
+ "optional": true,
870
+ "type": {
871
+ "primitive": "string"
872
+ }
873
+ },
855
874
  {
856
875
  "abstract": true,
857
876
  "docs": {
@@ -955,7 +974,7 @@
955
974
  "immutable": true,
956
975
  "locationInModule": {
957
976
  "filename": "src/httpcache.ts",
958
- "line": 87
977
+ "line": 94
959
978
  },
960
979
  "name": "replicas",
961
980
  "optional": true,
@@ -1229,6 +1248,6 @@
1229
1248
  "symbolId": "src/plone:PloneVariant"
1230
1249
  }
1231
1250
  },
1232
- "version": "0.1.4",
1233
- "fingerprint": "hTVlbqlLeJ3QLMbm2blqTcPywb8qi1KzLxS48UE1NdM="
1251
+ "version": "0.1.6",
1252
+ "fingerprint": "depZZYpzfH8bEtxQEeVuqwlkPEPyCD3pZVw9TOCbtE8="
1234
1253
  }
package/API.md CHANGED
@@ -809,6 +809,7 @@ const ploneHttpcacheOptions: PloneHttpcacheOptions = { ... }
809
809
  | **Name** | **Type** | **Description** |
810
810
  | --- | --- | --- |
811
811
  | <code><a href="#@bluedynamics/cdk8s-plone.PloneHttpcacheOptions.property.plone">plone</a></code> | <code><a href="#@bluedynamics/cdk8s-plone.Plone">Plone</a></code> | The Plone construct to attach the HTTP cache to. |
812
+ | <code><a href="#@bluedynamics/cdk8s-plone.PloneHttpcacheOptions.property.appVersion">appVersion</a></code> | <code>string</code> | Version of the kube-httpcache Container Image to use. |
812
813
  | <code><a href="#@bluedynamics/cdk8s-plone.PloneHttpcacheOptions.property.chartVersion">chartVersion</a></code> | <code>string</code> | Version of the kube-httpcache Helm chart to use. |
813
814
  | <code><a href="#@bluedynamics/cdk8s-plone.PloneHttpcacheOptions.property.existingSecret">existingSecret</a></code> | <code>string</code> | Name of an existing Kubernetes secret containing Varnish admin credentials. |
814
815
  | <code><a href="#@bluedynamics/cdk8s-plone.PloneHttpcacheOptions.property.exporterEnabled">exporterEnabled</a></code> | <code>boolean</code> | Enable the Prometheus exporter for Varnish metrics. |
@@ -837,6 +838,21 @@ The cache will automatically connect to the backend and frontend services.
837
838
 
838
839
  ---
839
840
 
841
+ ##### `appVersion`<sup>Optional</sup> <a name="appVersion" id="@bluedynamics/cdk8s-plone.PloneHttpcacheOptions.property.appVersion"></a>
842
+
843
+ ```typescript
844
+ public readonly appVersion: string;
845
+ ```
846
+
847
+ - *Type:* string
848
+ - *Default:* undefined (chartVersion = with each chart release there is an image release too )
849
+
850
+ Version of the kube-httpcache Container Image to use.
851
+
852
+ If not specified, the latest version from the repository will be used.
853
+
854
+ ---
855
+
840
856
  ##### `chartVersion`<sup>Optional</sup> <a name="chartVersion" id="@bluedynamics/cdk8s-plone.PloneHttpcacheOptions.property.chartVersion"></a>
841
857
 
842
858
  ```typescript
package/CLAUDE.md ADDED
@@ -0,0 +1,352 @@
1
+ # Claude Code Project Guide
2
+
3
+ This document provides context and guidelines for Claude Code when working on this project.
4
+
5
+ ## Project Overview
6
+
7
+ **cdk8s-plone** is a TypeScript/Python library for deploying Plone CMS to Kubernetes using CDK8S constructs. It provides type-safe infrastructure as code with support for Volto (React frontend) and Classic UI deployments.
8
+
9
+ ## Git Workflow
10
+
11
+ **IMPORTANT: Never merge directly to `main`**
12
+
13
+ This project uses a Pull Request workflow:
14
+
15
+ 1. **Create a feature branch** from `main`:
16
+ ```bash
17
+ git checkout -b feature/description
18
+ # or
19
+ git checkout -b docs/description
20
+ # or
21
+ git checkout -b fix/description
22
+ ```
23
+
24
+ 2. **Make commits** on the feature branch with descriptive messages
25
+
26
+ 3. **Create a Pull Request** to merge into `main`:
27
+ - Use GitHub UI or `gh` CLI
28
+ - PRs are required for code review
29
+ - Never push directly to `main`
30
+ - Never merge locally to `main`
31
+
32
+ 4. **PR will be reviewed and merged** by maintainers
33
+
34
+ ### Branch Naming Conventions
35
+
36
+ - `feat/` or `feature/` - New features
37
+ - `fix/` - Bug fixes
38
+ - `docs/` - Documentation changes
39
+ - `chore/` - Maintenance tasks
40
+ - `refactor/` - Code refactoring
41
+ - `test/` - Test additions or changes
42
+
43
+ ## Working with Worktrees
44
+
45
+ **Recommended for parallel development and multi-instance work**
46
+
47
+ Git worktrees allow you to work on multiple branches simultaneously without switching contexts. This is especially useful when:
48
+ - Multiple Claude Code instances are working on different features
49
+ - You need to switch between features frequently
50
+ - You want to keep branches completely isolated
51
+
52
+ ### Setting Up Worktrees
53
+
54
+ **Create a worktree for each feature branch:**
55
+
56
+ ```bash
57
+ # From the main repository
58
+ git worktree add ../cdk8s-plone-feature-name feature/feature-name
59
+
60
+ # For existing branches
61
+ git worktree add ../cdk8s-plone-docs docs/diataxis-sphinx-skeleton
62
+
63
+ # For new branches
64
+ git worktree add -b feat/new-feature ../cdk8s-plone-new-feature
65
+ ```
66
+
67
+ **Directory structure with worktrees:**
68
+ ```
69
+ ~/ws/cdev/
70
+ ├── cdk8s-plone/ # Main repository (usually on main branch)
71
+ ├── cdk8s-plone-docs/ # Worktree for documentation work
72
+ ├── cdk8s-plone-frontend/ # Worktree for frontend features
73
+ └── cdk8s-plone-monitoring/ # Worktree for monitoring features
74
+ ```
75
+
76
+ ### Working with Worktrees
77
+
78
+ **List all worktrees:**
79
+ ```bash
80
+ git worktree list
81
+ ```
82
+
83
+ **Remove a worktree when done:**
84
+ ```bash
85
+ # Delete the worktree directory first
86
+ rm -rf ../cdk8s-plone-feature-name
87
+
88
+ # Then prune the worktree reference
89
+ git worktree prune
90
+ ```
91
+
92
+ **Switch between worktrees:**
93
+ ```bash
94
+ # Simply cd to the worktree directory
95
+ cd ../cdk8s-plone-docs
96
+
97
+ # Each worktree is an independent working directory
98
+ # with its own checked out branch
99
+ ```
100
+
101
+ ### Worktree Best Practices
102
+
103
+ 1. **One feature per worktree**: Keep each worktree focused on a single feature or task
104
+ 2. **Clean up after merge**: Remove worktrees once their branches are merged
105
+ 3. **Use descriptive directory names**: Name worktrees after their branch or feature
106
+ 4. **Regular git fetch**: Run `git fetch` in any worktree to update all branch references
107
+ 5. **Avoid nested worktrees**: Don't create worktrees inside other worktrees
108
+
109
+ ### Example Workflow with Worktrees
110
+
111
+ ```bash
112
+ # Setup: Create worktree for documentation work
113
+ cd ~/ws/cdev/cdk8s-plone
114
+ git worktree add -b docs/add-tutorial ../cdk8s-plone-docs
115
+
116
+ # Work: Make changes in the worktree
117
+ cd ../cdk8s-plone-docs
118
+ # ... make documentation changes ...
119
+ git add . && git commit -m "docs: add new tutorial"
120
+ git push -u origin docs/add-tutorial
121
+
122
+ # Create PR using gh CLI
123
+ gh pr create --title "Add new tutorial" --body "..."
124
+
125
+ # Cleanup: After PR is merged
126
+ cd ~/ws/cdev/cdk8s-plone
127
+ git fetch
128
+ git pull # Update main branch
129
+ rm -rf ../cdk8s-plone-docs
130
+ git worktree prune
131
+ ```
132
+
133
+ ### Benefits of Worktrees
134
+
135
+ - ✅ **No branch switching**: Keep different features in separate directories
136
+ - ✅ **Parallel work**: Multiple Claude instances can work independently
137
+ - ✅ **Clean state**: Each worktree maintains its own working directory state
138
+ - ✅ **Fast context switching**: Just `cd` between directories
139
+ - ✅ **No uncommitted changes conflicts**: Each worktree is isolated
140
+
141
+ ## Project Structure
142
+
143
+ ```
144
+ .
145
+ ├── src/ # TypeScript source code
146
+ │ ├── plone.ts # Main Plone construct
147
+ │ ├── service.ts # Service utilities
148
+ │ └── ...
149
+ ├── test/ # Jest tests
150
+ ├── documentation/ # Sphinx documentation (Diataxis framework)
151
+ │ ├── sources/ # Documentation source files
152
+ │ ├── Makefile # Build automation (mxmake)
153
+ │ └── README.md # Documentation contributor guide
154
+ ├── .projenrc.ts # Projen project configuration
155
+ ├── API.md # Auto-generated API documentation
156
+ └── README.md # Main project README
157
+ ```
158
+
159
+ ## Build System
160
+
161
+ This project uses **Projen** for project management.
162
+
163
+ **⚠️ DO NOT edit generated files directly**
164
+
165
+ Generated files include:
166
+ - `package.json`
167
+ - `tsconfig.json`
168
+ - `.gitignore`
169
+ - GitHub Actions workflows (except custom ones)
170
+ - And more...
171
+
172
+ ### Making Changes
173
+
174
+ 1. **Edit `.projenrc.ts`** for project configuration changes
175
+ 2. **Run `npx projen`** to regenerate files
176
+ 3. **Make code changes** in `src/`
177
+ 4. **Run tests**: `npx projen test`
178
+ 5. **Update snapshots if needed**: `npx projen test -- -u`
179
+
180
+ ### Common Commands
181
+
182
+ ```bash
183
+ # Install dependencies
184
+ npm install
185
+
186
+ # Run tests
187
+ npx projen test
188
+
189
+ # Run tests in watch mode
190
+ npx projen test:watch
191
+
192
+ # Build (compile + generate bindings)
193
+ npx projen build
194
+
195
+ # Lint
196
+ npx projen eslint
197
+
198
+ # Generate API docs
199
+ npx projen docgen
200
+
201
+ # Package for distribution
202
+ npx projen package-all
203
+
204
+ # Update project files after .projenrc.ts changes
205
+ npx projen
206
+ ```
207
+
208
+ ## Documentation
209
+
210
+ Documentation uses **Sphinx** with the **Diataxis framework**:
211
+
212
+ - **Tutorials**: Learning-oriented, step-by-step guides
213
+ - **How-To Guides**: Goal-oriented, problem-solving recipes
214
+ - **Reference**: Information-oriented, technical specifications
215
+ - **Explanation**: Understanding-oriented, concepts and design
216
+
217
+ ### Building Documentation
218
+
219
+ ```bash
220
+ cd documentation
221
+
222
+ # Build HTML
223
+ make docs
224
+
225
+ # Live-reload development server
226
+ make docs-live
227
+
228
+ # Clean and rebuild
229
+ make clean && make docs
230
+ ```
231
+
232
+ ### Documentation Deployment
233
+
234
+ - Documentation auto-deploys to GitHub Pages on push to `main`
235
+ - Workflow: `.github/workflows/documentation.yml`
236
+ - Published at: `https://bluedynamics.github.io/cdk8s-plone/`
237
+
238
+ ## Testing
239
+
240
+ - **Framework**: Jest
241
+ - **Test location**: `test/` directory
242
+ - **Snapshots**: Used for testing generated Kubernetes manifests
243
+ - **Update snapshots**: `npx projen test -- -u`
244
+
245
+ ## Multi-Language Support
246
+
247
+ The library is published in multiple languages via JSII:
248
+
249
+ - **TypeScript/JavaScript**: `@bluedynamics/cdk8s-plone` on npm
250
+ - **Python**: `cdk8s-plone` on PyPI
251
+
252
+ JSII configuration is in `package.json` under the `jsii` field.
253
+
254
+ ## Code Style
255
+
256
+ - **Linter**: ESLint with TypeScript support
257
+ - **Style**: Configured via `.projenrc.ts`
258
+ - **Run linter**: `npx projen eslint`
259
+
260
+ ## Commit Messages
261
+
262
+ Follow conventional commit format:
263
+
264
+ ```
265
+ <type>(<scope>): <subject>
266
+
267
+ <body>
268
+
269
+ <footer>
270
+ ```
271
+
272
+ **Types:**
273
+ - `feat`: New feature
274
+ - `fix`: Bug fix
275
+ - `docs`: Documentation changes
276
+ - `chore`: Maintenance tasks
277
+ - `refactor`: Code refactoring
278
+ - `test`: Test additions or changes
279
+ - `ci`: CI/CD changes
280
+
281
+ **Example:**
282
+ ```
283
+ feat(plone): add support for custom environment variables
284
+
285
+ Allow passing custom environment variables to backend and frontend
286
+ containers using the cdk8s-plus-30 Env API.
287
+
288
+ Closes #123
289
+ ```
290
+
291
+ All commits from Claude Code include:
292
+ ```
293
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
294
+
295
+ Co-Authored-By: Claude <noreply@anthropic.com>
296
+ ```
297
+
298
+ ## CI/CD
299
+
300
+ GitHub Actions workflows:
301
+
302
+ - **build.yml**: Build, test, and package
303
+ - **release.yml**: Create releases and publish to npm/PyPI
304
+ - **upgrade-main.yml**: Dependency upgrades
305
+ - **pull-request-lint.yml**: PR validation
306
+ - **documentation.yml**: Build and deploy docs to GitHub Pages
307
+
308
+ ## Dependencies
309
+
310
+ ### Runtime Dependencies
311
+
312
+ - `cdk8s` - CDK8S framework
313
+ - `cdk8s-plus-30` - CDK8S plus constructs
314
+ - `constructs` - Construct base classes
315
+
316
+ ### Development Dependencies
317
+
318
+ - `projen` - Project management
319
+ - `jsii` - Multi-language support
320
+ - `jest` - Testing
321
+ - `typescript` - Language
322
+ - `eslint` - Linting
323
+
324
+ ## Publishing
325
+
326
+ **Do not manually publish packages**
327
+
328
+ Publishing is automated via GitHub Actions on release:
329
+ 1. Create and push a git tag (via `npx projen release`)
330
+ 2. GitHub Actions builds and publishes to npm and PyPI
331
+ 3. Release notes are auto-generated
332
+
333
+ ## Important Notes
334
+
335
+ - **Never merge to main**: Always create PRs
336
+ - **Don't edit generated files**: Use `.projenrc.ts` and run `npx projen`
337
+ - **Update snapshots after changes**: Run `npx projen test -- -u`
338
+ - **Follow Diataxis**: When adding docs, use the correct category
339
+ - **Documentation builds required**: Run `make docs` to verify doc changes
340
+
341
+ ## Resources
342
+
343
+ - [CDK8S Documentation](https://cdk8s.io/)
344
+ - [Projen Documentation](https://projen.io/)
345
+ - [Diataxis Framework](https://diataxis.fr/)
346
+ - [JSII Documentation](https://aws.github.io/jsii/)
347
+ - [Example Project](https://github.com/bluedynamics/cdk8s-plone-example)
348
+
349
+ ## Maintainer Contact
350
+
351
+ **Author:** Jens W. Klein (jk@kleinundpartner.at)
352
+ **Organization:** [Blue Dynamics Alliance](https://github.com/bluedynamics)