# monteduro/killmyidea architecture

> Architecture diagram of the GitHub repository monteduro/killmyidea, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/monteduro/killmyidea
- Repository: https://github.com/monteduro/killmyidea

## Overview

Kill My Idea is a web app that evaluates a submitted startup idea and presents a KILL, FIX, or SHIP verdict. The main flow runs from the browser form through the evaluation API, which asks Jev questions via TypeSafe and turns the answers into a scored, clarity-gated result. Users can review and share results, keep private browser history, and view aggregate statistics; successful evaluations are archived unless opted out. The graph follows documented calls and imports; unsampled details are represented only where the README documents the capability.

Main entry points: [`src/App.tsx`](https://github.com/monteduro/killmyidea/blob/main/src/App.tsx) (App flow), [`api/evaluate.ts`](https://github.com/monteduro/killmyidea/blob/main/api/evaluate.ts) (Evaluation endpoint), [`src/components/Result.tsx`](https://github.com/monteduro/killmyidea/blob/main/src/components/Result.tsx) (Result view), [`src/lib/evaluate.ts`](https://github.com/monteduro/killmyidea/blob/main/src/lib/evaluate.ts) (Evaluation composition)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["App flow<br/>[App.tsx]"]
  node_idea_form["Idea form<br/>[IdeaForm.tsx]"]
  node_judging["Judging view<br/>[Judging.tsx]"]
  node_result["Result view<br/>[Result.tsx]"]
  node_history_ui["History drawer<br/>[HistoryDrawer.tsx]"]
  node_stats_ui["Stats modal<br/>[StatsModal.tsx]"]
  node_share_ui["Share actions<br/>[ShareActions.tsx]"]
end

subgraph group_evaluation["Evaluation logic"]
  node_evaluation_logic["Evaluation composition<br/>[evaluate.ts]"]
  node_question_set["Jev questions<br/>[questions.ts]"]
  node_scoring["Weighted scoring<br/>[scoring.ts]"]
  node_verdict["Verdict thresholds<br/>[verdict.ts]"]
  node_share_logic["Share formatting<br/>[share.ts]"]
end

subgraph group_services["API and integrations"]
  node_evaluation_api["Evaluation endpoint<br/>[evaluate.ts]"]
  node_typesafe_client["TypeSafe client<br/>[typesafe.ts]"]
  node_typesafe_service{{"TypeSafe Jev"}}
  node_mock["Mock evaluator<br/>[_mock.ts]"]
  node_stats_api["Stats endpoint<br/>[stats.ts]"]
  node_stats_client["Stats client<br/>[stats.ts]"]
end

subgraph group_data["Persistence and analytics"]
  node_archive[("Evaluation archive<br/>[_analytics-db.ts]")]
  node_history_store["History store<br/>[storage.ts]"]
  node_analytics_client["Event tracking<br/>[analytics.ts]"]
end

node_user(("Idea submitter"))
node_browser_storage[("Browser localStorage")]
node_datafast{{"DataFast"}}

node_user -->|"enters idea"| node_idea_form
node_app -->|"renders"| node_idea_form
node_app -->|"renders"| node_judging
node_app -->|"renders"| node_result
node_app -->|"POSTs evaluation"| node_evaluation_api
node_evaluation_api -->|"validates and composes"| node_evaluation_logic
node_evaluation_api -->|"selects questions"| node_question_set
node_evaluation_api -->|"requests judgment"| node_typesafe_client
node_evaluation_api -->|"uses in local mock mode"| node_mock
node_typesafe_client -->|"sends questions"| node_typesafe_service
node_evaluation_logic -->|"normalizes and averages"| node_scoring
node_evaluation_logic -->|"selects dimensions"| node_question_set
node_evaluation_logic -->|"reads answer types"| node_typesafe_client
node_evaluation_logic -->|"gets verdict"| node_verdict
node_evaluation_api -->|"archives unless opted out"| node_archive
node_app -->|"loads and saves history"| node_history_store
node_history_store -->|"reads and writes"| node_browser_storage
node_app -->|"renders"| node_history_ui
node_app -->|"fetches stats"| node_stats_client
node_stats_client -->|"requests stats"| node_stats_api
node_stats_api -->|"reads aggregates"| node_archive
node_app -->|"renders"| node_stats_ui
node_app -->|"tracks submission"| node_analytics_client
node_analytics_client -->|"sends cookieless event"| node_datafast
node_result -->|"renders"| node_share_ui
node_result -->|"formats share content"| node_share_logic
node_share_ui -->|"uses share text"| node_share_logic
node_result -->|"shows score breakdown"| node_scoring
node_result -->|"labels verdict"| node_verdict
node_history_ui -->|"displays stored ideas"| node_history_store

click node_app "https://github.com/monteduro/killmyidea/blob/main/src/App.tsx"
click node_idea_form "https://github.com/monteduro/killmyidea/blob/main/src/components/IdeaForm.tsx"
click node_judging "https://github.com/monteduro/killmyidea/blob/main/src/components/Judging.tsx"
click node_result "https://github.com/monteduro/killmyidea/blob/main/src/components/Result.tsx"
click node_history_ui "https://github.com/monteduro/killmyidea/blob/main/src/components/HistoryDrawer.tsx"
click node_stats_ui "https://github.com/monteduro/killmyidea/blob/main/src/components/StatsModal.tsx"
click node_share_ui "https://github.com/monteduro/killmyidea/blob/main/src/components/ShareActions.tsx"
click node_evaluation_api "https://github.com/monteduro/killmyidea/blob/main/api/evaluate.ts"
click node_evaluation_logic "https://github.com/monteduro/killmyidea/blob/main/src/lib/evaluate.ts"
click node_question_set "https://github.com/monteduro/killmyidea/blob/main/src/lib/questions.ts"
click node_scoring "https://github.com/monteduro/killmyidea/blob/main/src/lib/scoring.ts"
click node_verdict "https://github.com/monteduro/killmyidea/blob/main/src/lib/verdict.ts"
click node_typesafe_client "https://github.com/monteduro/killmyidea/blob/main/src/lib/typesafe.ts"
click node_mock "https://github.com/monteduro/killmyidea/blob/main/api/_mock.ts"
click node_stats_api "https://github.com/monteduro/killmyidea/blob/main/api/stats.ts"
click node_stats_client "https://github.com/monteduro/killmyidea/blob/main/src/lib/stats.ts"
click node_archive "https://github.com/monteduro/killmyidea/blob/main/api/_analytics-db.ts"
click node_history_store "https://github.com/monteduro/killmyidea/blob/main/src/lib/storage.ts"
click node_analytics_client "https://github.com/monteduro/killmyidea/blob/main/src/lib/analytics.ts"
click node_share_logic "https://github.com/monteduro/killmyidea/blob/main/src/lib/share.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_idea_form,node_judging,node_result,node_history_ui,node_stats_ui,node_share_ui toneBlue
class node_evaluation_logic,node_question_set,node_scoring,node_verdict,node_share_logic,node_browser_storage toneAmber
class node_evaluation_api,node_typesafe_client,node_typesafe_service,node_mock,node_stats_api,node_stats_client toneMint
class node_archive,node_history_store,node_analytics_client toneRose
class node_user,node_datafast toneIndigo
```

## Components

### User experience

- [App flow](https://github.com/monteduro/killmyidea/blob/main/src/App.tsx): `src/App.tsx`
- [Idea form](https://github.com/monteduro/killmyidea/blob/main/src/components/IdeaForm.tsx): `src/components/IdeaForm.tsx`
- [Judging view](https://github.com/monteduro/killmyidea/blob/main/src/components/Judging.tsx): `src/components/Judging.tsx`
- [Result view](https://github.com/monteduro/killmyidea/blob/main/src/components/Result.tsx): `src/components/Result.tsx`
- [History drawer](https://github.com/monteduro/killmyidea/blob/main/src/components/HistoryDrawer.tsx): `src/components/HistoryDrawer.tsx`
- [Stats modal](https://github.com/monteduro/killmyidea/blob/main/src/components/StatsModal.tsx): `src/components/StatsModal.tsx`
- [Share actions](https://github.com/monteduro/killmyidea/blob/main/src/components/ShareActions.tsx): `src/components/ShareActions.tsx`

### Evaluation logic

- [Evaluation composition](https://github.com/monteduro/killmyidea/blob/main/src/lib/evaluate.ts): `src/lib/evaluate.ts`
- [Jev questions](https://github.com/monteduro/killmyidea/blob/main/src/lib/questions.ts): `src/lib/questions.ts`
- [Weighted scoring](https://github.com/monteduro/killmyidea/blob/main/src/lib/scoring.ts): `src/lib/scoring.ts`
- [Verdict thresholds](https://github.com/monteduro/killmyidea/blob/main/src/lib/verdict.ts): `src/lib/verdict.ts`
- [Share formatting](https://github.com/monteduro/killmyidea/blob/main/src/lib/share.ts): `src/lib/share.ts`

### API and integrations

- [Evaluation endpoint](https://github.com/monteduro/killmyidea/blob/main/api/evaluate.ts): `api/evaluate.ts`
- [TypeSafe client](https://github.com/monteduro/killmyidea/blob/main/src/lib/typesafe.ts): `src/lib/typesafe.ts`
- **TypeSafe Jev**
- [Mock evaluator](https://github.com/monteduro/killmyidea/blob/main/api/_mock.ts): `api/_mock.ts`
- [Stats endpoint](https://github.com/monteduro/killmyidea/blob/main/api/stats.ts): `api/stats.ts`
- [Stats client](https://github.com/monteduro/killmyidea/blob/main/src/lib/stats.ts): `src/lib/stats.ts`

### Persistence and analytics

- [Evaluation archive](https://github.com/monteduro/killmyidea/blob/main/api/_analytics-db.ts): `api/_analytics-db.ts`
- [History store](https://github.com/monteduro/killmyidea/blob/main/src/lib/storage.ts): `src/lib/storage.ts`
- [Event tracking](https://github.com/monteduro/killmyidea/blob/main/src/lib/analytics.ts): `src/lib/analytics.ts`

### Other components

- **Idea submitter**
- **Browser localStorage**
- **DataFast**

## Connections

- Idea submitter → Idea form: enters idea (evidence: `README.md`)
- App flow → Idea form: renders (evidence: `src/App.tsx`)
- App flow → Judging view: renders (evidence: `src/App.tsx`)
- App flow → Result view: renders (evidence: `src/App.tsx`)
- App flow → Evaluation endpoint: POSTs evaluation (evidence: `src/App.tsx`)
- Evaluation endpoint → Evaluation composition: validates and composes (evidence: `api/evaluate.ts`)
- Evaluation endpoint → Jev questions: selects questions (evidence: `api/evaluate.ts`)
- Evaluation endpoint → TypeSafe client: requests judgment (evidence: `api/evaluate.ts`)
- Evaluation endpoint → Mock evaluator: uses in local mock mode (evidence: `api/evaluate.ts`)
- TypeSafe client → TypeSafe Jev: sends questions (evidence: `src/lib/typesafe.ts`)
- Evaluation composition → Weighted scoring: normalizes and averages (evidence: `src/lib/evaluate.ts`)
- Evaluation composition → Jev questions: selects dimensions (evidence: `src/lib/evaluate.ts`)
- Evaluation composition → TypeSafe client: reads answer types (evidence: `src/lib/evaluate.ts`)
- Evaluation composition → Verdict thresholds: gets verdict (evidence: `src/lib/evaluate.ts`)
- Evaluation endpoint → Evaluation archive: archives unless opted out (evidence: `api/evaluate.ts`)
- App flow → History store: loads and saves history (evidence: `src/App.tsx`)
- History store → Browser localStorage: reads and writes (evidence: `src/lib/storage.ts`)
- App flow → History drawer: renders (evidence: `src/App.tsx`)
- App flow → Stats client: fetches stats (evidence: `src/App.tsx`)
- Stats client → Stats endpoint: requests stats (evidence: `README.md`)
- Stats endpoint → Evaluation archive: reads aggregates (evidence: `api/stats.ts`)
- App flow → Stats modal: renders (evidence: `src/App.tsx`)
- App flow → Event tracking: tracks submission (evidence: `src/App.tsx`)
- Event tracking → DataFast: sends cookieless event (evidence: `README.md`)
- Result view → Share actions: renders (evidence: `src/components/Result.tsx`)
- Result view → Share formatting: formats share content (evidence: `src/components/Result.tsx`)
- Share actions → Share formatting: uses share text (evidence: `src/components/ShareActions.tsx`)
- Result view → Weighted scoring: shows score breakdown (evidence: `src/components/Result.tsx`)
- Result view → Verdict thresholds: labels verdict (evidence: `src/components/Result.tsx`)
- History drawer → History store: displays stored ideas (evidence: `src/components/HistoryDrawer.tsx`)
