# Oxygenhub A forge for [Oxygen](../oxygen) repositories: hosting, browsing, review, issues and releases, in one Rust binary with one data directory. It works like GitHub where GitHub is right and differs where Oxygen's commutative model makes something better possible. The specification is [docs/spec.md](docs/spec.md); deployment notes are in [docs/deploy.md](docs/deploy.md). ## Status Milestones 0.1 (browse) and 0.2 (accounts and access) are done: pages show trees, files, blame, history with the dependency graph, changes with diffs, comparisons, bookmarks, tags, conflicts, the trust policy and the push log; accounts sign in with a password and optional TOTP, create repositories and organisations, hold roles, mint scoped tokens for `oxy`, and link their Oxygen keys so signed changes are attributed to them. Proposals, issues and the rest follow the milestones in the specification. ## Running ``` cargo build --release target/release/oxygenhub --data /srv/oxygenhub init --base-url https://hub.example:7343 --self-signed target/release/oxygenhub --data /srv/oxygenhub admin user create andy --admin target/release/oxygenhub --data /srv/oxygenhub serve ``` Sign in, create a repository under `+ NEW` and a token under Settings › Tokens, then from any checkout: `oxy remote add hub https://hub.example:7343/andy/oxygen`, `oxy config remote.hub.token ` and `oxy push hub`. With a self-signed certificate, hand clients the CA with `OXY_CA=` or `oxy config remote.hub.ca `. Configuration lives in `/hub.toml` (spec §17.1) and every key can be overridden with `OXYHUB_
_`. ## Layout ``` crates/hub the binary: config, db (sqlx + migrations), repos (registry, locks, views), protocol (embedded oxy-server), web (pages), api (JSON), render (markdown, highlighting, diffs, graph) crates/hub-api the JSON API's types, shared with clients templates/ askama templates and the stylesheet assets/ vendored fonts, icons, the small progressive-enhancement script migrations/ under crates/hub; applied at start ``` ## Developing `make check` runs formatting, clippy with warnings as errors, and the tests. The tests use a real `oxy-core` client against a hub on a loopback port and never touch your own Oxygen configuration.