OXYGENHUB
# 19bb31ff1f5c oxygenhub / README.md
2.3 KiB · Markdown · last changed Milestone 0.2: accounts and access 1 month ago renderedsource blame history raw
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
12
Milestones 0.1 (browse) and 0.2 (accounts and access) are done: pages show
13
trees, files, blame, history with the dependency graph, changes with diffs,
14
comparisons, bookmarks, tags, conflicts, the trust policy and the push log;
15
accounts sign in with a password and optional TOTP, create repositories and
16
organisations, hold roles, mint scoped tokens for `oxy`, and link their
17
Oxygen keys so signed changes are attributed to them. Proposals, issues and
18
the rest follow the milestones in the specification.
19
20
## Running
21
22
```
23
cargo build --release
24
target/release/oxygenhub --data /srv/oxygenhub init --base-url https://hub.example:7343 --self-signed
25
target/release/oxygenhub --data /srv/oxygenhub admin user create andy --admin
26
target/release/oxygenhub --data /srv/oxygenhub serve
27
```
28
29
Sign in, create a repository under `+ NEW` and a token under Settings ›
30
Tokens, then from any checkout: `oxy remote add hub https://hub.example:7343/andy/oxygen`,
31
`oxy config remote.hub.token <token>` and `oxy push hub`. With a self-signed certificate, hand clients the CA with
32
`OXY_CA=<path>` or `oxy config remote.hub.ca <path>`.
33
34
Configuration lives in `<data>/hub.toml` (spec §17.1) and every key can be
35
overridden with `OXYHUB_<SECTION>_<KEY>`.
36
37
## Layout
38
39
```
40
crates/hub        the binary: config, db (sqlx + migrations), repos (registry, locks, views),
41
                  protocol (embedded oxy-server), web (pages), api (JSON), render (markdown,
42
                  highlighting, diffs, graph)
43
crates/hub-api    the JSON API's types, shared with clients
44
templates/        askama templates and the stylesheet
45
assets/           vendored fonts, icons, the small progressive-enhancement script
46
migrations/       under crates/hub; applied at start
47
```
48
49
## Developing
50
51
`make check` runs formatting, clippy with warnings as errors, and the tests.
52
The tests use a real `oxy-core` client against a hub on a loopback port and
53
never touch your own Oxygen configuration.