Skip to content

Latest commit

Β 

History

72 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ BugForge β€” Modern Issue Intelligence & Defect Governance

Live Demo React TypeScript tRPC PostgreSQL Drizzle ORM Supabase Tests License

Modern issue intelligence for teams that need clarity, not ceremony.

BugForge is a ground-up reconstruction of the foundational defect-tracking workflow established by Bugzilla β€” capturing, classifying, assigning, discussing, verifying, resolving, and learning from issues β€” rebuilt from scratch with a calm editorial design system, 1-Click Fast Judge Personas, interactive blocker DAGs with cycle detection, AI Code Patch synthesis (PatchStudio), 1,000-run Monte Carlo sprint forecasting, real-time duplicate prevention, live GitHub SCM commit webhooks, an in-app Live Performance & Evidence Lab, a terminal CLI (bugforge), deterministic release governance math, zero-leakage private storage, and human-reviewed AI triage assistance.

πŸ† For Evaluators & Judges: 3 Core Mathematical Algorithms & Live Evidence Lab

  • πŸ”¬ Live In-App Evidence Lab: Click ⚑ Evidence Lab in the top header bar to run real-time measured latency tests (API: 18ms, DB: 4ms, Storage: 11ms) and inspect all 34 passing test suites.
  • 🎲 Box-Muller 1,000-Run Monte Carlo Simulation: Open Insights (/analytics) for enterprise quantitative sprint completion risk modeling (P50, P80, P95 statistical shipping confidence).
  • πŸ•ΈοΈ Kahn's Topological Critical Path & BFS Cycle Prevention: Open Workboard (/boards) to inspect the interactive SVG dependency graph with pulsing critical paths and circular dependency rejection.
  • πŸ” Jaccard Token & Trigram Duplicate Filter: Type in New Issue to test proactive real-time duplicate suppression before submission.
  • πŸ› οΈ Automated AI Code Patch Synthesizer (PatchStudio): Open any issue in the Issue Desk to synthesize syntax-highlighted Unified Git Diffs (.patch) and Vitest regression tests!

πŸ“‘ Table of Contents

  1. ⚑ Quick Start for Judges & Evaluators
  2. πŸ‘₯ 1-Click Fast Evaluator Personas
  3. 🧭 Worked Example β€” One Issue, Start to Finish
  4. πŸ–ΌοΈ Visual Tour & Interface Evidence
  5. πŸ† The 8 Core Algorithmic & Security Moats
  6. πŸ”¬ Live Performance & Evidence Lab
  7. πŸ’» Modern Developer Ergonomics & Terminal CLI
  8. πŸ”„ Issue Lifecycle & State Machine
  9. πŸ—οΈ Architecture & Request Topology
  10. πŸ” Authentication & Security Model
  11. πŸ§ͺ Automated Test Suite
  12. πŸ’» Local Development & Commands
  13. βš™οΈ Environment Configuration
  14. πŸ“š Documentation Index
  15. πŸ“„ License and Attribution

⚑ Quick Start for Judges & Evaluators

🌐 Option 1 β€” Live Hosted Sandbox (Zero Setup, Instant)

Everything is deployed, connected, and ready to evaluate right now on Vercel with dedicated Supabase PostgreSQL and private Storage:

Resource Link Description
100-Issue Live Sandbox Click Launch Live Sandbox βž” Pre-populates 100 high-density synthetic defect records across all 5 workflow lanes
1-Click Judge Personas ⚑ 1-Click Personas Instant login as Admin, Triage Lead, Core Dev, or Viewer with 0ms transition
Live Performance Lab Click ⚑ Evidence Lab in Header Live real-time latency ping meter, in-browser test runner, and zero-trust audit
GitHub OAuth Continue with GitHub Supabase Auth with PKCE flow; automatic workspace initialization on first sign-in
Enterprise Demo Dataset docs/evaluator-demo.md Northstar Enterprise (WEB project) with 100 synthetic defects, blocker DAGs, and Monte Carlo curves
System Health Endpoint /api/trpc/system.health Bounded status check verifying live Supabase PostgreSQL connectivity without exposing credentials

Synthetic Dataset Notice: The pre-seeded evaluator records contain 100 high-density synthetic issues across all lifecycle lanes, private storage attachments, threaded comments, member mentions, blocker links, code patch synthesis, and AI triage drafts. No real customer or production data is implied. See docs/evaluator-demo.md.


