# jaypatwe/daa-mini-project architecture

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

- Interactive diagram: https://gitdiagram.com/jaypatwe/daa-mini-project
- Repository: https://github.com/jaypatwe/daa-mini-project

## Overview

This small desktop application demonstrates two independent string-search algorithms. In either window, the user enters text and a pattern and starts a search; the interface calls its algorithm and displays the matching positions or a not-found message. Each script contains both its Tkinter interface and algorithm, so those responsibilities share a source path. The graph reflects the shown callbacks and return values; there is no separate storage or service layer.

Main entry points: [`Naive_String_Matching.py`](https://github.com/jaypatwe/daa-mini-project/blob/main/Naive_String_Matching.py) (Search interface), [`Rabin_Karp.py`](https://github.com/jaypatwe/daa-mini-project/blob/main/Rabin_Karp.py) (Search interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_naive["Naive search"]
  node_naive_ui["Search interface"]
  node_naive_match["Naive matcher"]
end

subgraph group_rabin["Rabin-Karp search"]
  node_rabin_ui["Search interface<br/>[Rabin_Karp.py]"]
  node_rabin_match["Rabin-Karp matcher<br/>[Rabin_Karp.py]"]
end

node_user(("User"))

node_user -->|"enters and searches"| node_naive_ui
node_naive_ui -->|"calls"| node_naive_match
node_naive_match -->|"returns positions"| node_naive_ui
node_user -->|"enters and searches"| node_rabin_ui
node_rabin_ui -->|"calls"| node_rabin_match
node_rabin_match -->|"returns positions"| node_rabin_ui

click node_naive_ui "https://github.com/jaypatwe/daa-mini-project/blob/main/Naive_String_Matching.py"
click node_naive_match "https://github.com/jaypatwe/daa-mini-project/blob/main/Naive_String_Matching.py"
click node_rabin_ui "https://github.com/jaypatwe/daa-mini-project/blob/main/Rabin_Karp.py"
click node_rabin_match "https://github.com/jaypatwe/daa-mini-project/blob/main/Rabin_Karp.py"

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_naive_ui,node_naive_match,node_user toneBlue
class node_rabin_ui,node_rabin_match toneAmber
```

## Components

### Naive search

- [Search interface](https://github.com/jaypatwe/daa-mini-project/blob/main/Naive_String_Matching.py): `Naive_String_Matching.py`
- [Naive matcher](https://github.com/jaypatwe/daa-mini-project/blob/main/Naive_String_Matching.py): `Naive_String_Matching.py`

### Rabin-Karp search

- [Search interface](https://github.com/jaypatwe/daa-mini-project/blob/main/Rabin_Karp.py): `Rabin_Karp.py`
- [Rabin-Karp matcher](https://github.com/jaypatwe/daa-mini-project/blob/main/Rabin_Karp.py): `Rabin_Karp.py`

### Other components

- **User**

## Connections

- User → Search interface: enters and searches (evidence: `Naive_String_Matching.py`)
- Search interface → Naive matcher: calls (evidence: `Naive_String_Matching.py`)
- Naive matcher → Search interface: returns positions (evidence: `Naive_String_Matching.py`)
- User → Search interface: enters and searches (evidence: `Rabin_Karp.py`)
- Search interface → Rabin-Karp matcher: calls (evidence: `Rabin_Karp.py`)
- Rabin-Karp matcher → Search interface: returns positions (evidence: `Rabin_Karp.py`)
