tenseleyflow/shithub / 6ba040d

Browse files

rewrite README with honest scope + status

Authored by espadonne
SHA
6ba040d950a522c862b109d55ed4632802b425db
Parents
176a1c5
Tree
3b4441a

1 changed file

StatusFile+-
M README.md 87 18
README.mdmodified
@@ -1,14 +1,56 @@
1
-# shithub
1
+<p align="center">
2
+  <img src="internal/web/static/logo/shithub-mark.svg" alt="" width="120">
3
+</p>
24
 
3
-GitHub. Open source. Without Copilot.
5
+<h1 align="center">shithub</h1>
46
 
5
-shithub is a feature-complete, self-hostable, AGPL-licensed clone of GitHub. The full experience — repos, issues, pull requests, organizations, actions, social feed, search, settings, ssh & https git protocols — minus the AI integrations.
7
+<p align="center">
8
+  A 1:1 reverse-engineering of GitHub. AGPLv3. Without Copilot.
9
+</p>
610
 
7
-> Status: pre-launch. Not yet hosted. The codebase is currently developed against an embedded plan; expect rapid change.
11
+---
12
+
13
+**Honest status: very much a work in progress.**
14
+
15
+shithub is an attempt to recreate GitHub — the platform, the UI, the workflows — as faithfully as we can, as a self-hostable open-source forge. The goal is "you should barely notice you switched." We are nowhere near that yet. It will be some time before it looks and feels the way GitHub does. There is a lot of GitHub.
16
+
17
+If you came here expecting drop-in parity, it's not ready for you. If you came here to watch (or help) one get built in the open, welcome.
18
+
19
+## What works today
20
+
21
+The core forge loop works end-to-end against the codebase you're reading:
22
+
23
+- **Identity** — email/password signup, email verification, password reset, TOTP 2FA + recovery codes, SSH keys, personal access tokens (scoped), sessions.
24
+- **Repositories** — create, fork, archive, transfer, soft-delete with grace, rename with redirects, visibility toggles, branch protection (force-push / deletion / required reviews / required status checks), default-branch swap, topics, README/license/.gitignore templates.
25
+- **Git** — bare repos on disk; HTTPS smart-HTTP push/pull (SSH service is planned but not shipped yet); pre/post-receive hook integration for size accounting and event emission.
26
+- **Code browsing** — tree, blob (chroma syntax highlighting with light/dark themes), raw, blame, commit history, individual commit views, branch/tag listings, compare views, file finder.
27
+- **Issues & PRs** — full CRUD on issues + comments + labels + milestones + assignees; pull requests with diff rendering, file-by-file review, line comments, reviews (approve/request-changes/comment), required-reviewer enforcement, status-check gates, three merge methods (merge / squash / rebase), conflict detection.
28
+- **Social** — stars, watches with notification level, forks (clone-on-create), `/explore`, stargazer/watcher lists.
29
+- **Search** — code search (path + content, tantivy-equivalent indexing in Postgres), repo search, user search, quick-search.
30
+- **Notifications** — per-user inbox, email fan-out, watch-level routing, one-click HMAC-signed unsubscribe links, auto-subscribe on participation.
31
+- **Organizations & teams** — create, member roles (member/owner), invitations, one-level team nesting, team grants on repos with max-of-sources policy aggregation.
32
+- **Repo settings** — General (description, topics, features, merge methods), Access (collaborators + team grants), Branches (protection rules), Danger (rename/transfer/archive/visibility/delete).
33
+- **Webhooks** — outbound delivery with HMAC-SHA256 signing, exponential backoff with jitter, auto-disable on persistent failure, SSRF defense (DNS resolve + IP block-list + dial-the-IP transport, no redirect-following), redelivery UI, ping events.
34
+
35
+## What doesn't work yet
36
+
37
+Pulled directly from the sprint plan we're working through:
38
+
39
+- **SSH git service** — HTTPS works; the SSH front-end is planned. Use HTTPS clone URLs for now.
40
+- **Actions / CI** — there is no CI runner. Status checks are wired into PR gates so a future runner can publish into them.
41
+- **Packages, Pages, Projects, Releases, Gists** — none of these surfaces exist yet.
42
+- **GraphQL API** — only the internal HTTP surface exists. There is no public REST or GraphQL API.
43
+- **Activity feed** — domain events are recorded but the activity-feed view isn't built.
44
+- **Admin / site-admin surface** — there is no `/admin` UI. Operator tooling is via `shithubd` subcommands and SQL.
45
+- **Visual polish** — most pages render correctly but do not look like GitHub yet. Spacing, typography, header/footer chrome, color tokens, octicon coverage, empty-state illustrations, focus states — all still drifting from Primer. Closing this gap is ongoing; expect rough edges page-to-page.
46
+- **Mobile / responsive** — the current CSS is desktop-first. Small viewports work but aren't tuned.
47
+- **Deferred from completed sprints** — every sprint spec lists "inbound deferrals" that landed and "outbound deferrals" that were pushed forward. See `.docs/sprints/` for the running list.
848
 
949
 ## Why
1050
 
