kitgit

tirbofish/kitgit · diff

4fd30a2 · Thribhu K

docs: further docs

Verified

diff --git a/README.md b/README.md
index 65abac4..164cd03 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,8 @@
 # kitgit
 
-Self-hosted git. Templates, not a product page.
+a minimalistic git frontend built in Rust and pure HTML templates.
 
-Authentication is **Authentik OIDC only** — there is no local/dev password bypass.
-
-## Docker Compose
+## Deployment
 
 ```bash
 cd deploy
@@ -19,72 +17,12 @@ docker compose up -d --build
 | kitgit SSH | localhost:2222 |
 | Authentik | http://localhost:9000 |
 
-### Authentik bootstrap
-
-Compose sets:
-
-- user: `akadmin`
-- password: value of `AUTHENTIK_BOOTSTRAP_PASSWORD` (default `kitgit-admin-change-me`)
-
-A blueprint at `deploy/authentik/blueprints/kitgit-oidc.yaml` creates the **kitgit** OAuth2 application (client id `kitgit`, redirect `http://localhost:8080/auth/callback`).
-
-After Authentik is up, apply/confirm the blueprint if needed:
-
-```bash
-docker compose exec authentik-worker ak apply_blueprint /blueprints/custom/kitgit-oidc.yaml
-```
-
-Then open http://localhost:8080/auth/login → Authentik → kitgit.
-
-### Site admins
-
-- The **first** successful OIDC login becomes a site admin automatically.
-- Site admins open **/admin** and can grant/revoke admin for any user.
-
-## Environment
-
-| Variable | Purpose |
-|----------|---------|
-| `KITGIT_DATABASE_URL` | Postgres |
-| `KITGIT_DATA_DIR` | Repos, avatars, SSH host key, releases |
-| `KITGIT_HTTP_BIND` / `KITGIT_SSH_BIND` | Listen addresses |
-| `KITGIT_PUBLIC_URL` | Public base URL for clone links |
-| `KITGIT_SESSION_SECRET` | Session cookie secret |
-| `KITGIT_OIDC_ISSUER` | Public issuer (browser), e.g. `http://localhost:9000/application/o/kitgit/` |
-| `KITGIT_OIDC_DISCOVERY_URL` | Discovery URL (defaults to issuer) |
-| `KITGIT_OIDC_CLIENT_ID` / `SECRET` / `REDIRECT_URL` | OIDC client |
-
 ## Build
 
 ```bash
 cargo build --release
 ```
 
-## Backup
-
-- Postgres: `pg_dump` the `kitgit` database.
-- Data dir: bare repos, avatars, releases, SSH host key.
-
-## DigitalOcean (production)
-
-Minimal single-Droplet deploy under the **personal** project:
-
-| Resource | Value |
-|----------|-------|
-| Droplet | `kitgit` · `s-2vcpu-4gb` · `syd1` · Docker 1-Click |
-| Sites | https://git.tirbo.fish · https://auth.tirbo.fish |
-| Git SSH | `git.tirbo.fish:2222` |
-| Cost | ~$24/mo (droplet only; no managed DB/LB/registry) |
-
-On the droplet, the stack lives in `/opt/kitgit` and is started with:
-
-```bash
-cd /opt/kitgit/deploy
-docker compose up -d --build
-```
-
-Prod files: `deploy/docker-compose.prod.yml`, `deploy/Caddyfile`, `deploy/.env.prod.example`, `deploy/authentik/blueprints-prod/`.
-
-## Brand
+## Docs
 
