# usmanghani1044/-decodelabs-ai-chatbot-project-usman-ghani architecture

> Architecture diagram of the GitHub repository usmanghani1044/-decodelabs-ai-chatbot-project-usman-ghani, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/usmanghani1044/-decodelabs-ai-chatbot-project-usman-ghani
- Repository: https://github.com/usmanghani1044/-decodelabs-ai-chatbot-project-usman-ghani

## Overview

This is a small deterministic, rule-based chatbot. The user enters text in a continuous command-line loop; the chatbot normalizes it, checks for the exit command, looks up a predefined response with a fallback for unknown input, and prints the result. These stages are implemented together in one function, so nodes share the same source path. The README describes the same capabilities; no separate storage, service, or integration layer is present.

Main entry points: [`python chatbot_project1.py`](https://github.com/usmanghani1044/-decodelabs-ai-chatbot-project-usman-ghani/blob/main/python%20chatbot_project1.py) (Input Cleanup)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_chat_loop["Chat Loop"]
node_input_cleanup["Input Cleanup"]
node_exit_check["Exit Check"]
node_response_lookup["Response Lookup"]
node_response_output["Response Output"]

node_user -->|"enters text"| node_chat_loop
node_chat_loop -->|"reads input"| node_input_cleanup
node_input_cleanup -->|"checks command"| node_exit_check
node_exit_check -->|"repeats unless exit"| node_chat_loop
node_exit_check -->|"prints shutdown"| node_response_output
node_input_cleanup -->|"looks up intent"| node_response_lookup
node_response_lookup -->|"returns reply"| node_response_output
node_response_output -->|"prints response"| node_user

click node_chat_loop "https://github.com/usmanghani1044/-decodelabs-ai-chatbot-project-usman-ghani/blob/main/python%20chatbot_project1.py"
click node_input_cleanup "https://github.com/usmanghani1044/-decodelabs-ai-chatbot-project-usman-ghani/blob/main/python%20chatbot_project1.py"
click node_exit_check "https://github.com/usmanghani1044/-decodelabs-ai-chatbot-project-usman-ghani/blob/main/python%20chatbot_project1.py"
click node_response_lookup "https://github.com/usmanghani1044/-decodelabs-ai-chatbot-project-usman-ghani/blob/main/python%20chatbot_project1.py"
click node_response_output "https://github.com/usmanghani1044/-decodelabs-ai-chatbot-project-usman-ghani/blob/main/python%20chatbot_project1.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_user toneBlue
class node_chat_loop,node_input_cleanup,node_exit_check,node_response_lookup,node_response_output toneTeal
```

## Components

### Other components

- **User**
- [Chat Loop](https://github.com/usmanghani1044/-decodelabs-ai-chatbot-project-usman-ghani/blob/main/python%20chatbot_project1.py): `python chatbot_project1.py`
- [Input Cleanup](https://github.com/usmanghani1044/-decodelabs-ai-chatbot-project-usman-ghani/blob/main/python%20chatbot_project1.py): `python chatbot_project1.py`
- [Exit Check](https://github.com/usmanghani1044/-decodelabs-ai-chatbot-project-usman-ghani/blob/main/python%20chatbot_project1.py): `python chatbot_project1.py`
- [Response Lookup](https://github.com/usmanghani1044/-decodelabs-ai-chatbot-project-usman-ghani/blob/main/python%20chatbot_project1.py): `python chatbot_project1.py`
- [Response Output](https://github.com/usmanghani1044/-decodelabs-ai-chatbot-project-usman-ghani/blob/main/python%20chatbot_project1.py): `python chatbot_project1.py`

## Connections

- User → Chat Loop: enters text (evidence: `python chatbot_project1.py`)
- Chat Loop → Input Cleanup: reads input (evidence: `python chatbot_project1.py`)
- Input Cleanup → Exit Check: checks command (evidence: `python chatbot_project1.py`)
- Exit Check → Chat Loop: repeats unless exit (evidence: `python chatbot_project1.py`)
- Exit Check → Response Output: prints shutdown (evidence: `python chatbot_project1.py`)
- Input Cleanup → Response Lookup: looks up intent (evidence: `python chatbot_project1.py`)
- Response Lookup → Response Output: returns reply (evidence: `python chatbot_project1.py`)
- Response Output → User: prints response (evidence: `python chatbot_project1.py`)
