# RepoBrief

repo-brief: TypeScript + Next.js + React. 134 files, 65 source / 36 test / 7 docs.

## Tech stack

- **Languages:** TypeScript, JavaScript
- **Next.js** _(high)_ — dependency "next"; file apps/web/next.config.mjs
- **React** _(medium)_ — dependency "react"

## How to run

- **Build:** `npm run build`
- **Test:** `npm test`

## Entrypoints

- **app:** `apps/web/app/page.tsx` — Next.js app router page

## Architecture

- **web** (31 files) → packages/core
- **core** (31 files)
- **cli** (1 files) → packages/core
- **mcp** (1 files) → packages/core
- **scripts** (1 files)

```mermaid
graph LR
  n0["web (31)"]
  n1["core (31)"]
  n2["cli (1)"]
  n3["mcp (1)"]
  n4["scripts (1)"]
  n0 --> n1
  n2 --> n1
  n3 --> n1
```

## Routes

- `/` — apps/web/app/page.tsx
- `/` — packages/core/fixtures/mini-repo/app/page.tsx
- `/api/briefs` — apps/web/app/api/briefs/route.ts
- `/api/briefs/:id` — apps/web/app/api/briefs/[id]/route.ts
- `/api/briefs/:id/export.md` — apps/web/app/api/briefs/[id]/export.md/route.ts
- `/api/briefs/jobs/:id` — apps/web/app/api/briefs/jobs/[id]/route.ts
- `/api/demo/briefs` — apps/web/app/api/demo/briefs/route.ts
- `/api/demo/seed` — apps/web/app/api/demo/seed/route.ts
- `/briefs/:id` — apps/web/app/briefs/[id]/page.tsx
- `/briefs/:id/architecture` — apps/web/app/briefs/[id]/architecture/page.tsx
- `/briefs/:id/hotspots` — apps/web/app/briefs/[id]/hotspots/page.tsx
- `/briefs/:id/start` — apps/web/app/briefs/[id]/start/page.tsx
- `GET` `/x` — packages/core/src/analyze/routes/handlers.ts
- `POST` `/x` — packages/core/src/analyze/routes/handlers.ts

## Where to start

1. `README.md` — Project overview — what this is and how to run it.
2. `package.json` — Manifest — scripts, dependencies, and entry config.
3. `apps/web/app/page.tsx` — Entry point (app) — where execution begins.
4. `packages/core/src/types.ts` — Core module — 25 files depend on it.
5. `packages/core/src/index.ts` — Core module — 10 files depend on it.
6. `packages/core/src/classify/file-kind.ts` — Core module — 6 files depend on it.
7. `apps/web/lib/brief-id.test.ts` — A test — concrete usage and expected behavior.

_Safe to skip: 4 generated/asset files._

## Hotspots

- `packages/core/src/types.ts` _(score 4)_ — high fan-in (25 importers), no nearby tests. Core module — many files depend on it; change with care.
- `packages/core/src/index.ts` _(score 3)_ — high fan-in (10 importers), high fan-out (18 imports). Core module — many files depend on it; change with care.
- `apps/web/app/api/briefs/[id]/export.md/route.ts` _(score 2)_ — no nearby tests. No tests found — verify behavior before changing.
- `apps/web/app/api/briefs/[id]/route.ts` _(score 2)_ — no nearby tests. No tests found — verify behavior before changing.
- `apps/web/app/api/briefs/jobs/[id]/route.ts` _(score 2)_ — no nearby tests. No tests found — verify behavior before changing.
- `apps/web/app/api/briefs/route.ts` _(score 2)_ — no nearby tests. No tests found — verify behavior before changing.
- `apps/web/app/api/demo/briefs/route.ts` _(score 2)_ — no nearby tests. No tests found — verify behavior before changing.
- `apps/web/app/api/demo/seed/route.ts` _(score 2)_ — no nearby tests. No tests found — verify behavior before changing.
- `apps/web/app/briefs/[id]/layout.tsx` _(score 2)_ — no nearby tests. No tests found — verify behavior before changing.
- `apps/web/app/layout.tsx` _(score 2)_ — no nearby tests. No tests found — verify behavior before changing.
- `apps/web/components/brief-nav.tsx` _(score 2)_ — no nearby tests. No tests found — verify behavior before changing.
- `apps/web/components/mermaid-graph.tsx` _(score 2)_ — no nearby tests. No tests found — verify behavior before changing.
- `apps/web/components/repo-input.tsx` _(score 2)_ — no nearby tests. No tests found — verify behavior before changing.
- `apps/web/lib/store/libsql.ts` _(score 2)_ — no nearby tests. No tests found — verify behavior before changing.
- `apps/web/lib/store/sqlite.ts` _(score 2)_ — no nearby tests. No tests found — verify behavior before changing.

## File breakdown

| Kind | Count |
| --- | ---: |
| source | 65 |
| test | 36 |
| docs | 7 |
| config | 18 |
| workflow | 1 |
| asset | 3 |
| generated | 1 |
| unknown | 3 |

_Generated 2026-06-14T15:16:13.686Z · balanced mode._