-See `brand/index.html`. Mark glyph is **狐**.
+check out the documentation in the [docs](docs) folder.
\ No newline at end of file
diff --git a/README2.md b/README2.md
deleted file mode 100644
index 52412a1..0000000
--- a/README2.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# kitgit
-
-a minimalistic git frontend build in Rust and pure HTML templates, allowing for blazing fast (how cliche) loading times and high performance.  
-
-## deployment
-
-```bash
-cd deploy
-cp .env.example .env
-# edit secrets if you want
-docker compose up -d --build
-```
-
-find kitgit at [localhost:8080](http://localhost:8080).
-
diff --git a/docs/authentik.md b/docs/authentik.md
new file mode 100644
index 0000000..3617215
--- /dev/null
+++ b/docs/authentik.md
@@ -0,0 +1,21 @@
+# Authentik
+
+Compose sets:
+
+- user: `akadmin`
+- password: value of `AUTHENTIK_BOOTSTRAP_PASSWORD` (default `kitgit-admin-change-me`)
+
+A blueprint at `deploy/authentik/blueprints/kitgit-oidc.yaml` creates the **kitgit** OAuth2 application (client id `kitgit`, redirect `http://localhost:8080/auth/callback`).
+
+After Authentik is up, apply/confirm the blueprint if needed:
+
+```bash
+docker compose exec authentik-worker ak apply_blueprint /blueprints/custom/kitgit-oidc.yaml
+```
+
+Then open http://localhost:8080/auth/login → Authentik → kitgit.
+
+## Site admins
+
+- The **first** successful OIDC login becomes a site admin automatically.
+- Site admins open **/admin** and can grant/revoke admin for any user.
diff --git a/docs/backup.md b/docs/backup.md
new file mode 100644
index 0000000..ad82761
--- /dev/null
+++ b/docs/backup.md
@@ -0,0 +1,4 @@
+# Backup
+
+- Postgres: `pg_dump` the `kitgit` database.
+- Data dir: bare repos, avatars, releases, SSH host key.
diff --git a/docs/brand.md b/docs/brand.md
new file mode 100644
index 0000000..389411a
--- /dev/null
+++ b/docs/brand.md
@@ -0,0 +1,3 @@
+# Brand
+
+See `brand/index.html`. Mark glyph is **狐**.
diff --git a/docs/environment.md b/docs/environment.md
new file mode 100644
index 0000000..38f5c55
--- /dev/null
+++ b/docs/environment.md
@@ -0,0 +1,12 @@
+# Environment
+
+| Variable | Purpose |
+|----------|---------|
+| `KITGIT_DATABASE_URL` | Postgres |
+| `KITGIT_DATA_DIR` | Repos, avatars, SSH host key, releases |
+| `KITGIT_HTTP_BIND` / `KITGIT_SSH_BIND` | Listen addresses |
+| `KITGIT_PUBLIC_URL` | Public base URL for clone links |
+| `KITGIT_SESSION_SECRET` | Session cookie secret |
+| `KITGIT_OIDC_ISSUER` | Public issuer (browser), e.g. `http://localhost:9000/application/o/kitgit/` |
+| `KITGIT_OIDC_DISCOVERY_URL` | Discovery URL (defaults to issuer) |
+| `KITGIT_OIDC_CLIENT_ID` / `SECRET` / `REDIRECT_URL` | OIDC client |
diff --git a/docs/production.md b/docs/production.md
new file mode 100644
index 0000000..8399381
--- /dev/null
+++ b/docs/production.md
@@ -0,0 +1,19 @@
+# Production (DigitalOcean)
+
+Minimal single-Droplet deploy under the **personal** project:
+
+| Resource | Value |
+|----------|-------|
+| Droplet | `kitgit` · `s-2vcpu-4gb` · `syd1` · Docker 1-Click |
+| Sites | https://git.tirbo.fish · https://auth.tirbo.fish |
+| Git SSH | `git.tirbo.fish:2222` |
+| Cost | ~$24/mo (droplet only; no managed DB/LB/registry) |
+
+On the droplet, the stack lives in `/opt/kitgit` and is started with:
+
+```bash
+cd /opt/kitgit/deploy
+docker compose up -d --build
+```
+
+Prod files: `deploy/docker-compose.prod.yml`, `deploy/Caddyfile`, `deploy/.env.prod.example`, `deploy/authentik/blueprints-prod/`.