steid

@jamesgill /

steid/README.md
Markdown28.4 KBRendered·Source·Blame·History·Raw
1# Steid
2
3A personal gitforge, in Rust. It hosts your repositories, and it is meant to become the
4place your work as a whole lives — code, writing, projects — under one identity you
5control.
6
7Steid is **portfolio-first**. Gitea and Forgejo are GitHub scaled down; their unit is the
8repository and the profile is a directory listing bolted to the side. Steid inverts that:
9the profile page at `/{handle}` is the product, and git repositories are one kind of
10thing that appears on it. That framing wins every tie-break in the design.
11
12It runs as a single binary with a SQLite database, shells out to `git` for everything
13git-shaped, and is small enough to host on the cheapest VPS you can find.
14
15## What works today
16
17Honestly and only:
18
19- **Identity and sessions.** One user. The instance is claimed on first run with a setup
20 token, then you sign in with a password. There is no registration — see
21 [limitations]#current-limitations.
22- **The profile page** at `/{handle}`, listing what you have.
23- **Repositories.** Created through the browser, or imported by cloning a URL. Stored as
24 bare repos on disk and records in SQLite. Public or private, renameable, pinnable,
25 archivable, deletable, with a default branch you choose.
26- **Clone and push over HTTPS**, through `git http-backend`, authenticated with personal
27 access tokens over HTTP Basic. Private repositories require a token to clone; public
28 ones are anonymous.
29- **Personal access tokens** — issue with an expiry (30 days, 90, a year, or never), see
30 when each was last used, revoke, at `/{handle}/settings/tokens`.
31- **Browsing** — file tree with a per-file **last-commit column**, file contents with
32 syntax highlighting, commit log, a commit and its **highlighted diff**, a three-dot
33 comparison of two revisions, blame, branches and tags, and the README rendered on the
34 repository page with `#12` and bare shas linked to the issue and commit they name.
35- **A file's own history** at `/{handle}/repos/{name}/log/{rev}/-/{path}`, which
36 **follows renames**, so a file's past does not stop where its name changed.
37- **Markdown files render as documents**, with `?view=source` for the text; headings get
38 ids, so a link to `notes.md#usage` lands on the section it names. Submodule rows link
39 to their upstream at the sha they are pinned to, and symlink rows say where they point.
40- **Code search** over a revision, at `/{handle}/repos/{name}/search`.
41- **Archive download** — `zip` and `tar.gz` of any revision, and of every tag.
42- **Issues** — open, comment, edit, close and reopen, with labels from a palette of
43 eight colours, and filtering by label and state.
44- **Pull requests** — branch to branch inside one repository, with a Conversation, the
45 commits and the changed files under their own tabs, the same labels the issues wear,
46 and a merge box that says whether the branches actually merge before it offers a
47 button. Merge as a merge commit, a fast-forward or a squash, optionally deleting the
48 source branch afterwards; a merge fires the same webhooks a push does, and
49 `Closes #4` in the title or body closes issue 4 and says so on it.
50- **Webhooks** — a signed JSON POST per push, with a delivery log you can page through,
51 redeliver an attempt from, and switch a hook off in.
52- **Atom feeds** — a repository's commits and its issues, and the owner's push activity
53 across repositories, linked from the pages they belong to and autodiscovered.
54- **Every long list pages**, with `?page=N`, clamped to the nearest page that exists
55 rather than refused.
56- **A JSON API** — `/api/me`, `/api/users/{handle}`, `/api/users/{handle}/repos`. Not a
57 separate product; every use case gets a second surface where that makes sense, which is
58 what keeps the use-case layer honest.
59
60Writing (markdown posts), multi-user, organizations, code review and SSH transport are
61**not built yet**. The plan for them is in [`plans/ROADMAP.md`]plans/ROADMAP.md.
62
63## Requirements
64
65- Linux, x86_64 or aarch64, with systemd. The releases are built against glibc 2.31, so
66 Debian 11 and Ubuntu 20.04 or newer.
67- **`git` on `PATH`.** Not optional: Steid runs `git init --bare` to create a repository
68 and `git http-backend` to serve every clone and push. One `apt-get install git`.
69 **git 2.38 or newer to merge a pull request from the web** — that is when `git
70 merge-tree --write-tree` arrived, which is how a merge is computed without a working
71 tree; everything else works on any git, and where it is older the merge box says so
72 instead of offering a button. Debian 12 and Ubuntu 22.04 and newer are fine.
73- **A TLS-terminating reverse proxy, and a domain name for it.** Also not optional.
74 Steid speaks plain HTTP — the web framework it is built on (Topcoat 0.5) has no TLS
75 support at all: no rustls, no ACME, no HTTPS listener. And because git authenticates
76 with HTTP Basic, an instance served over plain HTTP leaks your access token to every
77 hop on the network, on every push. The installer sets Caddy up for you.
78- About 100 MB of disk before any repositories, plus whatever you push.
79
80## Install
81
82### One command
83
84```sh
85curl -fsSL https://releases.steid.dev/install.sh | sh -s -- --domain git.example.com
86```
87
88Point the domain's DNS at the machine first, and make sure ports 80 and 443 are open —
89Caddy needs both to obtain a certificate.
90
91Releases live at `https://releases.steid.dev` — the tarball for your architecture and
92its SHA-256 under `/v<version>/`, and this script at the root. `jpgill.dev` mirrors the
93same files at the path it has served since 0.4.0, so older links still work. Installing
94from your own mirror is one variable: `STEID_RELEASE_BASE_URL=https://…` with the same
95`/v<version>/steid-<version>-<target>.tar.gz` layout under it.
96
97That does the following, and nothing else:
98
991. installs `git`, `curl` and `ca-certificates`
1002. downloads the release tarball for your architecture and **verifies its SHA-256**
1013. unpacks it to `/opt/steid` — the binary with its `assets/` directory beside it
1024. creates a `steid` system user and `/var/lib/steid` for state, owned by it
1035. writes `/etc/steid/steid.env`, and a systemd unit that listens on `127.0.0.1:3000`
1046. installs Caddy and writes a Caddyfile that terminates TLS for your domain and proxies
105 to that loopback port
1067. starts both
107
108Re-run it with a newer `--version` to upgrade. It is idempotent: it replaces the binary
109and assets, leaves `/var/lib/steid` alone, and will not overwrite `/etc/steid/steid.env`
110once it exists — with one exception, `--operator-token`, which is the only setting a
111later run rewrites and only when you pass it.
112
113Options: `--version`, `--port`, `--flavour musl|gnu` (`gnu` is what is built),
114`--owner-email`/`--owner-handle` (below), `--operator-token` (see
115[Operator surface]#operator-surface), and `--no-caddy` if you are bringing your own
116proxy. `sh install.sh --help` lists them.
117
118### Scripted install: come up already owned
119
120A fresh instance has no owner, and until someone claims it the setup page is open to
121whoever reaches it first. That is fine when you are watching the install; it is not fine
122when a machine builds itself at three in the morning. Give the installer an owner and
123there is no window at all:
124
125```sh
126sh install.sh --domain git.example.com \
127 --owner-email you@example.com --owner-handle you
128```
129
130It writes `STEID_OWNER_EMAIL` and `STEID_OWNER_HANDLE` into `/etc/steid/steid.env`, and
131the first boot that finds the instance unclaimed creates that owner before serving a
132single request. No setup token is printed, and `/auth/setup` is closed because there is
133nothing left to claim.
134
135**That owner has no password**, because there was nobody to choose one: Steid hashes 32
136random bytes it generates at boot and throws away, so every sign-in attempt is refused
137like any other wrong password. The way in is a one-time link minted on the machine:
138
139```sh
140/opt/steid/steid reset-password you
141```
142
143Both flags or neither — half of an owner is a refusal from the installer, and from Steid
144itself at startup, rather than an instance that quietly comes up unclaimed. A handle that
145is reserved or malformed, or a bad email address, also stops the boot with one line
146saying which. They are written only when `/etc/steid/steid.env` is first created, and
147Steid ignores them once an owner exists, so they can stay in the file for the life of the
148instance.
149
150**On piping a URL into a shell.** It is a real trust decision, and "it's convenient" is
151not an answer to it. Download and read it first if you would rather:
152
153```sh
154curl -fsSL https://releases.steid.dev/install.sh -o install.sh
155less install.sh
156sudo sh install.sh --domain git.example.com
157```
158
159Or do it by hand — the manual path below is the same steps, written out.
160
161### Manually
162
163Every command as root, on Debian or Ubuntu. Adjust paths and package manager to taste;
164nothing here is specific to a distribution except `apt-get`.
165
166```sh
167# 1. Prerequisites. git is mandatory — Steid shells out to it for everything.
168apt-get update
169apt-get install -y git curl ca-certificates
170
171# 2. Fetch and verify the release for your architecture.
172VERSION=0.7.0
173TARGET=x86_64-unknown-linux-gnu # or aarch64-unknown-linux-gnu
174BASE=https://releases.steid.dev
175curl -fsSLO "$BASE/v$VERSION/steid-$VERSION-$TARGET.tar.gz"
176curl -fsSLO "$BASE/v$VERSION/steid-$VERSION-$TARGET.tar.gz.sha256"
177sha256sum -c "steid-$VERSION-$TARGET.tar.gz.sha256"
178tar -xzf "steid-$VERSION-$TARGET.tar.gz"
179
180# 3. Install. `assets/` MUST end up beside the binary: at startup Steid walks up
181# from its own executable looking for `assets/manifest.toml`, and exits if it
182# is not there. Moving the binary on its own gives you a program that will not
183# boot.
184mkdir -p /opt/steid
185cp "steid-$VERSION-$TARGET/steid" /opt/steid/steid
186cp -r "steid-$VERSION-$TARGET/assets" /opt/steid/assets
187chmod 755 /opt/steid/steid
188
189# 4. A user to run as, and one directory for all state.
190useradd --system --home-dir /var/lib/steid --shell /usr/sbin/nologin steid
191mkdir -p /var/lib/steid/repos
192chown -R steid:steid /var/lib/steid
193chmod 750 /var/lib/steid
194
195# 5. Configuration.
196mkdir -p /etc/steid
197cat > /etc/steid/steid.env <<'EOF'
198STEID_DATABASE_URL=sqlite:/var/lib/steid/steid.db?mode=rwc
199STEID_DATA_DIR=/var/lib/steid/repos
200HOST=127.0.0.1
201PORT=3000
202EOF
203chmod 640 /etc/steid/steid.env
204chown root:steid /etc/steid/steid.env
205
206# 6. The service. deploy/steid.service in this repo is the file to copy.
207cp deploy/steid.service /etc/systemd/system/steid.service
208systemctl daemon-reload
209systemctl enable --now steid
210
211# 7. The proxy. deploy/Caddyfile is a working starting point — change the
212# hostname on its first line to yours.
213apt-get install -y caddy # or follow https://caddyserver.com/docs/install
214cp deploy/Caddyfile /etc/caddy/Caddyfile
215$EDITOR /etc/caddy/Caddyfile
216systemctl reload caddy
217```
218
219There is **no migration step**. Steid runs its migrations itself on every boot.
220
221## First run: claiming the instance
222
223A fresh instance has no owner. On startup it prints a setup token to its log:
224
225```
226 This steid has no owner yet. Claim it at /auth/setup with:
227
228 <token>
229```
230
231Two things about that token that will bite you otherwise:
232
233- It is printed **only while the instance is unclaimed**. Once you have claimed it, it is
234 never shown again — because it no longer exists.
235- It lives **in memory only**. Every restart mints a new one, and the one in an older log
236 line is dead.
237
238So read it from the current run's journal:
239
240```sh
241journalctl -u steid --no-pager | tail -n 30
242```
243
244Then open `https://git.example.com/auth/setup`, paste it in, and choose your handle and
245password. After that, `/auth/login`.
246
247**Passwords must be at least 12 characters.** That is the only rule — no required digit
248or symbol, because length is the part that measurably helps and composition rules mostly
249make people write theirs down. The same rule applies to a password reset and to changing
250one in settings; accounts created before it keep working until their owner changes them.
251
252### Or have no claim at all
253
254An unattended install can skip this section entirely: `install.sh --owner-email …
255--owner-handle …` creates the owner at first boot, so there is no token, no setup page
256and no window. See [Scripted install]#scripted-install-come-up-already-owned.
257
258### Or set the token yourself
259
260If reading a log line during the first minute of a scripted install is awkward, set the
261token instead and skip the race:
262
263```sh
264STEID_SETUP_TOKEN=$(head -c 32 /dev/urandom | base64)
265```
266
267It is only consulted while the instance is unclaimed, it is never printed, and Steid
268**refuses to start** if it is weak — at least 32 characters, no whitespace, and at least
269eight distinct characters, so `abababab…` is rejected rather than accepted.
270
271## Using it
272
2731. Create a repository at `/{handle}/repos/new`. Public or private.
2742. Issue a personal access token at `/{handle}/settings/tokens`. It is shown once.
2753. Push:
276
277```sh
278git remote add origin https://git.example.com/me/repos/my-project.git
279git push -u origin main
280```
281
282Git will ask for a username and password. The token goes in the **password** field; the
283username is ignored (a token pasted as the username with an empty password also works,
284because people do that).
285
286You only type it once. Git's credential helper stores it and answers every later push —
287which is the whole reason pushing to GitHub feels like it needs no credentials. Use the
288one that keeps secrets in your operating system's keystore:
289
290```sh
291git config --global credential.helper osxkeychain # macOS (usually already set)
292git config --global credential.helper manager # Windows
293git config --global credential.helper libsecret # Linux
294```
295
296**Not `credential.helper store`.** It writes the token in clear text to
297`~/.git-credentials`, and a token is a password that never expires. Steid keeps only a
298hash of it precisely so that a stolen database contains nothing anyone can present;
299storing the plaintext on your laptop hands back what that was protecting.
300
301**Do not put the token in the remote URL** (`https://user:token@host/...`) either. It
302goes into `.git/config` in clear text and shows up in `git remote -v`, in shell history,
303and in any log that records the URL.
304
305Cloning a public repository needs no credentials at all.
306
307## Configuration
308
309Environment variables, read from `/etc/steid/steid.env` by the systemd unit.
310
311| Variable | Default | What it is |
312|---|---|---|
313| `STEID_DATABASE_URL` | `sqlite:steid.db?mode=rwc` | SQLite connection string. The directory must be writable, not just the file — SQLite writes `-wal` and `-shm` siblings. |
314| `STEID_DATA_DIR` | `./data` | Where bare repositories live, as `{data_dir}/{handle}/{name}.git`. |
315| `STEID_INSECURE_COOKIES` | unset (false) | **Never set this in production.** It strips `Secure` from the session cookie so it survives plain-HTTP localhost, and exists only for local development. |
316| `HOST` | `127.0.0.1` in the shipped unit | Bind address. Read by the framework, so deliberately *not* `STEID_`-prefixed. Keep it on loopback; the proxy is the way in. |
317| `PORT` | `3000` | Likewise not `STEID_`-prefixed. |
318| `STEID_TRUSTED_PROXY` | unset (false) | Whether to believe `X-Forwarded-For` / `X-Real-IP` when telling one rate-limited caller from another. `install.sh` sets it `true`, because that install puts Caddy in front. Leave it off for anything serving Steid straight to the internet — see [Operator surface]#operator-surface. |
319| `STEID_OPERATOR_TOKEN` | unset | A bearer token for the operator surface. Unset means that surface does not exist. |
320| `STEID_OWNER_EMAIL` | unset | With `STEID_OWNER_HANDLE`, the owner to create at first boot — see [Scripted install]#scripted-install-come-up-already-owned. Set one without the other and Steid refuses to start. |
321| `STEID_OWNER_HANDLE` | unset | The handle for that owner. Reserved or malformed, and Steid refuses to start rather than serving unclaimed. |
322
323Restart after editing: `systemctl restart steid`.
324
325## Operator surface
326
327Two JSON routes for driving an instance without a browser — a control plane provisioning
328a machine, a monitoring poll, a scripted install. No session, no cookie, no HTML.
329Authenticated by `STEID_OPERATOR_TOKEN` as a bearer token, compared in constant time.
330**With no token configured the surface does not exist**: those calls answer as if
331unauthenticated, and nothing advertises that a token could be set.
332
333Set it at install time so the instance never serves with the surface off:
334
335```sh
336sh install.sh --domain git.example.com \
337 --operator-token "$(openssl rand -hex 32)"
338```
339
340The installer writes it into `/etc/steid/steid.env` before Steid is started, and never
341prints it. This is the one line a later run will rewrite — pass the flag again to rotate
342the token; omit it and the existing line is left alone like every other setting in that
343file. Editing the line by hand works just as well; restart afterwards.
344
345### `GET /api/instance`
346
347Unauthenticated, it answers the one fact that is safe to tell anybody — and the one a
348provisioner needs, so it can wait for a machine to finish booting before handing its owner
349a claim link:
350
351```sh
352$ curl -s https://steid.example.com/api/instance
353{"claimed":false}
354```
355
356With the operator token it adds what the machine is and how big it has become:
357
358```sh
359$ curl -s -H "Authorization: Bearer $STEID_OPERATOR_TOKEN" \
360 https://steid.example.com/api/instance
361{"claimed":true,"version":"0.7.0","git_version":"2.47","merge_supported":true,
362 "repositories":3,"users":1,"uptime_seconds":8421,
363 "disk":{"data_dir_bytes":12884901888,"filesystem_total_bytes":21474836480,
364 "filesystem_free_bytes":8589934592}}
365```
366
367A wrong or missing token is not an error — it is the public answer. `git_version` is
368absent where git could not be run at all, which is the same case that leaves
369`merge_supported` false.
370
371`disk` is the data directory walked — everything under it, whatever it is — plus the
372total and the free space of the filesystem it sits on, so "12 GB of 20 used" is
373arithmetic rather than a second call. Free is what is free to the `steid` user, not
374counting the reserve a filesystem keeps for root. The walk is cached for a minute, so
375polling this every few seconds costs one walk a minute; the whole group is absent where
376the directory could not be read, rather than reported as zero. **It is never on the
377unauthenticated answer**, which stays `{"claimed": …}` and nothing else.
378
379The unauthenticated form is rate limited to 60 calls a minute per caller (600 across
380everyone), which is about one poll a second. The authenticated form is not: a caller
381holding the token has already proved it is the control plane.
382
383### `POST /api/setup`
384
385The claim form, headless. Same rules as the page at `/auth/setup`: the setup token is
386checked before anything is written, a claimed instance cannot be claimed again, and the
387password must be at least 12 characters.
388
389```sh
390$ curl -s -X POST https://steid.example.com/api/setup \
391 -H 'content-type: application/json' \
392 -d '{"setup_token":"…","email":"you@example.com","handle":"you","password":"…"}'
393{"handle":"you"}
394```
395
396201 on success, and **no session** — a control plane is not signing in, so sign in through
397the browser afterwards like anyone else. A password short of the minimum is refused like
398everything else here — the same opaque `404`, with the reason in the server log — because
399a response that named the password would tell a stranger guessing tokens that they had
400guessed one. Every failure is the same `404` with the same
401body, whether the token was wrong or the instance was already claimed: telling those two
402apart would say whether there is still something worth guessing. It shares the sign-in
403rate limit — 10 attempts a minute per caller, 60 across everyone — because it is the same
404secret being attacked.
405
406Pair it with `STEID_SETUP_TOKEN` (see [Or set the token yourself]#or-set-the-token-yourself)
407so the whole install is scriptable: the token goes into the environment, the machine boots,
408`GET /api/instance` says `{"claimed":false}`, and one POST claims it.
409
410### `STEID_TRUSTED_PROXY`
411
412The rate limiters have to tell one caller from another, and the web framework Steid is
413built on (Topcoat 0.5) discards the peer address when it accepts a connection — a handler
414sees request headers and nothing else. So the only thing available is
415`X-Forwarded-For`.
416
417Behind a proxy that is sound: the proxy *appends* the address it accepted the connection
418from, so the rightmost entry is the one the client cannot forge. Exposed directly, nothing
419appends anything, and a caller can invent a fresh header per request to buy itself a fresh
420budget every time.
421
422`STEID_TRUSTED_PROXY` says which situation you are in, and defaults to the safe answer.
423Left off, no header is read at all and every caller shares one window — a forged header
424buys nothing, at the cost of one flood exhausting the shared budget for a minute. Turn it
425on only when something in front of Steid is appending the header; `install.sh` does,
426because it installs Caddy.
427
428## Backup and restore
429
430The entire backup surface is **two paths**:
431
432- `/var/lib/steid/steid.db` — the SQLite database (users, repositories, tokens, sessions)
433- `/var/lib/steid/repos` — the bare git repositories
434
435Which is to say: back up `/var/lib/steid`. `rsync` is enough.
436
437```sh
438systemctl stop steid
439rsync -a /var/lib/steid/ backup-host:/backups/steid/
440systemctl start steid
441```
442
443Stopping first is the honest version: SQLite in WAL mode leaves `-wal` and `-shm` files,
444and copying them while a write is in flight can capture a torn state. If you would rather
445not stop the service, snapshot the database properly and copy the repositories live —
446they are only written during a push:
447
448```sh
449sqlite3 /var/lib/steid/steid.db ".backup '/tmp/steid-backup.db'"
450rsync -a /tmp/steid-backup.db /var/lib/steid/repos backup-host:/backups/steid/
451```
452
453To restore: install Steid as above, stop it, drop both paths back into `/var/lib/steid`,
454`chown -R steid:steid /var/lib/steid`, start it. Migrations run on boot, so a database
455from an older version is brought forward automatically.
456
457### `steid backup` and `steid restore`
458
459Steid can also do both itself, into one file:
460
461```sh
462steid backup /var/backups/steid # a directory: it picks the name
463steid restore /var/backups/steid-0.7.0-20260926T101500Z.tar.gz
464```
465
466The archive holds a manifest, a consistent copy of the database (SQLite's own
467`VACUUM INTO`, so the service may keep running) and the whole data directory. `install.sh
468--backups daily` runs the first of these on a timer.
469
470**`steid restore` refuses an instance that already holds a user or a repository**, so
471pointing it at the wrong machine cannot replace somebody's site with somebody else's.
472That refusal is the default and is not going away.
473
474```sh
475systemctl stop steid
476steid restore --replace /var/backups/steid-0.7.0-20260926T101500Z.tar.gz
477systemctl start steid
478```
479
480`--replace` is the explicit consent to do it anyway: it replaces everything this instance
481holds — database and data directory — with the archive's, whoever is in it. **Stop Steid
482first**; nothing checks, because the data directory is being moved out from under a
483process that serves out of it.
484
485Nothing is deleted. The archive is extracted beside the live tree and swapped in only
486once the whole extraction has succeeded, and what was there is moved to
487`/var/lib/steid/repos/.replaced-<timestamp>/` — repositories and a copy of the old
488database together. It is as large as the instance was and **nothing will ever remove
489it**; the restore prints the path, and deleting it once you have checked the restore is
490yours to do.
491
492## Building from source
493
494```sh
495cargo install topcoat-cli --version 0.5.0 --locked
496topcoat asset bundle --release
497```
498
499**`cargo build --release` on its own is not enough.** It produces a binary that will not
500boot: `AssetBundle::load()` walks up from the executable looking for
501`assets/manifest.toml`, and `build.rs` does not write one. `topcoat asset bundle` runs
502`cargo build` itself and then writes the bundle to `target/assets`. The binary at
503`target/release/steid` needs that directory beside it.
504
505Requires rustc ≥ 1.95 — Topcoat 0.5 demands it, and on an older toolchain `cargo add
506topcoat` silently resolves to an empty `v0.0.0` placeholder instead of failing.
507
508For development, `topcoat dev` does the bundling for you, and a local `.env` with
509`STEID_INSECURE_COOKIES=true` is needed for the session cookie to survive plain-HTTP
510localhost.
511
512### Cutting a release
513
514```sh
515./release.sh --target x86_64-unknown-linux-gnu
516```
517
518Produces `dist/steid-<version>-<target>.tar.gz` and a `.sha256` beside it. The tarball
519extracts to a self-contained directory: the binary, `assets/`, and this README. Building
520a Linux artefact on macOS needs a container (the script uses Docker) or a cross
521toolchain; `--native` builds for the host instead, which is useful for checking the
522artefact layout and not for releasing.
523
524A container image also exists — see [`Dockerfile`]Dockerfile — but the supported
525artefact is the plain binary.
526
527## Current limitations
528
529Deliberately blunt. Steid is early.
530
531- **Single user.** One account, claimed on first run. No registration, no invites, no
532 organizations yet. Issues exist, but only the owner may open or comment on one, which
533 is the same assumption showing.
534- **No TLS of its own.** A reverse proxy is mandatory, not recommended — see
535 [requirements]#requirements.
536- **No encryption at rest.** The database and repositories are plain files. Anyone with
537 the disk has everything. Token *values* are hashed, and passwords are Argon2, but
538 repository contents are not encrypted.
539- **Rate limiting covers `/auth/login`, `/auth/setup` and token authentication on the
540 git routes** — 10 attempts a minute per client for the first two, 60 for the third,
541 each with a global backstop. An anonymous clone of a public repository is not limited
542 at all, and neither is an archive download, which is the most expensive thing a
543 stranger can ask for.
544- **Rate limiting keys on forwarded headers, because Topcoat 0.5 does not expose the
545 peer address at all.** Behind a reverse proxy — the supported deployment — that works.
546 Exposed directly to the internet with no proxy, a caller can vary the header and get a
547 fresh budget each time, leaving only the global cap. Run it behind the proxy.
548- **Nothing sweeps expired tokens and nothing warns before one expires.** A token that
549 has expired authenticates exactly like one that never existed, and the tokens page is
550 where you find out.
551- **No CI/CD**, no code review, no SSH transport, no federation. Pull requests exist but
552 are bare: no assignees, reviewers or milestones, and only the owner may open or merge
553 one — the single-user assumption again.
554- **No writing yet** — posts and markdown are the next milestone, and they are the point
555 of the whole thing.
556- **Light mode is half-checked.** The repository landing page, a tree and a blob were
557 looked at and were fine; the profile, the settings pages and the log were not. Either
558 way there is no way for a visitor to choose — the layout is hardcoded dark.
559- **Not battle-tested.** It has not run under load, has not been audited, and has been
560 deployed by approximately one person. Do not put anything irreplaceable in it that is
561 not also somewhere else.
562
563More, in unflattering detail, in [`plans/current.md`]plans/current.md.
564
565## Project layout
566
567`plans/` is the source of truth for intent, not the code:
568
569| File | Holds |
570|---|---|
571| [`plans/ROADMAP.md`]plans/ROADMAP.md | vision, stack, the milestone ladder |
572| [`plans/current.md`]plans/current.md | the active milestone, and every known gap |
573| [`plans/progress.md`]plans/progress.md | what shipped, and the decisions worth not rediscovering |
574| [`plans/architecture.md`]plans/architecture.md | layer rules and conventions |
575| [`plans/decisions/`]plans/decisions/ | ADRs |
576
577The code is a single crate in three layers — `domain`, `application`, `infrastructure` —
578with dependencies pointing inward. Every use case takes an `Actor` and authorizes before
579any side effect.
580
581## Licence
582
583Copyright (C) 2026 James Gill.
584
585Steid is free software under the **GNU Affero General Public License v3.0** — see
586[LICENSE]LICENSE. You may use, modify and redistribute it, including commercially.
587
588The reason for AGPL rather than a permissive licence is section 13: if you modify Steid
589and offer it to others **over a network**, you must make your modified source available
590to those users. Running an unmodified copy — which is what self-hosting is — carries no
591such obligation. In other words: host it for yourself freely, fork it privately for
592yourself freely, but a modified public service has to share what it changed.
593
594Worth being straightforward about what this does *not* do: it does not stop anyone
595running Steid as a commercial hosted service. AGPL is a copyleft licence, not a
596non-compete.
597