CRUD rules with pattern (exact or glob like release/*), requirePR, blockForcePush, bypass user list Enforcement via pkt-line parsing inside the git HTTP handler — before any data reaches git http-backend, each ref update is extracted and checked against stored rules Direct push to main with requirePR: true → 403 with message; push to unprotected branches still works Inline checkboxes in the UI update rules immediately Branching model — stored config: GET/PUT per repo, defaults to feature/bugfix/release/hotfix prefixes Toggle enabled/disabled, custom prefix per type with live preview No enforcement (naming guide only, as Bitbucket does) Merge strategies — enforced in PR merge endpoint: GET/PUT per repo, defaults all three allowed Merge handler now accepts strategy: "merge"|"squash"|"rebase" in request body, checks against stored policy Disallowed strategy → 409 with clear error; allowed strategy → merges and fires pull_request webhook Must have at least one strategy enabled (validated server-side) Webhooks — full delivery with HMAC: CRUD with title, URL, secret (optional), events (push/pull_request/issue), active toggle Test button sends live HTTP POST to the configured URL and shows status code in UI FireWebhooks() fires asynchronously from PR merge and can be called from any handler X-ForgeBucket-Signature-256: sha256=<hmac> header when secret is set Last delivery status and timestamp stored on webhook record and shown in list
ForgeBucket 🛡️🪣
Sovereign Federation meets Enterprise Design.
ForgeBucket is a production-ready, federated git collaboration platform. It combines the high-performance, lightweight Go engine of Forgejo with the sophisticated, high-density UI/UX of Bitbucket, optimized for a "Responsive-First, Access Anywhere" experience.
🚀 The Vision
ForgeBucket aims to provide developers with a world-class code review and project management experience without sacrificing data sovereignty. It bridges the gap between community-driven open-source software and enterprise-grade usability.
- Engine: Built on the Forgejo/Gitea ecosystem.
- Interface: Powered by Atlassian Design System (ADS) principles.
- Connectivity: Full ActivityPub (ForgeFed) integration for a decentralized git world.
🛠️ Tech Stack
Backend & Core
- Language: Go (Golang) 1.21+
- Database: PostgreSQL with XORM
- Git Engine: Native System Git Binary execution
- CI/CD: Forgejo Actions (gRPC protocol)
Frontend & UX
- Framework: React 18+ (Embedded in Go binary)
- Styling: Tailwind CSS + Atlassian Design Tokens
- Components: Custom implementation of Atlaskit primitives
- Real-time: WebSockets for live logs and notifications
✨ Key Features
- Responsive Navigation: A triple-state sidebar (Expanded, Collapsed, Mobile Bottom-Bar) that adheres to an 8px grid system.
- Advanced Diff Viewer: Side-by-side and unified views with "Bottom Sheet" comment overlays for mobile code reviews.
- Federated Pull Requests: Interaction across different ForgeBucket/Forgejo instances via ActivityPub.
- AGit "Quick Edit": Web-based file editing with automatic
refs/for/branch creation for instant PRs. - Skeleton Loading: Optimized "Perceived Performance" using pulsate loading states for metadata.
🔒 Security & Compliance
- OWASP Top 10 Compliance: Strict protection against XSS, CSRF, and SQLi.
- Command Sanitization: Hardened wrapper for all Git binary executions.
- Identity: OIDC and OAuth2 support with Row-Level Security (RLS) mentalities.
- Auditability: Full logging of all administrative and git-over-HTTP actions.
🏁 Getting Started
Prerequisites
- Go 1.21 or higher
- Node.js 18+ (for frontend development)
- PostgreSQL 14+
- System Git 2.20+
Installation
- Clone the repository:
git clone [https://github.com/your-repo/forgebucket.git](https://github.com/your-repo/forgebucket.git)
cd forgebucket
- Setup Frontend:
cd frontend
npm install
npm run build
- Build the Binary:
cd ..
go build -o forgebucket main.go
- Run:
./forgebucket web
🤝 Contributing
We follow the "Responsive-First" contribution model. Please ensure all UI changes are tested on both Desktop (1440px) and Mobile (375px) breakpoints.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details. Portions of the code are derived from Forgejo (GPLv3).