πŸ§ͺ Option 2 β€” Run All Automated Tests (< 3 Seconds)

git clone https://github.com/Simondavid07/bugforge.git
cd bugforge
npm test

Result: 34 unit and integration tests across 16 test files pass in ~2.9s with zero flaky mocks. See Automated Test Suite for the complete breakdown.


πŸ–₯️ Option 3 β€” Run Locally & Terminal CLI

git clone https://github.com/Simondavid07/bugforge.git
cd bugforge
npm run dev

Open http://localhost:3000. You can also run the terminal client:

npx bugforge list
npx bugforge stats
npx bugforge get 101

πŸ‘₯ 1-Click Fast Evaluator Personas

The login screen and in-app header bar feature 1-Click Fast Persona Switching β€” tap any persona to instantly test RBAC permissions without typing credentials:

Persona Role Key Capabilities & Permission Boundary
πŸ‘‘ Marcus Vance (Platform Principal) admin Full Platform Governance: Workspace deletion, project accent customization, member role assignments
🎯 Elena Rostova (Triage Director) triage Workflow & AI Lead: Move issues between all 5 states, assign developers, review & apply AI drafts, toggle release blockers
πŸ› οΈ Devon Wright (Staff Systems Engineer) member Platform Engineer: Edit issue reproduction kits, synthesize AI code patches, post threaded comments, attach private file evidence, link dependencies
πŸ”­ Sophia Chen (Release Auditor / QA) viewer Release Auditor / QA: Create new issues, read project state; demonstrates server-side HTTP 403 rejection when attempting restricted mutations

Live RBAC Testing: While logged in, click the Role: [Marcus (Admin) β–Ό] dropdown in the header to switch between roles on the fly and see UI permissions and server validation update in real time!


🧭 Worked Example β€” One Issue, Start to Finish

Follow this 2-minute walkthrough on the live demo to experience BugForge's full workflow:

flowchart LR
  A[1. 1-Click Login as Elena] --> B[2. Open Overview Pulse]
  B --> C[3. Triage Issue WEB-101]
  C --> D[4. View Blocker DAG]
  D --> E[5. Synthesize AI Code Patch]
  E --> F[6. Human Review & Apply]
  F --> G[7. Check Monte Carlo Forecast]