11
-GitHub is a well-built platform with broad feature coverage. The aggressive Copilot push has changed the product's character. shithub aims to recreate the parts that worked while staying honest about what an open-source forge can be.
51
+GitHub is a well-built platform. Microsoft's Copilot push has changed the product's character — particularly around how user code is treated as training data. shithub aims to recreate the parts that worked, on terms that make a self-hosted instance an honest equal to the SaaS experience, with AGPLv3 keeping any hosted variant open.
52
+
53
+The "1:1" goal is intentional. There are plenty of git forges with their own UX vision; shithub deliberately doesn't try to be one of them. The closer the muscle-memory match, the lower the cost of switching.
1254
 
1355
 ## Quickstart (development)
1456
 
@@ -17,32 +59,59 @@ make dev # hot-reload server on http://localhost:8080
1759
 make test         # run tests
1860
 make build        # build bin/shithubd
1961
 make ci           # full CI pipeline locally (mirrors GitHub Actions)
62
+make dev-migrate  # apply DB migrations against $SHITHUB_DATABASE_URL
2063
 ```
2164
 
2265
 Requires:
23
-- Go 1.22+
24
-- `golangci-lint`, `gofumpt`, `goimports`, `air` (installed via `go install` per the Makefile or Homebrew)
66
+- Go 1.22+ (developed against 1.26)
67
+- PostgreSQL 13+
68
+- A local MinIO (or any S3-compatible store) for the storage tests — `make storage-up` brings one up via docker-compose.
69
+- `golangci-lint`, `gofumpt`, `goimports`, `air`, `sqlc`, `goose` (installed via `go install` per the Makefile or your package manager).
70
+
71
+Copy `.env.example` to `.env` and fill in the database URL, session keys, and TOTP/webhook AEAD key.
2572
 
2673
 ## Layout
2774
 
2875
 ```
29
-cmd/shithubd/   # main entry point + subcommands (web, ssh, worker, migrate, version, ...)
30
-internal/       # domain packages (web, auth, repo, git, issues, pulls, ...)
31
-templates/      # html/template files
32
-static/         # css, js, images, logo
33
-migrations/     # SQL migrations
34
-docs/           # public-facing docs
35
-deploy/         # Ansible playbooks + systemd units
76
+cmd/shithubd/        # main entry: web, ssh, worker, migrate, storage, version
77
+internal/auth/       # password, sessions, TOTP, PATs, SSH keys, policy/RBAC
78
+internal/repos/      # repo lifecycle, git ops, branches, tags, diffs, forks
79
+internal/issues/     # issues + comments + labels + milestones
80
+internal/pulls/      # pull requests + reviews + merge orchestration
81
+internal/orgs/       # orgs + teams + member roles + principals
82
+internal/webhook/    # outbound delivery + SSRF defense + signing
83
+internal/notif/      # inbox + email fan-out + watch-level routing
84
+internal/search/     # code/repo/user search
85
+internal/markdown/   # rendering + reference resolution (#N, @user, @org/team)
86
+internal/web/        # HTTP handlers + html/template + middleware
87
+internal/worker/     # Postgres-backed job queue + handlers
88
+internal/migrationsfs/migrations/   # numbered SQL migrations (goose)
89
+.docs/sprints/       # sprint specifications (S00–S49 + SR1)
3690
 ```
3791
 
38
-## License
92
+## Roadmap
93
+
94
+The work is structured as 50 sprints (S00–S49, plus SR1 audit remediation). Roughly:
3995
 
40
-AGPLv3. See [LICENSE](LICENSE).
96
+- **S00–S04** — scaffolding, DB baseline, web shell, observability, storage abstractions ✅
97
+- **S05–S09** — identity (auth, 2FA, SSH keys, PATs, profiles) ✅
98
+- **S10–S20** — repos, git protocols, code browsing, branches/tags, hooks ✅ (SSH service deferred)
99
+- **S21–S25** — issues, pulls, reviews, status checks, markdown ✅
100
+- **S26–S29** — social, forks, search, notifications ✅
101
+- **S30–S33** — orgs, teams, repo settings, webhooks ✅ (current)
102
+- **S34–S40** — site admin, security hardening, federation, polish, accessibility, i18n
103
+- **S41–S49** — actions/CI, social feed, advanced search, GraphQL API, packages, pages, projects, releases, gists
41104
 
42
-## Status
105
+See `.docs/sprints/` for the per-sprint spec.
43106
 
44
-Pre-launch. See [CONTRIBUTING.md](CONTRIBUTING.md) for the current contribution posture.
107
+## Contributing
108
+
109
+See [CONTRIBUTING.md](CONTRIBUTING.md). The project is in active rapid development — substantial PRs are best discussed in an issue first so we don't both write the same code. Small fixes, doc improvements, and bug reports are welcome any time.
45110
 
46111
 ## Security
47112
 
48113
 To report a security issue, see [SECURITY.md](SECURITY.md). Please do not open a public issue for security reports.
114
+
115
+## License
116
+
117
+[AGPLv3](LICENSE). If you run a modified version as a network service, your users are entitled to the source.