update readme

AuthorKonata <konata@posteo.jp>
Date
Commit11d9a629a141be935fc6de9cc6f6e864fd08d746
Parent4b37f3c
1 file changed, 65 insertions(+), 58 deletions(-)
MREADME.md
@@ -1,28 +1,29 @@
11 # Hearthforge ![](public/assets/favicon.svg)
2+
23 ![](preview.png)
34
4-A self-hosted git forge designed to host your own repositories, but allow others to interact with them via issues and patch proposals.
5-Frontend works without any JS at all enabled, just required for WebAuthn (with graceful fallback to password-only).
5+A self-hosted git forge designed to host your own repositories while allowing others to interact with them via issues and patch proposals.
6+The frontend works without JavaScript — JS is only required for WebAuthn, with a graceful fallback to password-only auth.
67
78 ## Features
89
9-- **Repository browser** — file tree, directly edit single files, blob view, commit log, markdown rendering, media previews
10-- **Issues** — create, comment, react
11-- **Patches** — submit git .patch files for review & comments. Admin can merge applicable patches directly into the repository.
12-- **Templates** — issue/patch templates
13-- **Releases** — releases with source archives, extra uploaded assets, and optional tag creation
10+- **Repository browser** — integrated file tree, single-file editing, blob view, commit log, markdown rendering, media previews
11+- **Issues & patches** — create, comment, react with emoji; submit git `.patch` files for review and merge them directly from the UI
12+- **Labels** — per-repo labels with custom colors; optionally allow users to label their own issues and patches
13+- **Templates** — issue and patch templates per repository
14+- **Releases** — create releases with source archives (zip/tar.gz), uploaded assets, and optional tag creation
1415 - **SSH push/pull** — built-in SSH server, no external git daemon needed
1516 - **Auth** — password login or passkeys (WebAuthn/FIDO2)
16-- **Commit signing** — merged patches and filed edited through the UI are automatically signed and verification badges are shown in the commit list view
17-- **Optional registration** — others can create accounts to file issues and patches; can be disabled, or put in queue mode where the admin manually approves new accounts.
17+- **Commit signing** — patches merged and files edited through the UI are automatically signed; verification badges shown in the commit log
18+- **Registration control** — open registration, disabled, or queue mode where the admin manually approves new accounts
1819
1920 ## Stack
2021
2122 - [Bun](https://bun.sh) — runtime and package manager
2223 - [ElysiaJS](https://elysiajs.com) — HTTP framework
23-- SQLite — single-file database via Kysely
24-- Server-side JSX via @kitajs/html (no client-side framework)
25-- Shiki — syntax highlighting
24+- [SQLite](https://www.sqlite.org) — single-file database via [Kysely](https://kysely.dev)
25+- [@kitajs/html](https://github.com/kitajs/html) — server-side JSX (no client-side framework)
26+- [Shiki](https://shiki.style) — syntax highlighting
2627
2728 ## Running
2829
@@ -33,71 +34,77 @@ bun run start # http://localhost:3000, SSH on port 2222
3334 ```
3435
3536 Default admin credentials: `admin` / `changeme`
37+Set the `ADMIN_PASSWORD` environment variable **before** running `db:init` to choose your own.
3638
37-## Manual repository interactions
39+### Docker / Podman
3840
39-Existing Repositories can be copied manually to the `data/repos` directory.
40-Non-bare repos are automatically converted to bare repos on startup, discarding uncomitted changes and worktrees.
41-Pushing directly to the repositories (i.e. not through the bundled http/ssh endpoints) should generally works as well.
41+A `Containerfile` and `compose.yml` are provided:
4242
43-### Docker / Podman
44-Container image and compose file are provided.
4543 ```bash
46-docker compose up # or
47-podman compose up
44+docker compose up # or podman compose up
4845 ```
4946
50-### Configuration
47+The container stores all persistent data (repos, database, avatars, releases, SSH host key) under `/data` — mount a volume there to keep it across restarts.
5148
52-All settings are environment variables:
49+### Manual repository import
50+
51+Existing repositories can be copied into the `data/repos` directory.
52+Non-bare repos are automatically converted to bare repos on startup (uncommitted changes and worktrees are discarded).
53+Pushing directly to the on-disk repositories (bypassing the bundled HTTP/SSH endpoints) generally works as well.
5354
54-| Variable | Default | Description |
55-|-------------------------|----------------------------------|--------------------------------------------------------------------------------|
56-| `PORT` | `3000` | HTTP port |
57-| `SSH_PORT` | `2222` | SSH port |
58-| `DATA_DIR` | `./data` | Repos, database, uploads |
59-| `ADMIN_PASSWORD` | `changeme` | Initial admin password |
60-| `OWNER_DISPLAY_NAME` | `Admin` | Display name for the owner |
61-| `BASE_URL` | `http://localhost:3000` | Used in clone URLs and links |
62-| `REGISTRATION_TYPE` | `enabled` | Registration mode: `enabled`, `disabled`, or `queue` (requires admin approval) |
63-| `REGISTER_QUESTION` | _(empty)_ | Question shown on the registration form when `REGISTRATION_TYPE=queue` |
64-| `MAX_UPLOAD_BYTES` | `10485760` | Max request body size (any uploads/requests) |
65-| `MAX_USER_UPLOAD_BYTES` | `2097152` | Max request body size (user uploads) |
66-| `INLINE_MAX_BYTES` | `524288` | Max file size to render inline in the file view |
67-| `SSH_DISABLED` | `0` | Disable the embedded SSH-server |
68-| `TRUSTED_PROXY` | `0` | Trust `X-Forwarded-For` |
69-| `RATE_LIMIT_DISABLED` | `0` | Set to `1` to disable rate limiting |
70-| `HIGHLIGHT_WORKERS` | `4` | Number of syntax highlighting workers* |
71-| `COMMITTER_NAME` | `$OWNER_DISPLAY_NAME` | Git committer name used when merging patches or editing files through the UI |
72-| `COMMITTER_EMAIL` | `$OWNER_DISPLAY_NAME@<hostname>` | same as above but for email |
73-| `MAX_TITLE_BYTES` | `500` | Max length for titles (issues, patches, releases) |
74-| `MAX_TEXT_BODY_BYTES` | `100000` | Max length for text bodies (issue/patch descriptions, comments, release notes) |
75-| `MAX_USERNAME_BYTES` | `64` | Max length for usernames at registration |
76-| `MAX_PASSWORD_BYTES` | `1024` | Max length for passwords at registration and password change |
77-
78-\* More workers mean more CPU cores can be used to parallelize highlighting of files.
79-Because of the language grammars, which can't be shared across workers, the memory usage per worker is quite high, at about 200MB.
80-So be careful when increasing this.
8155 ### SSH access
8256
83-Add your public key under Settings → SSH keys, then clone with:
57+Add your public key under **Settings → SSH keys**, then:
8458
8559 ```
86-git clone ssh://git@localhost:{SSH_PORT}/{REPO_NAME}
60+git clone ssh://git@localhost:2222/REPO_NAME
8761 ```
8862
89-Pushing is also supported for the admin.
63+Pushing is supported for the admin.
64+
65+### Configuration
66+
67+All settings are environment variables:
68+
69+| Variable | Default | Description |
70+|------------------------------|----------------------------------|-------------------------------------------------------------|
71+| `PORT` | `3000` | HTTP port |
72+| `SSH_PORT` | `2222` | SSH port |
73+| `DATA_DIR` | `./data` | Repos, database, uploads |
74+| `ADMIN_PASSWORD` | `changeme` | Initial admin password (only used by `db:init`) |
75+| `OWNER_DISPLAY_NAME` | `Admin` | Display name for the owner |
76+| `BASE_URL` | `http://localhost:$PORT` | Used in clone URLs and links |
77+| `REGISTRATION_TYPE` | `enabled` | `enabled`, `disabled`, or `queue` (admin approval) |
78+| `REGISTER_QUESTION` | _(empty)_ | Question shown on the registration form in `queue` mode |
79+| `MAX_UPLOAD_BYTES` | `10485760` | Max request body size (10 MB) |
80+| `MAX_USER_UPLOAD_BYTES` | `2097152` | Max upload size for non-admin users (2 MB) |
81+| `INLINE_MAX_BYTES` | `524288` | Max file size rendered inline in the code view (512 KB) |
82+| `SSH_DISABLED` | `0` | Set to `1` to disable the embedded SSH server |
83+| `TRUSTED_PROXY` | `0` | Trust `X-Forwarded-For` headers |
84+| `RATE_LIMIT_DISABLED` | `0` | Set to `1` to disable rate limiting |
85+| `HIGHLIGHT_WORKERS` | `4` | Syntax highlighting worker threads \* |
86+| `COMMITTER_NAME` | `$OWNER_DISPLAY_NAME` | Git committer name for merges and UI edits |
87+| `COMMITTER_EMAIL` | `$OWNER_DISPLAY_NAME@<hostname>` | Git committer email for merges and UI edits |
88+| `SSH_HOST_KEY_PATH` | `$DATA_DIR/ssh_host_key` | Path to the SSH host key (auto-generated if missing) |
89+| `EXTRA_ALLOWED_SIGNERS_PATH` | _(empty)_ | Additional git allowed-signers file for commit verification |
90+| `MAX_TITLE_BYTES` | `500` | Max length for titles (issues, patches, releases) |
91+| `MAX_TEXT_BODY_BYTES` | `100000` | Max length for text bodies (descriptions, comments, notes) |
92+| `MAX_USERNAME_BYTES` | `64` | Max username length at registration |
93+| `MAX_PASSWORD_BYTES` | `1024` | Max password length |
94+
95+\* Each highlighting worker loads its own copy of the language grammars and uses ~200 MB of memory. Increase with care.
9096
9197 ## Development
9298
9399 ```bash
94-bun run dev # watch mode
95-bun run lint # Biome lint
96-bun run format # Biome format
97-bun run test # Run E2E and unit tests (don't use bun test directly, it doesn't respect the timeout)
100+bun run dev # watch mode with auto-restart
101+bun run lint # lint with Biome
102+bun run format # format with Biome
103+bun run test # E2E and unit tests (uses Playwright; don't call bun test directly)
98104 ```
99105
100106 ## Roadmap
107+
101108 - Use [git-bug](https://github.com/git-bug/git-bug) for issue tracking instead of custom implementation
102-- more repository manipulation through the UI, e.g. file/directory/branch creation, renaming and deletion
103-- remove test retry logic when bun doesn't randomly get stuck anymore
109+- More repository manipulation through the UI — file/directory/branch creation, renaming, and deletion
110+- Remove test retry logic once Bun no longer randomly stalls