# karlo-i/notes_taking_app architecture

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

- Interactive diagram: https://gitdiagram.com/karlo-i/notes_taking_app
- Repository: https://github.com/karlo-i/notes_taking_app

## Overview

This is a personal note-taking and reflection app whose main workflow classifies a submitted note, sends it through an optional critic review, then embeds and integrates approved notes into a topic-linked memory bank. Users can also retrieve that knowledge to generate Q&A documents, narration scripts, and summaries; task management, search, analytics, and account access are additional product areas. The sampled code confirms key route and data-access relationships, while several capabilities are represented from the README or module index; those unsampled links are not inferred beyond documented flows.

Main entry points: [`schema.sql`](https://github.com/karlo-i/notes_taking_app/blob/main/schema.sql) (PostgreSQL), [`app_factory.py`](https://github.com/karlo-i/notes_taking_app/blob/main/app_factory.py) (Flask App), [`review.py`](https://github.com/karlo-i/notes_taking_app/blob/main/review.py) (Critic Review), [`notes.py`](https://github.com/karlo-i/notes_taking_app/blob/main/notes.py) (Notes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Note Capture"]
  node_notes["Notes<br/>[notes.py]"]
  node_classification["Note Classification<br/>[classify.py]"]
  node_review["Critic Review<br/>[review.py]"]
  node_critic["AI Critic<br/>[critic.py]"]
end

subgraph group_knowledge["Memory and Retrieval"]
  node_integration["Note Integration<br/>[integration.py]"]
  node_topics["Topic Extraction<br/>[topics.py]"]
  node_embeddings["Embeddings<br/>[embeddings.py]"]
  node_retrieval["Knowledge Retrieval<br/>[retrieval.py]"]
  node_generation["Output Generation<br/>[generate.py]"]
end

subgraph group_product["User Features"]
  node_outputs["Saved Outputs<br/>[outputs.py]"]
  node_todos["To-Do Management<br/>[todos.py]"]
  node_search["Global Search<br/>[search.py]"]
  node_analytics["Analytics<br/>[analytics_bp.py]"]
  node_dashboard["Dashboard UI<br/>[App.tsx]"]
  node_admin["Administration<br/>[admin.py]"]
end

subgraph group_platform["Access and Data"]
  node_auth["OAuth Access<br/>[oauth.py]"]
  node_email_auth["Email Access<br/>[email_auth.py]"]
  node_app["Flask App<br/>[app_factory.py]"]
  node_database[("PostgreSQL<br/>[schema.sql]")]
end

node_user(("User"))

node_user -->|"submits notes"| node_notes
node_notes -->|"classifies"| node_classification
node_notes -->|"starts review"| node_review
node_review -->|"requests critique"| node_critic
node_review -->|"integrates approval"| node_integration
node_review -->|"embeds approved notes"| node_embeddings
node_review -->|"extracts topics"| node_topics
node_notes -->|"reads and writes"| node_database
node_review -->|"reads and writes"| node_database
node_topics -->|"reads and writes"| node_database
node_user -->|"requests output"| node_outputs
node_outputs -->|"generates output"| node_generation
node_generation -->|"retrieves context"| node_retrieval
node_retrieval -->|"embeds query"| node_embeddings
node_retrieval -->|"searches notes"| node_database
node_outputs -->|"stores outputs"| node_database
node_user -->|"manages tasks"| node_todos
node_todos -->|"reads and writes"| node_database
node_user -->|"searches content"| node_search
node_search -->|"searches records"| node_database
node_dashboard -.->|"displays metrics"| node_analytics
node_analytics -->|"reads metrics"| node_database
node_user -->|"signs in"| node_auth
node_user -->|"registers or signs in"| node_email_auth
node_auth -->|"upserts identity"| node_database
node_email_auth -->|"reads and writes"| node_database
node_app -->|"registers routes"| node_auth
node_app -->|"registers routes"| node_email_auth
node_app -->|"registers routes"| node_notes
node_app -->|"registers routes"| node_review
node_app -->|"registers routes"| node_outputs
node_app -->|"registers routes"| node_todos
node_app -->|"registers routes"| node_search
node_app -->|"registers routes"| node_analytics
node_app -->|"registers routes"| node_admin
node_admin -->|"reads and writes"| node_database

click node_notes "https://github.com/karlo-i/notes_taking_app/blob/main/notes.py"
click node_classification "https://github.com/karlo-i/notes_taking_app/blob/main/classify.py"
click node_review "https://github.com/karlo-i/notes_taking_app/blob/main/review.py"
click node_critic "https://github.com/karlo-i/notes_taking_app/blob/main/critic.py"
click node_integration "https://github.com/karlo-i/notes_taking_app/blob/main/integration.py"
click node_topics "https://github.com/karlo-i/notes_taking_app/blob/main/topics.py"
click node_embeddings "https://github.com/karlo-i/notes_taking_app/blob/main/embeddings.py"
click node_retrieval "https://github.com/karlo-i/notes_taking_app/blob/main/retrieval.py"
click node_generation "https://github.com/karlo-i/notes_taking_app/blob/main/generate.py"
click node_outputs "https://github.com/karlo-i/notes_taking_app/blob/main/outputs.py"
click node_todos "https://github.com/karlo-i/notes_taking_app/blob/main/todos.py"
click node_search "https://github.com/karlo-i/notes_taking_app/blob/main/search.py"
click node_analytics "https://github.com/karlo-i/notes_taking_app/blob/main/analytics_bp.py"
click node_dashboard "https://github.com/karlo-i/notes_taking_app/blob/main/dashboard/src/App.tsx"
click node_admin "https://github.com/karlo-i/notes_taking_app/blob/main/admin.py"
click node_auth "https://github.com/karlo-i/notes_taking_app/blob/main/oauth.py"
click node_email_auth "https://github.com/karlo-i/notes_taking_app/blob/main/email_auth.py"
click node_app "https://github.com/karlo-i/notes_taking_app/blob/main/app_factory.py"
click node_database "https://github.com/karlo-i/notes_taking_app/blob/main/schema.sql"

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_notes,node_classification,node_review,node_critic,node_user toneBlue
class node_integration,node_topics,node_embeddings,node_retrieval,node_generation toneAmber
class node_outputs,node_todos,node_search,node_analytics,node_dashboard,node_admin toneMint
class node_auth,node_email_auth,node_app,node_database toneRose
```

## Components

### Note Capture

- [Notes](https://github.com/karlo-i/notes_taking_app/blob/main/notes.py): `notes.py`
- [Note Classification](https://github.com/karlo-i/notes_taking_app/blob/main/classify.py): `classify.py`
- [Critic Review](https://github.com/karlo-i/notes_taking_app/blob/main/review.py): `review.py`
- [AI Critic](https://github.com/karlo-i/notes_taking_app/blob/main/critic.py): `critic.py`

### Memory and Retrieval

- [Note Integration](https://github.com/karlo-i/notes_taking_app/blob/main/integration.py): `integration.py`
- [Topic Extraction](https://github.com/karlo-i/notes_taking_app/blob/main/topics.py): `topics.py`
- [Embeddings](https://github.com/karlo-i/notes_taking_app/blob/main/embeddings.py): `embeddings.py`
- [Knowledge Retrieval](https://github.com/karlo-i/notes_taking_app/blob/main/retrieval.py): `retrieval.py`
- [Output Generation](https://github.com/karlo-i/notes_taking_app/blob/main/generate.py): `generate.py`

### User Features

- [Saved Outputs](https://github.com/karlo-i/notes_taking_app/blob/main/outputs.py): `outputs.py`
- [To-Do Management](https://github.com/karlo-i/notes_taking_app/blob/main/todos.py): `todos.py`
- [Global Search](https://github.com/karlo-i/notes_taking_app/blob/main/search.py): `search.py`
- [Analytics](https://github.com/karlo-i/notes_taking_app/blob/main/analytics_bp.py): `analytics_bp.py`
- [Dashboard UI](https://github.com/karlo-i/notes_taking_app/blob/main/dashboard/src/App.tsx): `dashboard/src/App.tsx`
- [Administration](https://github.com/karlo-i/notes_taking_app/blob/main/admin.py): `admin.py`

### Access and Data

- [OAuth Access](https://github.com/karlo-i/notes_taking_app/blob/main/oauth.py): `oauth.py`
- [Email Access](https://github.com/karlo-i/notes_taking_app/blob/main/email_auth.py): `email_auth.py`
- [Flask App](https://github.com/karlo-i/notes_taking_app/blob/main/app_factory.py): `app_factory.py`
- [PostgreSQL](https://github.com/karlo-i/notes_taking_app/blob/main/schema.sql): `schema.sql`

### Other components

- **User**

## Connections

- User → Notes: submits notes (evidence: `README.md`)
- Notes → Note Classification: classifies (evidence: `notes.py`)
- Notes → Critic Review: starts review (evidence: `notes.py`)
- Critic Review → AI Critic: requests critique (evidence: `README.md`)
- Critic Review → Note Integration: integrates approval (evidence: `review.py`)
- Critic Review → Embeddings: embeds approved notes (evidence: `review.py`)
- Critic Review → Topic Extraction: extracts topics (evidence: `review.py`)
- Notes → PostgreSQL: reads and writes (evidence: `notes.py`)
- Critic Review → PostgreSQL: reads and writes (evidence: `review.py`)
- Topic Extraction → PostgreSQL: reads and writes (evidence: `topics.py`)
- User → Saved Outputs: requests output (evidence: `README.md`)
- Saved Outputs → Output Generation: generates output (evidence: `outputs.py`)
- Output Generation → Knowledge Retrieval: retrieves context (evidence: `generate.py`)
- Knowledge Retrieval → Embeddings: embeds query (evidence: `retrieval.py`)
- Knowledge Retrieval → PostgreSQL: searches notes (evidence: `retrieval.py`)
- Saved Outputs → PostgreSQL: stores outputs (evidence: `outputs.py`)
- User → To-Do Management: manages tasks (evidence: `README.md`)
- To-Do Management → PostgreSQL: reads and writes (evidence: `todos.py`)
- User → Global Search: searches content (evidence: `search.py`)
- Global Search → PostgreSQL: searches records (evidence: `search.py`)
- Dashboard UI → Analytics: displays metrics
- Analytics → PostgreSQL: reads metrics (evidence: `analytics_bp.py`)
- User → OAuth Access: signs in (evidence: `README.md`)
- User → Email Access: registers or signs in (evidence: `email_auth.py`)
- OAuth Access → PostgreSQL: upserts identity (evidence: `oauth.py`)
- Email Access → PostgreSQL: reads and writes (evidence: `email_auth.py`)
- Flask App → OAuth Access: registers routes (evidence: `app_factory.py`)
- Flask App → Email Access: registers routes (evidence: `app_factory.py`)
- Flask App → Notes: registers routes (evidence: `app_factory.py`)
- Flask App → Critic Review: registers routes (evidence: `app_factory.py`)
- Flask App → Saved Outputs: registers routes (evidence: `app_factory.py`)
- Flask App → To-Do Management: registers routes (evidence: `app_factory.py`)
- Flask App → Global Search: registers routes (evidence: `app_factory.py`)
- Flask App → Analytics: registers routes (evidence: `app_factory.py`)
- Flask App → Administration: registers routes (evidence: `app_factory.py`)
- Administration → PostgreSQL: reads and writes (evidence: `admin.py`)