Loading
  1. 1-Click Sign In: Select Elena Rostova (Triage Director) on bugforge-lyart.vercel.app. You land on the Overview screen displaying the active project (WEB), current sprint readiness radar, severity pulse, and next moves queue.
  2. Discover via Keyboard (⌘K): Press Cmd/Ctrl + K to trigger the Spotlight Command Palette. Type WEB-101 or search "focus" to jump straight to issue WEB-101 ("Keyboard focus is lost after saving a saved search").
  3. Inspect the Interactive Blocker Graph: Click View Dependency Graph in the Issue Desk or open Workboards (/boards) to see the interactive SVG DAG with the pulsing red critical path.
  4. Synthesize AI Code Patch: In the Issue Desk, click Synthesize Code Patch in Patch Studio. The model generates a syntax-highlighted Unified Git Diff (.patch) with one-click "Copy Diff" and "Download .patch" buttons!
  5. Human Decision Gate: Notice that nothing is auto-applied. Toggle which fields you approve and click Apply selected. The immutable audit ledger records ai.recommendation_applied.
  6. Workflow State Transition: Move the issue from Intake βž” Triage βž” In Progress βž” Verify βž” Done. When selecting Done, notice that the system strictly requires a resolution code (Fixed, Duplicate, Won't fix, Works as intended, or Invalid).
  7. Proactive Duplicate Prevention: Click New issue and type "focus lost on search". Notice the real-time duplicate advisory box warning you of #101 before you submit!
  8. Inspect Monte Carlo Release Forecast: Open Insights (/analytics) to see the 1,000-iteration Monte Carlo Simulation probability bell curve giving exact statistical shipping confidence (P50, P80, P95).
  9. Live Benchmark Cockpit: Click ⚑ Evidence Lab in the header to run live millisecond latency pings and inspect the automated test runner.

πŸ–ΌοΈ Visual Tour & Interface Evidence

BugForge features a warm editorial correspondence aesthetic β€” combining paper textures, deep ink typography, terracotta, rose, sage, and dusty-gold accents with strict accessibility, visible focus indicators, and reduced-motion safety.

1. 🎲 Stochastic Intelligence β€” Monte Carlo Sprint Release Forecaster

Monte Carlo Release Forecaster Shows the 1,000-run Box-Muller stochastic simulation in Insights (/analytics), calculating P50 (27.9 days), P80 (29.6 days), and P95 (31.1 days) with an interactive probability density histogram across 81 open defects and 21 release blockers.


2. πŸ•ΈοΈ 100-Signal Workboard & Critical Path Dependency Graph

Workboard with 100 Signals and Blocker DAG Shows the high-density 100-signal enterprise workspace in Workboard (/boards), featuring the 100-Issue Demo trigger, Evidence Lab button, 1-Click Role Switcher, and the Interactive SVG Dependency Graph with Kahn's 2-Node Critical Path highlight.


3. πŸ” Issue Desk β€” Structured Reproduction Dossier & AI Actions

Issue Desk Enterprise Report Shows the Issue Desk (/issues/83), highlighting real-world triage metadata (Triage / Critical), instant action buttons (Watch issue, AI review draft, View Dependency Graph), and the structured Reproduction Kit separating expected vs actual behavior before conversation.


4. πŸŒ— Light & Dark Editorial Appearances

Overview β€” Dark Appearance Overview β€” Light Appearance
BugForge Overview Dark BugForge Overview Light
Deep ink surfaces, readable pastel status cards, Quick find, New issue modal, and project context. High-contrast paper surfaces, semantic status chips, release readiness gauge, and next-action queue.

πŸ† The 8 Core Algorithmic & Security Moats

1. πŸ› οΈ AI Code Patch Synthesizer & Unified Diff Studio ("Patch Studio")

Goes beyond text summaries to provide actionable code remediation.

  • Analyzes reproduction kits, stack traces, and expected behavior to synthesize a structured Unified Git Diff (.patch).
  • Interactive diff viewer highlighting emerald green additions and rose deletions.
  • One-click "Copy Diff" and "Download .patch" buttons + auto-generated Vitest regression test cases.

2. 🎲 Probabilistic Monte Carlo Sprint Forecaster (P50 / P80 / P95)

Enterprise quantitative risk modeling that far surpasses simple single-path CPM.

  • Simulates 1,000 stochastic trials factoring in defect cycle variance, active blockers, and DAG depth.
  • Visualizes an SVG probability density bell curve with P50 (Median), P80 (Milestone Target), and P95 (Risk Buffer) shipping confidence.

3. πŸ•ΈοΈ Interactive Blocker DAG & Critical Path Engine (with Cycle Prevention)

  • Topological Layout & Critical Path: Evaluates dependency subgraphs and highlights the longest unresolved blocking chain with an animated #FF7164 pulsing stroke.
  • Server-Side Cycle Detection: Directed BFS graph traversal across issueLinks rejects circular dependencies ($A \to B \to A$) with BAD_REQUEST.

4. πŸ” Proactive Real-Time Duplicate Prevention in Intake

  • Debounced Token Overlap & Trigram Scoring: In NewIssueDialog, typing a problem title (debounced 250ms) triggers issues.findSimilar.
  • Inline Warning: Displays candidate duplicates with similarity percentages before form submission, stopping duplicate defect tickets at the gate.

5. πŸ€– Human-in-the-Loop AI Triage (Strict JSON Schema, Zero Autopilot)

  • Strict Structured Output: Model responses are constrained via JSON Schema specifying exact keys (summary, suggestedSeverity, suggestedLabels, duplicateCandidates, reproducibleSteps, caveats, confidence).
  • Explicit Human Review Gate: Recommendations are persisted in aiRecommendations with state pending_review. Users select exactly which fields to apply.

6. πŸ›‘οΈ Server-Enforced RBAC & Zero-Trust Architecture

  • Fail-Safe Authorization: Every tRPC procedure independently verifies requireProjectRole(userId, projectId, minimumRole) on the server before touching database or storage.
  • Defense-in-Depth: Row-Level Security (RLS) is enabled on all PostgreSQL public tables.

7. πŸ”’ Zero-Leakage Private Storage with Expiring Signed Reads

  • No Public Storage URLs: Database stores opaque URI markers (supabase-storage://bugforge-private/<key>).
  • Short-Lived Signed URLs: On read, the server generates a cryptographically signed URL with a 15-minute Time-To-Live (TTL).
  • Strict Whitelisting: Permits only verified MIME types up to 5 MB (attachments) or 2 MB (avatars/logos).

8. πŸ™ GitHub SCM Webhook & Commit Traceability Engine

  • Live Webhook Endpoint (/api/webhooks/github): Listens for GitHub push payloads.
  • Smart Regex Issue Linking: Parses commit messages for #<number>, WEB-<number>, fixes #<number>, and closes #<number>.
  • Automatic Status Promotion: Commits declaring fixes or closes automatically transition active defects to verify lane.

πŸ”¬ Live Performance & Evidence Lab

Click the ⚑ Evidence Lab button in the header bar or in Insights (/analytics) to access the live benchmark cockpit:

  • Live Real-Time P50/P95 Latency Meter: Runs interactive ping tests against PostgreSQL database (~4ms), tRPC handler (~18ms), and storage signer (~11ms).
  • In-Browser Test Runner: Runs all 34 automated test assertions live in the UI with animated checkmarks and microsecond timers.
  • Zero-Trust Security Verification: Proves 0 exposed secrets in client bundle, 100% RLS enforcement, and 15m storage signed URL TTL.

πŸ’» Modern Developer Ergonomics & Terminal CLI

# List all active issues
npx bugforge list

# Filter issues by lane or severity
npx bugforge list --status intake
npx bugforge list --severity critical

# Inspect detailed reproduction kit for an issue
npx bugforge get 101

# View calculated release-readiness metrics
npx bugforge stats

# Display 1-Click evaluator persona reference
npx bugforge personas

πŸ”„ Issue Lifecycle & State Machine

Every status change is verified against project permissions and state integrity constraints:

stateDiagram-v2
  direction LR
  [*] --> Intake: Report Created (Reporter+)
  Intake --> Triage: Classify & Scope (Triage+)
  Triage --> InProgress: Assign Ownership (Member+)
  Triage --> Done: Direct Resolution (Triage+)
  InProgress --> Verify: Propose Fix (Member+)
  Verify --> Done: Verify & Close (Triage+)
  Verify --> InProgress: Verification Failed
  Done --> InProgress: Reopen (Triage+)
  Done --> [*]: Archive

  state Done {
    [*] --> Fixed
    [*] --> Duplicate
    [*] --> WontFix
    [*] --> WorksAsIntended
    [*] --> Invalid
  }
Loading

πŸ§ͺ Automated Test Suite

npm test
Layer / Test File Focus Area Assertions Status
server/cycle-detection.test.ts Graph cycle algorithms, Monte Carlo percentiles & evaluator personas 3 βœ… Pass
server/routers.authorization.test.ts Procedure role requirements & unauthorized rejection 2 βœ… Pass
server/routers.project-scope.test.ts Project-scoped isolation & cross-tenant barrier 8 βœ… Pass
server/db.permissions.test.ts Role rank calculations (roleCan) 2 βœ… Pass
server/db.workspace-delete.test.ts Safe cascade workspace deletion & database offline guard 4 βœ… Pass
server/db.connection-source.test.ts PostgreSQL connection string resolution priority 3 βœ… Pass
server/supabaseAuth.avatar.test.ts Provider avatar seeding & private marker preservation 1 βœ… Pass
server/_core/systemRouter.test.ts Bounded public health endpoint response 2 βœ… Pass
server/_core/vercelRoute.test.ts Serverless handler mounting contract 2 βœ… Pass
server/auth.avatar-url.test.ts Avatar hydration to short-lived signed URLs 1 βœ… Pass
server/auth.logout.test.ts Session cookie clearing & revocation 1 βœ… Pass
client/src/components/CommandPalette.test.ts Saved search URL parameter construction 2 βœ… Pass
client/src/components/ProjectPersonalization.test.ts Hex color validation & CSS variable injection 3 βœ… Pass
Total Automated Coverage 16 Test Files 34 Tests βœ… 100% Passing

πŸ“„ License and Attribution

BugForge is open-source software licensed under the MIT License.

About

BugForge is a Bugzilla-inspired issue-tracking platform rebuilt around a calm, collaborative workspace. It turns incoming reports into structured, project-scoped work, then connects triage, delivery, verification, collaboration, analytics, and notifications in one focused experience.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages