feat: concept mind map extraction from interview knowledge documents
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Epic
Part of #25 — Study Tools
## Problem
Uploaded documents are long and dense. Users have no structured overview of key concepts or how they relate — they must read linearly, which is slow and produces a weak mental model.
## Impact
A visual concept graph lets users instantly see which topics matter, how they connect, and where to focus. Critical for quickly onboarding to an unfamiliar company or domain before an interview.
## Proposed Code (High Level)
**Backend**
```python
# backend/app/routers/study.py
POST /study/mindmap
body: { job_id: int, doc_id: int | None }
# 1. Retrieve all chunks for doc (or top-k across job docs)
# 2. Prompt Claude:
# "Extract key concepts and relationships. Return JSON:
# { nodes: [{id, label, group}], edges: [{source, target, label}] }
# Max 20 nodes."
# 3. Cache on MindMap table keyed by (job_id, doc_id, content_hash)
# — avoids regeneration unless doc changes
GET /study/mindmap?job_id=&doc_id= # returns cached graph or 404
```
**New DB model**
```python
class MindMap(Base):
id, job_id (FK), doc_id (FK nullable), content_hash,
graph_json (Text/JSONB), created_at
```
**Frontend — Study Hub**
- Render with `reactflow` (MIT, ~60 kB gzipped) or `d3-force`
- Nodes are clickable → side panel shows the source chunk
- Regenerate button (only active if doc was re-uploaded)
## Functionality Impact
- Read-only display feature — no user data modified
- Content-hash caching: LLM called once per document version
- `reactflow` is the only new frontend dependency
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.