diff --git a/JOURNAL.md b/JOURNAL.md index 79e1ec4..ce5479b 100644 --- a/JOURNAL.md +++ b/JOURNAL.md @@ -678,6 +678,51 @@ Dockerfile --- +### 8. draw.io (Documentation-Tools) ✅ +**Date**: 2026-07-30 +**Application**: draw.io (diagrams.net) — client-side diagramming tool +**Package Size**: ~600MB (Tomcat base) +**Port**: 8080 +**Addons**: none (stateless; no database, no persistent storage) + +**Key Learnings**: +- First package to use the **Cloudron authentication proxy** pattern + (`httpAuth.type = proxy`) for a user-less utility app +- Stateless: diagrams live in browser localStorage or cloud storage (Google + Drive, OneDrive, GitHub) — no server-side state at all +- Verified image tag before pinning via `docker manifest inspect` to avoid a + build failure on a non-existent tag +- Confirmed base image (Tomcat/Debian-slim) lacks curl → installed it in the + wrapper for the Docker HEALTHCHECK + +**Build Process**: +- Base: `jgraph/drawio:24.7.17` (pinned, verified tag) +- `apt-get install curl` for the health check +- Inherits upstream ENTRYPOINT (`/docker-entrypoint.sh`) + CMD (`catalina.sh run`) +- No build stage, no runtime setup script needed + +**Auth Pattern (NEW)**: +- draw.io has no user model → use Cloudron `httpAuth.type = proxy` +- Cloudron admin restricts which platform users reach the app; the browser + challenges for Cloudron credentials before the editor loads +- This is the template for all future stateless / no-user apps + +**Validation**: +- `docker build` → success +- `docker run` + `curl http://localhost:8080/` → HTTP 200, container healthy + +**Files Created**: +- Dockerfile (official-image wrapper + curl) +- CloudronManifest.json (port 8080, httpAuth proxy, healthCheckPath /) +- README.md (auth-proxy usage, features, optional env vars) +- CHANGELOG.md +- .env.example (optional DRAWIO_* knobs) +- logo.png (draw.io brand icon from upstream repo) + +**Commit**: `feat: add draw.io Cloudron package (Documentation-Tools)` + +--- + ## Packaging Pattern: Download Pre-Compiled Binaries ### When to Use diff --git a/Package-Workspace/Documentation-Tools/docker-drawio/.env.example b/Package-Workspace/Documentation-Tools/docker-drawio/.env.example new file mode 100644 index 0000000..09faf67 --- /dev/null +++ b/Package-Workspace/Documentation-Tools/docker-drawio/.env.example @@ -0,0 +1,14 @@ +# draw.io optional environment variables. +# The app runs with none of these set; they are tuning knobs only. + +# Base URL of the deployment (leave unset to auto-detect). +# DRAWIO_BASE_URL= + +# Run fully self-contained without loading assets from external CDNs. +# DRAWIO_SELF_CONTAINED=1 + +# PlantUML server URL for inline UML diagram rendering. +# PLANTUML_URL=https://www.plantuml.com/plantuml + +# draw.io export server URL for server-side PDF/PNG/PDF export. +# EXPORT_URL= diff --git a/Package-Workspace/Documentation-Tools/docker-drawio/CHANGELOG.md b/Package-Workspace/Documentation-Tools/docker-drawio/CHANGELOG.md new file mode 100644 index 0000000..72bdc42 --- /dev/null +++ b/Package-Workspace/Documentation-Tools/docker-drawio/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +## 24.7.17 — Initial Cloudron package + +- First Cloudron package for draw.io (diagrams.net) +- Wraps the official `jgraph/drawio:24.7.17` Tomcat image +- Fronted by the Cloudron authentication proxy (no app-level users; stateless + client-side diagramming tool) +- No database / no persistent storage required +- HTTP port 8080, health check on `/` diff --git a/Package-Workspace/Documentation-Tools/docker-drawio/CloudronManifest.json b/Package-Workspace/Documentation-Tools/docker-drawio/CloudronManifest.json new file mode 100644 index 0000000..7e8d51c --- /dev/null +++ b/Package-Workspace/Documentation-Tools/docker-drawio/CloudronManifest.json @@ -0,0 +1,23 @@ +{ + "version": 1, + "manifestVersion": 2, + "type": "app", + "id": "io.cloudron.drawio", + "title": "draw.io", + "description": "draw.io (diagrams.net) is a client-side diagramming application for making flowcharts, process diagrams, org charts, UML, ER diagrams, network diagrams and more. Diagrams are stored in the browser or synced to cloud storage. No server-side database.", + "author": "JGraph", + "website": "https://www.drawio.com", + "contactEmail": "cloudron@tsys.dev", + "tagline": "Free online diagram drawing tool", + "version": "24.7.17", + "healthCheckPath": "/", + "httpPort": 8080, + "httpAuth": { + "type": "proxy" + }, + "memoryLimit": 512, + "addons": {}, + "mediaLinks": [], + "changelog": "Initial Cloudron package for draw.io. Stateless diagramming app fronted by the Cloudron authentication proxy (no app-level users).", + "icon": "file://logo.png" +} diff --git a/Package-Workspace/Documentation-Tools/docker-drawio/Dockerfile b/Package-Workspace/Documentation-Tools/docker-drawio/Dockerfile new file mode 100644 index 0000000..ed25d8f --- /dev/null +++ b/Package-Workspace/Documentation-Tools/docker-drawio/Dockerfile @@ -0,0 +1,26 @@ +# draw.io Cloudron Package +# +# draw.io (diagrams.net) is a client-side JavaScript diagramming application +# served by Tomcat. It is stateless: diagrams are stored in the browser +# (localStorage) or exported / synced to cloud storage (Google Drive, OneDrive, +# GitHub, etc.). There is no database and no server-side persistence. +# +# Authentication: draw.io has no user model, so this package uses Cloudron's +# authentication proxy (httpAuth.type=proxy in CloudronManifest.json). The +# Cloudron admin restricts which platform users may reach the app; the browser +# then challenges for Cloudron credentials before access is granted. +FROM jgraph/drawio:24.7.17 + +# The upstream Tomcat image may not ship curl; install it for the health check. +USER root +RUN apt-get update \ + && apt-get install -y --no-install-recommends curl \ + && rm -rf /var/lib/apt/lists/* + +EXPOSE 8080 + +HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \ + CMD curl -f http://localhost:8080/ || exit 1 + +# Upstream CMD (ENTRYPOINT /docker-entrypoint.sh + "catalina.sh run") is +# inherited unchanged; Tomcat serves draw.war as the root webapp on 8080. diff --git a/Package-Workspace/Documentation-Tools/docker-drawio/README.md b/Package-Workspace/Documentation-Tools/docker-drawio/README.md new file mode 100644 index 0000000..6e7d4c0 --- /dev/null +++ b/Package-Workspace/Documentation-Tools/docker-drawio/README.md @@ -0,0 +1,68 @@ +# draw.io Cloudron Package + +## Description + +draw.io (diagrams.net) is a free, open-source, client-side diagramming +application for creating flowcharts, process diagrams, organizational charts, +UML, entity-relationship, network diagrams, and more. It runs entirely in the +browser; diagrams are stored in browser `localStorage` or exported / synced to +cloud storage providers (Google Drive, OneDrive, GitHub, GitLab, Dropbox). + +This package wraps the official `jgraph/drawio` Docker image (Tomcat serving +`draw.war`). + +## Authentication + +draw.io has **no built-in user model** — it is a stateless client-side tool. +This package therefore uses **Cloudron's authentication proxy** +(`httpAuth.type = proxy` in `CloudronManifest.json`). The Cloudron admin +restricts which platform users/groups may reach the app; authorized users are +challenged for their Cloudron credentials before the diagram editor loads. + +This is the recommended pattern for utility apps without their own user +directory. + +## Features + +- **Diagram Types**: Flowcharts, BPMN, UML, ERD, network, AWS/Azure/GCP + architecture, mind maps, org charts, floor plans, Venn, and more +- **Shape Libraries**: Hundreds of built-in stencils + custom shape import +- **Export**: PNG, JPEG, SVG, PDF, HTML, VSDX +- **Cloud Sync**: Google Drive, OneDrive, GitHub, GitLab, Dropbox, Trello +- **Offline**: Works fully offline; diagrams persist in the browser +- **Collaboration**: Real-time co-editing via Google Drive / Microsoft Teams +- **Embed**: Embed diagrams in Confluence, Jira, Notion, web pages + +## Configuration + +### Ports +- **8080**: Tomcat HTTP (the only exposed port) + +### Environment Variables (optional) +draw.io runs out-of-the-box with no configuration. These are optional knobs: + +| Variable | Purpose | +|----------|---------| +| `DRAWIO_BASE_URL` | Base URL for the deployment | +| `DRAWIO_SELF_CONTAINED` | `1` to run fully self-contained (no external CDNs) | +| `PLANTUML_URL` | URL of a PlantUML server for UML rendering | +| `EXPORT_URL` | URL of a draw.io export server (for server-side PDF/PNG) | +| `DRAWIO_CSP_URL` | Content Security Policy allowlist | + +### Storage +- **None required.** draw.io is stateless. Diagrams live in the browser or in + cloud storage. No Cloudron addons are used. + +## Usage + +1. Install the package on Cloudron. +2. In the Cloudron access control, grant the desired users/groups access. +3. Open the app location — you'll be prompted for Cloudron credentials. +4. Start drawing. Save diagrams to browser, export to file, or connect a cloud + storage provider for persistence. + +## Upstream + +- **Repository**: https://github.com/jgraph/docker-drawio +- **Image**: `jgraph/drawio:24.7.17` +- **Website**: https://www.drawio.com diff --git a/Package-Workspace/Documentation-Tools/docker-drawio/logo.png b/Package-Workspace/Documentation-Tools/docker-drawio/logo.png new file mode 100644 index 0000000..8d64c29 Binary files /dev/null and b/Package-Workspace/Documentation-Tools/docker-drawio/logo.png differ diff --git a/README.md b/README.md index 0d3f5fc..ffa6595 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Cloudron component focuses on packaging upstream free/libre/open application ### 📊 Current Progress - **Total Applications**: ~57 (see [GitUrlList.txt](GitUrlList.txt)) -- **Completed Packages**: 7/~57 (~12%) +- **Completed Packages**: 8/~57 (~14%) - **Packaging Templates**: Created ✅ - **Packages Committed & Pushed**: 7 ✅ @@ -26,6 +26,7 @@ The Cloudron component focuses on packaging upstream free/libre/open application | 5 | WireViz Web | Documentation-Tools | 378MB | 3005 | localstorage | ✅ Committed | | 6 | Puter | Development | 361MB | 4100 | localstorage, postgresql | ✅ Committed | | 7 | Corteza | Low-Code | 436MB | 80 | localstorage, postgresql | ✅ Committed | +| 8 | draw.io | Documentation-Tools | — | 8080 | none (auth proxy) | ✅ Committed | ### 📦 Packages in Development @@ -59,7 +60,7 @@ None currently in development. ### ⚡ Productivity Metrics -- **Packages Completed**: 7/~57 (~12%) +- **Packages Completed**: 8/~57 (~14%) - **Average Package Time**: ~30 minutes - **Success Rate**: 100% (all packages built successfully) - **Commits Pushed**: 100% (all packages pushed to remote) @@ -138,7 +139,7 @@ Applications are organized by function rather than programming language: | [AutoBOM](https://github.com/opulo-inc/autobom) | [GitHub](https://github.com/opulo-inc/autobom) | Automatic bill of materials generation | Development | | [Midday](https://github.com/midday-ai/midday) | [GitHub](https://github.com/midday-ai/midday) | AI-powered business intelligence platform | Business-Apps | | [OpenBlocks](https://github.com/openblocks-dev/openblocks) | [GitHub](https://github.com/openblocks-dev/openblocks) | Low-code application development platform | Low-Code | -| [Docker DrawIO](https://github.com/jgraph/docker-drawio) | [GitHub](https://github.com/jgraph/docker-drawio) | Dockerized version of Draw.io diagramming tool | Documentation-Tools | +| [Docker DrawIO](https://github.com/jgraph/docker-drawio) | [GitHub](https://github.com/jgraph/docker-drawio) | Dockerized version of Draw.io diagramming tool | Documentation-Tools | ✅ Packaged | | [SigNoz](https://github.com/SigNoz/signoz) | [GitHub](https://github.com/SigNoz/signoz) | Open-source observability platform | Monitoring | | [Sentry](https://github.com/getsentry/sentry) | [GitHub](https://github.com/getsentry/sentry) | Error tracking and performance monitoring | Monitoring | | [ChirpStack](https://github.com/chirpstack/chirpstack) | [GitHub](https://github.com/chirpstack/chirpstack) | Open-source LoRaWAN network server | Infrastructure | diff --git a/STATUS.md b/STATUS.md index 722586b..815017b 100644 --- a/STATUS.md +++ b/STATUS.md @@ -3,17 +3,16 @@ > **Human read-only. Agents maintain this file automatically after each work > session.** Do not edit by hand — the next agent run will overwrite it. > -> **Last updated:** 2026-07-30 by Crush (GLM-5.2) — gardening protocol established; -> inventory counts reconciled to 7 packaged / 57 upstream apps. +> **Last updated:** 2026-07-30 by Crush (GLM-5.2) — draw.io packaged (auth-proxy +> pattern); mandatory auth policy established. ## Current State: STABLE (packaging phase, ongoing) -Cloudron packaging pipeline is operational. 7 of ~57 upstream applications are -packaged, committed, and pushed. Packaging templates exist for the four core -patterns. The gardening protocol (this file + AGENTS.md) was just established -to keep docs in sync going forward. +Cloudron packaging pipeline is operational. 8 of ~57 upstream applications are +packaged, committed, and pushed. Packaging templates exist for the core +patterns. The gardening protocol (this file + AGENTS.md) keeps docs in sync. -## Completed Packages (7) +## Completed Packages (8) | # | Application | Category | Pattern | Port(s) | Addons | |---|-------------|----------|---------|---------|--------| @@ -24,6 +23,7 @@ to keep docs in sync going forward. | 5 | WireViz Web | Documentation-Tools | Python build | 3005 | localstorage | | 6 | Puter | Development | Multi-stage (Node.js) | 4100 | localstorage, postgresql | | 7 | Corteza | Low-Code | Pre-compiled binaries | 80 | localstorage, postgresql | +| 8 | draw.io | Documentation-Tools | Official-image wrapper + auth proxy | 8080 | none (stateless) | Each package lives in `Package-Workspace///` and contains a `Dockerfile`, `CloudronManifest.json`, `README.md`, `CHANGELOG.md`, `logo.png`, @@ -46,7 +46,7 @@ Full write-ups of each pattern + challenges are in [`JOURNAL.md`](JOURNAL.md). |----------|------|----------|-------| | **API-Gateway** | 2 | 2/2 (100%) ✅ | Category complete | | Development | 4 | 2/4 | reviewboard, puter done | -| Documentation-Tools | 3 | 1/3 | wireviz-web done | +| Documentation-Tools | 3 | 2/3 | wireviz-web, draw.io done | | Low-Code | 3 | 1/3 | corteza done | | Monitoring | 6 | 1/6 | healthchecks done | | Automation | 4 | 0/4 | | @@ -92,10 +92,11 @@ LDAP acceptable (risk flag), 🔄 = auth-proxy (no users), ❌ = local-only | NetBox | yes | yes | ✅ auth, ❌ Redis | OIDC+LDAP native, but HARD Redis dep (Cloudron has none) — Complex | | Gophish | no | no | ❌ blocked | Local admin login only, no SSO — do not package until auth added | -**Immediate queue:** docker-drawio (proxy auth), Windmill (OIDC). +**Immediate queue:** Windmill (OIDC). **Deferred:** NetBox (bundle Valkey+supervisor — significant), Gophish (blocked-on-auth). -**Tech debt:** add `httpAuth` proxy to Webhook + WireViz Web; revisit Puter auth. +**Tech debt:** add `httpAuth` proxy to Webhook + WireViz Web (stateless apps); +revise Puter auth. draw.io ✅ packaged with auth proxy. ## Known Issues