This repository contains the specification and Vite React UI for a realtime Git log viewer.
docs/spec-v0.md: initial architecture and product design.apps/ui/: Vite React UI for the viewer (the product's main interface).AGENTS.md: contributor and agent guidance for future work.
When implementation begins, separate source code by runtime:
apps/web/for the browser UI.apps/api/orserver/for the Git-reading backend.tests/or colocated*.test.tsfiles for automated tests.docs/for specifications, architecture notes, and operational guidance.
Use pnpm from the repository root. The root pnpm-lock.yaml is the only dependency lockfile.
pnpm install: install workspace dependencies.pnpm dev: start the UI.pnpm build: build the UI.pnpm audit --audit-level high: check for high-severity dependency issues.
No test or lint script is configured yet. Add scripts before documenting them as required checks.
Use TypeScript for web/API code unless the project adopts another language. Prefer clear names over abbreviations.
- Components:
PascalCase, for exampleCommitTimeline.tsx. - Hooks:
useSomething, for exampleuseGitEvents.ts. - Utilities and services:
camelCaseexports in descriptive files, for examplegitCommandRunner.ts. - Documentation files: lowercase kebab-case, for example
security-model.md.
Keep comments focused on why a choice exists, especially around Git edge cases and diff limits.
Add tests with the first implementation code. Prioritize coverage for Git command parsing, ref snapshot comparison, event classification, and API input validation.
Suggested naming:
- Unit tests:
*.test.ts - Integration tests:
*.integration.test.ts
Include fixtures for representative Git histories: fast-forward commits, merge commits, rewritten branches, deleted refs, and large diffs.
Use concise, imperative commit messages:
Add initial API server scaffoldImplement ref snapshot comparisonDocument SSE event contract
Pull requests should include a short summary, verification steps, linked issue or task when available, and screenshots for UI changes. Call out security-sensitive changes, especially repository path handling, command execution, authentication, and private data display.
Never accept arbitrary repository paths from clients. Resolve repoId through a server-side allowlist. Run Git commands with argument arrays, timeouts, and bounded output. Do not log secrets, tokens, private repository contents, or unnecessary author email data.