# hyssh/quickstart-sk architecture

> Architecture diagram of the GitHub repository hyssh/quickstart-sk, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hyssh/quickstart-sk
- Repository: https://github.com/hyssh/quickstart-sk

## Overview

##### Project type and purpose
- This is a full-stack AI orchestration platform. It uses FastAPI as a backend “semantic kernel” orchestrator, Chainlit as an interactive chat UI frontend, and a set of MCP (Model Context Protocol) microservices for specialized data enrichment (weather, local time, Azure Data Explorer). It also includes sample MCP services for Azure Search and Azure SQL.

##### File structure
- Top level:
- `.env.example`, `requirements.txt`, `.gitignore` – configuration and dependencies.
- `sample-server/` – example MCP implementations for Azure Search and SQL DB.
- `src/` – main application code:
– `launcher.py` & `run_chainlit.cmd` – unified entrypoint for starting all components.
– `backend/server.py` – FastAPI backend.
– `frontend/app.py`, `chainlit.yaml`, `chainlit.md` – Chainlit chat UI.
– `mcpservers/*.py` – independent microservices (weather, localtime, azuredataexplorer).

##### README for additional insights
- The README spells out five runtime services:
1. Weather MCP server
2. LocalTime MCP server
3. Azure Data Explorer MCP server
4. FastAPI backend server
5. Chainlit frontend
- It describes environment variables for Azure AI Foundry, search, ADX, and the launcher patterns.

##### Detail
- Ports (e.g., backend: 8091, Chainlit: 8000) and environment variables.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% UI Layer
    subgraph "UI Layer"
        CL["Chainlit Frontend (8000)"]:::ui
        CLcfg["chainlit.yaml"]:::ui
        CLdoc["chainlit.md"]:::ui
    end

    %% API Layer
    subgraph "API Layer"
        API["FastAPI Kernel (8091)"]:::api
    end

    %% MCP Services
    subgraph "MCP Services"
        W["Weather MCP Server"]:::mcp
        L["LocalTime MCP Server"]:::mcp
        A["Azure Data Explorer MCP Server"]:::mcp
    end

    %% Sample MCP (optional)
    subgraph "Sample MCP (optional)"
        S1["Azure Search MCP (sample)"]:::mcp
        S2["Azure SQL DB MCP (sample)"]:::mcp
    end

    %% External Services
    subgraph "External Services"
        ES1["Weather API"]:::external
        ES2["Time API"]:::external
        ES3["Azure Data Explorer"]:::external
        ES4["Azure Search"]:::external
        ES5["Azure SQL DB"]:::external
    end

    %% Deployment
    D["Launcher / Deployment"]:::deploy

    %% User Interaction
    User["User"]:::user

    %% Connections
    User -->|"chat request"| CL
    CL -->|"REST/WebSocket"| API
    API -->|"enrich request"| W
    API -->|"enrich request"| L
    API -->|"enrich request"| A
    API -->|"optional sample"| S1
    API -->|"optional sample"| S2

    W -->|"external call"| ES1
    L -->|"external call"| ES2
    A -->|"external call"| ES3
    S1 -.->|"optional external"| ES4
    S2 -.->|"optional external"| ES5

    D -->|"startup"| CL
    D -->|"startup"| API
    D -->|"startup"| W
    D -->|"startup"| L
    D -->|"startup"| A
    D -->|"startup"| S1
    D -->|"startup"| S2

    %% Click Events
    click CL "https://github.com/hyssh/quickstart-sk/blob/main/src/frontend/app.py"
    click CLcfg "https://github.com/hyssh/quickstart-sk/blob/main/src/frontend/chainlit.yaml"
    click CLdoc "https://github.com/hyssh/quickstart-sk/blob/main/src/frontend/chainlit.md"
    click API "https://github.com/hyssh/quickstart-sk/blob/main/src/backend/server.py"
    click W "https://github.com/hyssh/quickstart-sk/blob/main/src/mcpservers/weather.py"
    click L "https://github.com/hyssh/quickstart-sk/blob/main/src/mcpservers/localtime.py"
    click A "https://github.com/hyssh/quickstart-sk/blob/main/src/mcpservers/azuredataexproler.py"
    click S1 "https://github.com/hyssh/quickstart-sk/blob/main/sample-server/azureaisearch.py"
    click S2 "https://github.com/hyssh/quickstart-sk/blob/main/sample-server/azuresqldb.py"
    click D "https://github.com/hyssh/quickstart-sk/blob/main/src/launcher.py"
    click D "https://github.com/hyssh/quickstart-sk/blob/main/src/run_chainlit.cmd"
    click ENV "https://github.com/hyssh/quickstart-sk/blob/main/.env.example"
    click REQ "https://github.com/hyssh/quickstart-sk/blob/main/requirements.txt"

    %% Styles
    class User user
    classDef ui fill:#D0E8FF,stroke:#0366D6,color:#0366D6,stroke-width:1px
    classDef api fill:#DFFFE0,stroke:#22863A,color:#22863A,stroke-width:1px
    classDef mcp fill:#FFEDD5,stroke:#D15704,color:#D15704,stroke-width:1px
    classDef external fill:#F3E8FF,stroke:#6F42C1,color:#6F42C1,stroke-width:1px
    classDef deploy fill:#E1E4E8,stroke:#6A737D,color:#6A737D,stroke-width:1px
    classDef user fill:#FFFFFF,stroke:#24292E,color:#24292E,stroke-width:1px,stroke-dasharray: 2 2
```
