neiam
/diogramos
diogramos
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
docs: write real README (overview, features, quickstart, container images)
81b2fe4 · gmorell · 2026-06-27 15:53
Files changed
modified
README.md
+70
−11
@@ -1,18 +1,77 @@
| 1 | 1 | # Diogramos |
| 2 | 2 | |
| 3 | −To start your Phoenix server: | |
| 3 | +A collaborative diagram & canvas editor. Draw shapes and connectors on a | |
| 4 | +canvas, hand out edit access by link, or drop a read-only embed into another | |
| 5 | +site. Phoenix LiveView on top of PostgreSQL, with live multi-user editing. | |
| 4 | 6 | |
| 5 | −* Run `mix setup` to install and setup dependencies | |
| 6 | −* Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server` | |
| 7 | +## Features | |
| 7 | 8 | |
| 8 | −Now you can visit [`localhost:4000`](http://localhost:4000) from your browser. | |
| 9 | +- **Canvas editor** — shapes and connectors with anchor-aware routing, | |
| 10 | + edited live at `/c/:slug` (Phoenix LiveView). Open boards from | |
| 11 | + `/canvases`. | |
| 12 | +- **Metadata links** — attach external (`https://…`) or canvas-to-canvas | |
| 13 | + links to an element; they render as side-by-side icons on the shape. | |
| 14 | +- **Folders & organization** — group canvases into folders. | |
| 15 | +- **Sharing & permissions** — role-based grants per folder/canvas, plus | |
| 16 | + one-off share links (`/s/:token`). | |
| 17 | +- **Embeds** — publish a canvas read-only via `/embed/:token` (and the | |
| 18 | + `/c-embed/:slug` redirect for in-canvas links). | |
| 19 | +- **JSON export** — `/c/:slug/export.json` for any canvas you can see. | |
| 20 | +- **Accounts** — magic-link login by default, password optional, with | |
| 21 | + invite-gated registration (`/users/invites`). | |
| 22 | +- **Themes** — pick a daisyUI theme; the choice persists. | |
| 9 | 23 | |
| 10 | −Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html). | |
| 24 | +## Quick start | |
| 11 | 25 | |
| 12 | −## Learn more | |
| 26 | +```sh | |
| 27 | +# 1. Bring up Postgres (see compose.yml) | |
| 28 | +podman compose up -d # or: docker compose up -d | |
| 13 | 29 | |
| 14 | −* Official website: https://www.phoenixframework.org/ | |
| 15 | −* Guides: https://hexdocs.pm/phoenix/overview.html | |
| 16 | −* Docs: https://hexdocs.pm/phoenix | |
| 17 | −* Forum: https://elixirforum.com/c/phoenix-forum | |
| 18 | −* Source: https://github.com/phoenixframework/phoenix | |
| 30 | +# 2. Install deps, create + migrate the dev DB, build assets | |
| 31 | +mix setup | |
| 32 | + | |
| 33 | +# 3. Start the dev server | |
| 34 | +mix phx.server | |
| 35 | +``` | |
| 36 | + | |
| 37 | +Then open <http://localhost:4000>. Registration is invite-only by default — | |
| 38 | +mint a link from `/users/invites`, or seed an initial confirmed user: | |
| 39 | + | |
| 40 | +```sh | |
| 41 | +mix run -e 'Diogramos.Release.init("you@example.com", "a strong password")' | |
| 42 | +``` | |
| 43 | + | |
| 44 | +## Container images | |
| 45 | + | |
| 46 | +CI publishes a multi-registry image on every push to `master`: | |
| 47 | + | |
| 48 | +- `ghcr.io/neiam/diogramos` | |
| 49 | +- `docker.io/neiam/diogramos` | |
| 50 | +- `quay.io/neiam/diogramos` | |
| 51 | + | |
| 52 | +Tags: `latest` (default branch), `vX.Y.Z` + `X.Y` (git tags), the branch name, | |
| 53 | +and the commit SHA. | |
| 54 | + | |
| 55 | +```sh | |
| 56 | +docker pull ghcr.io/neiam/diogramos:latest | |
| 57 | + | |
| 58 | +docker run --rm -p 4000:4000 \ | |
| 59 | + -e PHX_SERVER=true \ | |
| 60 | + -e SECRET_KEY_BASE="$(openssl rand -base64 48)" \ | |
| 61 | + -e PHX_HOST=localhost \ | |
| 62 | + -e POSTGRES_HOST=host.containers.internal \ | |
| 63 | + -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=diogramos \ | |
| 64 | + ghcr.io/neiam/diogramos:latest | |
| 65 | +``` | |
| 66 | + | |
| 67 | +Or set `DATABASE_URL=ecto://user:pass@host/db` instead of the discrete | |
| 68 | +`POSTGRES_*` variables. | |
| 69 | + | |
| 70 | +## Tests | |
| 71 | + | |
| 72 | +```sh | |
| 73 | +mix test | |
| 74 | +mix precommit # compile --warnings-as-errors, deps.unlock --unused, format, test | |
| 75 | +``` | |
| 76 | + | |
| 77 | +`mix precommit` is what CI runs and what every change should pass. |
Parents: f0eac3b