# sawyerbatch/neurtext architecture

> Architecture diagram of the GitHub repository sawyerbatch/neurtext, 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/sawyerbatch/neurtext
- Repository: https://github.com/sawyerbatch/neurtext

## Overview

##### Project type and purpose
- The presence of `main.py`, `chatbot.html`/`index.html`, and `requirements.txt` indicates a small full-stack web app: a Python backend exposing NLP services, and static HTML pages as the frontend.
- `render.yaml` suggests a deployment configuration (e.g., for a PaaS or container orchestration).

##### File structure
- Top-level files only, so there’s no multi-service or microservices division—this is a monolithic web app.
- `index.html` & `chatbot.html`: frontend assets (UI for user interaction).
- `main.py`: server entrypoint (likely Flask/FastAPI or similar), handling HTTP requests, orchestrating NLP operations.
- `requirements.txt`: Python dependencies (NLP frameworks, web framework).
- `render.yaml`: deployment manifest (e.g., build instructions, environment variables).

##### README
- Minimal detail; confirms the NLP focus.

##### Elements
- User input → Frontend → Backend → Model → Backend → Frontend → User.
- Blue rectangles for compute services (Backend, NLP Engine)
- Green for static assets (Frontend)

## Diagram (Mermaid)

```mermaid
graph TD
    Browser["User Browser"]

    subgraph "Frontend Static Site"
        direction TB
        Index["index.html"]:::static
        Chatbot["chatbot.html"]:::static
    end

    Backend["Backend (Flask + Python)"]:::compute
    NLP["NLP Engine<br/>(spaCy/Transformers)"]:::compute
    Req["requirements.txt"]:::static
    Logs[(Logs/Transcripts)]:::storage

    subgraph "Deployment Platform"
        direction TB
        Platform["Cloud Runtime"]:::cloud
    end

    Render["render.yaml"]:::static

    Browser -->|"loads"| Index
    Browser -->|"loads"| Chatbot

    Index -->|"AJAX POST /analyze"| Backend
    Chatbot -->|"AJAX POST /analyze"| Backend

    Req -->|"defines deps"| Backend

    Backend -->|"load model"| NLP
    NLP -->|"analysis result"| Backend

    Backend -->|"return JSON"| Index
    Backend -->|"return JSON"| Chatbot

    Backend -->|"write"| Logs

    Render -->|"deploy config"| Platform
    Platform -->|"serves"| Backend
    Platform -->|"serves"| Index
    Platform -->|"serves"| Chatbot

    click Index "https://github.com/sawyerbatch/neurtext/blob/main/index.html"
    click Chatbot "https://github.com/sawyerbatch/neurtext/blob/main/chatbot.html"
    click Backend "https://github.com/sawyerbatch/neurtext/blob/main/main.py"
    click Req "https://github.com/sawyerbatch/neurtext/blob/main/requirements.txt"
    click Render "https://github.com/sawyerbatch/neurtext/blob/main/render.yaml"

    classDef compute fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef static fill:#90EE90,stroke:#333,stroke-width:1px
    classDef storage fill:#D3D3D3,stroke:#333,stroke-width:1px
    classDef cloud fill:#F0E68C,stroke:#333,stroke-width:1px
```
