# jasleenkaur-git/firstdraft-hackfluence architecture

> Architecture diagram of the GitHub repository jasleenkaur-git/firstdraft-hackfluence, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jasleenkaur-git/firstdraft-hackfluence
- Repository: https://github.com/jasleenkaur-git/firstdraft-hackfluence

## Overview

FirstDraft is a stateless creator-preparation app. A creator captures a rough idea and receives a structured brief, then can build a usable starting point, assess originality, and scan a post for privacy risks. The sampled pages and API routes show the request paths for these capabilities; the homepage documents the broader workflow, but no direct navigation or data handoff from the brief into the other tools is inferred beyond what the excerpts show. Safety scanning also uses image metadata extraction in the client; its exact transfer path is not shown in the excerpts.

Main entry points: [`app/idea-capture/page.js`](https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/idea-capture/page.js) (Idea capture), [`app/originality-checker/page.js`](https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/originality-checker/page.js) (Originality checker), [`app/api/originality-checker/route.js`](https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/api/originality-checker/route.js) (Originality analysis), [`app/page.js`](https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/page.js) (Home and workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Creator experience"]
  node_home["Home and workflow<br/>[page.js]"]
  node_navigation["Site navigation<br/>[Navbar.js]"]
end

subgraph group_creation["Idea development"]
  node_capture["Idea capture<br/>[page.js]"]
  node_brief["Brief generator<br/>[route.js]"]
  node_starting["Starting point<br/>[page.js]"]
  node_start_api["Starting-point generator<br/>[route.js]"]
end

subgraph group_validation["Idea validation"]
  node_originality["Originality checker<br/>[page.js]"]
  node_originality_api["Originality analysis<br/>[route.js]"]
  node_youtube["YouTube Data API"]
end

subgraph group_privacy["Privacy review"]
  node_safety["Safety scanner<br/>[page.js]"]
  node_safety_api["Safety analysis<br/>[route.js]"]
end

node_creator(("Creator"))
node_models["GitHub Models"]

node_creator -->|"opens"| node_home
node_creator -->|"enters idea"| node_capture
node_capture -->|"requests brief"| node_brief
node_brief -->|"generates brief"| node_models
node_creator -->|"provides details"| node_starting
node_starting -->|"posts details"| node_start_api
node_start_api -->|"generates content"| node_models
node_creator -->|"checks idea"| node_originality
node_originality -->|"posts details"| node_originality_api
node_originality_api -->|"fetches video data"| node_youtube
node_originality_api -->|"analyzes idea"| node_models
node_creator -->|"submits post"| node_safety
node_safety -.->|"requests scan"| node_safety_api
node_safety_api -->|"analyzes risks"| node_models
node_navigation -->|"links home"| node_home
node_home -->|"presents workflow"| node_capture
node_capture -->|"links next step"| node_starting
node_originality -->|"links next step"| node_safety

click node_home "https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/page.js"
click node_navigation "https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/components/Navbar.js"
click node_capture "https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/idea-capture/page.js"
click node_brief "https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/api/generate-brief/route.js"
click node_starting "https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/starting-point/page.js"
click node_start_api "https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/api/starting-point/route.js"
click node_originality "https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/originality-checker/page.js"
click node_originality_api "https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/api/originality-checker/route.js"
click node_safety "https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/safety-scanner/page.js"
click node_safety_api "https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/api/safety-scanner/route.js"

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_home,node_navigation toneBlue
class node_capture,node_brief,node_starting,node_start_api toneAmber
class node_originality,node_originality_api,node_youtube toneMint
class node_safety,node_safety_api toneRose
class node_creator,node_models toneIndigo
```

## Components

### Creator experience

- [Home and workflow](https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/page.js): `app/page.js`
- [Site navigation](https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/components/Navbar.js): `components/Navbar.js`

### Idea development

- [Idea capture](https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/idea-capture/page.js): `app/idea-capture/page.js`
- [Brief generator](https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/api/generate-brief/route.js): `app/api/generate-brief/route.js`
- [Starting point](https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/starting-point/page.js): `app/starting-point/page.js`
- [Starting-point generator](https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/api/starting-point/route.js): `app/api/starting-point/route.js`

### Idea validation

- [Originality checker](https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/originality-checker/page.js): `app/originality-checker/page.js`
- [Originality analysis](https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/api/originality-checker/route.js): `app/api/originality-checker/route.js`
- **YouTube Data API**

### Privacy review

- [Safety scanner](https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/safety-scanner/page.js): `app/safety-scanner/page.js`
- [Safety analysis](https://github.com/jasleenkaur-git/firstdraft-hackfluence/blob/main/app/api/safety-scanner/route.js): `app/api/safety-scanner/route.js`

### Other components

- **Creator**
- **GitHub Models**

## Connections

- Creator → Home and workflow: opens (evidence: `app/page.js`)
- Creator → Idea capture: enters idea (evidence: `app/idea-capture/page.js`)
- Idea capture → Brief generator: requests brief (evidence: `app/api/generate-brief/route.js`)
- Brief generator → GitHub Models: generates brief (evidence: `app/api/generate-brief/route.js`)
- Creator → Starting point: provides details (evidence: `app/starting-point/page.js`)
- Starting point → Starting-point generator: posts details (evidence: `app/starting-point/page.js`)
- Starting-point generator → GitHub Models: generates content (evidence: `app/api/starting-point/route.js`)
- Creator → Originality checker: checks idea (evidence: `app/originality-checker/page.js`)
- Originality checker → Originality analysis: posts details (evidence: `app/originality-checker/page.js`)
- Originality analysis → YouTube Data API: fetches video data (evidence: `app/api/originality-checker/route.js`)
- Originality analysis → GitHub Models: analyzes idea (evidence: `app/api/originality-checker/route.js`)
- Creator → Safety scanner: submits post (evidence: `app/safety-scanner/page.js`)
- Safety scanner → Safety analysis: requests scan
- Safety analysis → GitHub Models: analyzes risks (evidence: `app/api/safety-scanner/route.js`)
- Site navigation → Home and workflow: links home (evidence: `components/Navbar.js`)
- Home and workflow → Idea capture: presents workflow (evidence: `app/page.js`)
- Idea capture → Starting point: links next step (evidence: `app/idea-capture/page.js`)
- Originality checker → Safety scanner: links next step (evidence: `app/originality-checker/page.js`)
