Diogramos
A collaborative diagram & canvas editor. Draw shapes and connectors on a canvas, hand out edit access by link, or drop a read-only embed into another site. Phoenix LiveView on top of PostgreSQL, with live multi-user editing.
Features
- Canvas editor — shapes and connectors with anchor-aware routing,
edited live at
/c/:slug(Phoenix LiveView). Open boards from/canvases. - Metadata links — attach external (
https://…) or canvas-to-canvas links to an element; they render as side-by-side icons on the shape. - Folders & organization — group canvases into folders. Deleting a canvas is owner-only and asks for its slug to be typed back first.
- Sharing & permissions — role-based grants per folder/canvas, plus
one-off share links (
/s/:token). - Embeds — publish a canvas read-only via
/embed/:token(and the/c-embed/:slugredirect for in-canvas links). - JSON export —
/c/:slug/export.jsonfor any canvas you can see. - Accounts — magic-link login by default, password optional, with
invite-gated registration (
/users/invites). - Themes — pick a daisyUI theme; the choice persists.
Quick start
# 1. Bring up Postgres (see compose.yml)
podman compose up -d # or: docker compose up -d
# 2. Install deps, create + migrate the dev DB, build assets
mix setup
# 3. Start the dev server
mix phx.server
Then open http://localhost:4000. Registration is invite-only by default —
mint a link from /users/invites, or seed an initial confirmed user:
mix run -e 'Diogramos.Release.init("you@example.com", "a strong password")'
Container images
CI publishes a multi-registry image on every push to master:
- the forge’s own registry,
$CI_REGISTRY/neiam/diogramos, when the repository is hosted on one that setsCI_REGISTRY ghcr.io/neiam/diogramosdocker.io/neiam/diogramosquay.io/neiam/diogramos
Tags: latest (default branch), vX.Y.Z + X.Y (git tags), the branch name,
and the commit SHA.
The forge registry is the one that needs no setup: the per-job github.token
is already authorized to push to that repository’s own image path and nowhere
else, so there is no secret to create. The three public registries need
GHCR_TOKEN, DOCKERHUB_USER/DOCKERHUB_TOKEN and
QUAY_USERNAME/QUAY_TOKEN; each login is skipped on pull requests, and a
missing CI_REGISTRY simply drops the forge registry from the list.
docker pull ghcr.io/neiam/diogramos:latest
docker run --rm -p 4000:4000 \
-e PHX_SERVER=true \
-e SECRET_KEY_BASE="$(openssl rand -base64 48)" \
-e PHX_HOST=localhost \
-e POSTGRES_HOST=host.containers.internal \
-e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=diogramos \
ghcr.io/neiam/diogramos:latest
Or set DATABASE_URL=ecto://user:pass@host/db instead of the discrete
POSTGRES_* variables.
Tests
mix test
mix precommit # compile --warnings-as-errors, deps.unlock --unused, format, test
mix precommit is what CI runs and what every change should pass.