Browser extension + web dashboard that captures developer session context and generates AI-powered session reports.
A Chrome extension (Manifest V3) silently records the pages a developer opens during a coding session — URLs, titles, page metadata, tags, optionally the music they listen to — and ships them to a Next.js dashboard. The dashboard renders a per-session timeline and asks an LLM to summarize each session into a structured Markdown report.
See docs/Task.md for the full specification, acceptance criteria, and four-week roadmap.
worktrace/
├─ dashboard/ Next.js 16 web app (App Router) + API routes + Prisma
├─ extension/ Chrome Manifest V3 extension (Vite + @crxjs/vite-plugin)
├─ docs/ Project specification (Task.md)
├─ plans/ Per-AC implementation plans (Plan → Review → Implement)
├─ .claude/skills/ Task recipes for the AI assistant
├─ CLAUDE.md AI agent rules (architecture invariants)
└─ docker-compose.yml Local PostgreSQL for development
The two apps are isolated — extension/ never imports from dashboard/ and vice versa. They communicate over HTTP only.
- Dashboard — Next.js 16 (App Router, Server Components), React 19, Tailwind CSS v4, TanStack Query v5, Framer Motion, D3.js
- Backend — Next.js Route Handlers, Prisma 7 (with
@prisma/adapter-pg), Zod,google-auth-library,jose - Extension — Manifest V3, Vite 7 +
@crxjs/vite-plugin, TypeScript (strict) - Database — PostgreSQL 16 (Docker for local, Neon for production)
- AI — Groq (
llama-3.3-70b-versatile), з можливістю вказати власний API ключ у налаштуваннях - Deploy — Vercel (dashboard),
.zipдля локального завантаження extension
Versions in dashboard/package.json and extension/package.json are authoritative.
- Node.js 20 or newer
- Docker Desktop (or Docker Engine + Compose plugin)
- Chrome 120+ (for loading the unpacked extension)
git clone https://github.com/BODMAT/worktrace.git
cd worktrace
cp dashboard/.env.example dashboard/.env
cp extension/.env.example extension/.envThe dashboard .env contains DATABASE_URL (already pointing at the docker-compose Postgres) plus GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, JWT_SECRET, GROQ_API_KEY, and CRON_SECRET. See comments in .env.example for how to generate each value.
docker-compose up -dThis boots a worktrace-postgres container on host port 5433 (mapped to container 5432, so it won't collide with a local Postgres on 5432). The DATABASE_URL in dashboard/.env.example already uses this port.
cd dashboard
npm install
npx prisma migrate dev
npm run devThe dashboard is now at http://localhost:3000. The npm run dev step also implicitly runs prisma generate on first build, materializing the Prisma client and Zod schemas into dashboard/generated/ (both gitignored).
cd extension
npm install
npm run buildThen in Chrome:
- Open
chrome://extensions - Toggle Developer mode (top right)
- Click Load unpacked
- Select
extension/dist/
The extension card should appear with no errors. For HMR-rebuild during active development use npm run dev instead of npm run build.
Download worktrace-extension.zip from the latest GitHub Release, then:
- Unzip to any folder
- Open
chrome://extensions→ Developer mode → Load unpacked - Select the unzipped folder
No .env needed — the production dashboard URL and OAuth client ID are baked into the release build.
-
Dashboard — відкрий
http://localhost:3000, натисни "Sign in with Google" → має відкритись/dashboardз даними. -
Extension — картка на
chrome://extensionsбез помилок; іконка в тулбарі відкриває popup; сервіс воркер логує[worktrace] installed(видно через Inspect посилання розширення). -
API — Bearer токен з extension працює:
curl -X POST http://localhost:3000/api/v1/events \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <jwt-from-extension-storage>" \ -d '{"sessionId":"<active-session-id>","url":"https://github.com","title":"Test","timestamp":"2026-06-01T10:00:00Z"}'
Відповідь
201означає що dashboard, Prisma і Postgres з'єднані коректно.
- docs/Task.md — full acceptance criteria, weekly roadmap, git workflow
- CLAUDE.md — AI agent rules: architecture invariants, type-safety constraints, import boundaries
- .claude/skills/ — task recipes (
api-route.md,prisma-model.md,extension-message.md) - plans/ — per-AC implementation plans authored before each commit (the Plan → Review → Implement loop)
- Dashboard — Vercel with Root Directory:
dashboard. The build commandprisma generate && next build(declared indashboard/package.json) regenerates the Prisma client at build time sincedashboard/generated/is gitignored. Production database is Neon. - Extension —
npm run zipinsideextension/builds and packagesdist/intoworktrace-extension.zip. Load unpacked in Chrome via Developer mode.