# ynshung/place-finder-automata architecture

> Architecture diagram of the GitHub repository ynshung/place-finder-automata, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ynshung/place-finder-automata
- Repository: https://github.com/ynshung/place-finder-automata

## Overview

##### Project type and purpose
- This is a lightweight Python web application (single-page “full-stack” app) built with Streamlit.
- Its sole purpose is to let users input arbitrary text, run a deterministic finite automaton (DFA) over it (from PlaceFinder.py), and highlight or list any place names detected.

##### File structure
- Top-level files only – no separate frontend or backend directories:
- app.py  – Streamlit entrypoint (UI + orchestration).
- PlaceFinder.py  – core DFA implementation (the “engine”).
- requirements.txt – Python dependencies (e.g. streamlit).
- README.md / .gitignore – docs & ignore rules.
- No database or external data stores; everything is in-memory.

##### README for additional insights
- Confirms usage of Streamlit to serve a simple web UI.
- No mention of databases or other microservices.
- Hosted as a demo on Streamlit’s cloud.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% External User
    Browser["Web Browser (User)"]:::external

    %% Hosting Environment Container
    subgraph "Streamlit Cloud / Python Runtime" 
        direction TB
        UI["Streamlit App (app.py)"]:::ui
        Engine["PlaceFinder DFA Engine (PlaceFinder.py)"]:::logic
    end

    %% Project Resources
    subgraph "Project Resources"
        direction TB
        Requirements["requirements.txt"]:::docs
        README["README.md"]:::docs
        Gitignore[".gitignore"]:::docs
    end

    %% Data Flows
    Browser -->|"HTTP Request: user text"| UI
    UI -->|"Invokes DFA with user text"| Engine
    Engine -->|"Returns list of place names"| UI
    UI -->|"HTTP Response: rendered UI"| Browser

    %% Click Events
    click UI "https://github.com/ynshung/place-finder-automata/blob/main/app.py"
    click Engine "https://github.com/ynshung/place-finder-automata/blob/main/PlaceFinder.py"
    click Requirements "https://github.com/ynshung/place-finder-automata/blob/main/requirements.txt"
    click README "https://github.com/ynshung/place-finder-automata/blob/main/README.md"
    click Gitignore "https://github.com/ynshung/place-finder-automata/blob/main/.gitignore"

    %% Styles
    classDef external fill:#AED9E0,stroke:#000,stroke-width:1px
    classDef ui fill:#85C1E9,stroke:#000,stroke-width:1px
    classDef logic fill:#58D68D,stroke:#000,stroke-width:1px
    classDef docs fill:#F7DC6F,stroke:#000,stroke-width:1px
```
