| d23464c0 Andy McCall ↶ |
1 |
# Oxygenhub |
| 2 |
|
| 3 |
A forge for [Oxygen](../oxygen) repositories: hosting, browsing, review, |
| 4 |
issues and releases, in one Rust binary with one data directory. It works |
| 5 |
like GitHub where GitHub is right and differs where Oxygen's commutative |
| 6 |
model makes something better possible. The specification is |
| 7 |
[docs/spec.md](docs/spec.md); deployment notes are in |
| 8 |
[docs/deploy.md](docs/deploy.md). |
| 9 |
|
| 10 |
## Status |
| 11 |
|
| 18e381ea Andy McCall ↶ |
12 |
Milestones 0.1 (browse), 0.2 (accounts and access), 0.3 (proposals and |
| 3f4b0ea6 Andy McCall ↶ |
13 |
review), 0.4 (issues and notifications), 0.5 (API, webhooks, checks) and |
| 14 |
0.6 (web edits, releases, mirror, code search) are done: pages show |
| 19bb31ff Andy McCall ↶ |
15 |
trees, files, blame, history with the dependency graph, changes with diffs, |
| 16 |
comparisons, bookmarks, tags, conflicts, the trust policy and the push log; |
| 17 |
accounts sign in with a password and optional TOTP, create repositories and |
| 18 |
organisations, hold roles, mint scoped tokens for `oxy`, and link their |
| de505df5 Andy McCall ↶ |
19 |
Oxygen keys so signed changes are attributed to them; proposals offer a |
| 20 |
bookmark's changes for another with the resulting state, diff and conflicts |
| 21 |
computed before landing, comments anchored to atoms, approvals backed by |
| 18e381ea Andy McCall ↶ |
22 |
seals, and landing from the hub or from `oxy proposal land`; issues with |
| 23 |
labels, assignees, milestones, cross references and closing keywords; an |
| 24 |
inbox with watching, subscriptions, mentions and optional email; search |
| b64e2537 Andy McCall ↶ |
25 |
over issues, proposals, repositories and accounts; a JSON API for all of |
| 26 |
it with scoped tokens, webhooks with signed deliveries and retries, and |
| 3f4b0ea6 Andy McCall ↶ |
27 |
checks on state hashes that gate landing; editing and conflict resolution |
| 28 |
in the browser, signed by the hub as your delegate; releases with assets |
| 29 |
and source archives; a read-only Git mirror for Git-only tools; and code |
| 30 |
search. The runner follows in 0.7. |
| d23464c0 Andy McCall ↶ |
31 |
|
| 32 |
## Running |
| 33 |
|
| 34 |
``` |
| 35 |
cargo build --release |
| 36 |
target/release/oxygenhub --data /srv/oxygenhub init --base-url https://hub.example:7343 --self-signed |
| 19bb31ff Andy McCall ↶ |
37 |
target/release/oxygenhub --data /srv/oxygenhub admin user create andy --admin |
| d23464c0 Andy McCall ↶ |
38 |
target/release/oxygenhub --data /srv/oxygenhub serve |
| 39 |
``` |
| 40 |
|
| 19bb31ff Andy McCall ↶ |
41 |
Sign in, create a repository under `+ NEW` and a token under Settings › |
| 42 |
Tokens, then from any checkout: `oxy remote add hub https://hub.example:7343/andy/oxygen`, |
| 43 |
`oxy config remote.hub.token <token>` and `oxy push hub`. With a self-signed certificate, hand clients the CA with |
| d23464c0 Andy McCall ↶ |
44 |
`OXY_CA=<path>` or `oxy config remote.hub.ca <path>`. |
| 45 |
|
| 46 |
Configuration lives in `<data>/hub.toml` (spec §17.1) and every key can be |
| 47 |
overridden with `OXYHUB_<SECTION>_<KEY>`. |
| 48 |
|
| 49 |
## Layout |
| 50 |
|
| 51 |
``` |
| 52 |
crates/hub the binary: config, db (sqlx + migrations), repos (registry, locks, views), |
| 53 |
protocol (embedded oxy-server), web (pages), api (JSON), render (markdown, |
| 54 |
highlighting, diffs, graph) |
| 55 |
crates/hub-api the JSON API's types, shared with clients |
| 56 |
templates/ askama templates and the stylesheet |
| 57 |
assets/ vendored fonts, icons, the small progressive-enhancement script |
| 58 |
migrations/ under crates/hub; applied at start |
| 59 |
``` |
| 60 |
|
| 61 |
## Developing |
| 62 |
|
| 63 |
`make check` runs formatting, clippy with warnings as errors, and the tests. |
| 64 |
The tests use a real `oxy-core` client against a hub on a loopback port and |
| 65 |
never touch your own Oxygen configuration. |