# luismanez/collabdays-madrid-2025 architecture

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

- Interactive diagram: https://gitdiagram.com/luismanez/collabdays-madrid-2025
- Repository: https://github.com/luismanez/collabdays-madrid-2025

## Overview

##### Project type and purpose
- This is a microservice-style, full-stack RAG (Retrieval-Augmented Generation) demo:
– A .NET Core Web API (Abyx.Ai.Api) exposing chat completion endpoints with pluggable RAG memory.
– A background “ingestor” hosted service (Abyx.SharePoint.Lists.Ingestor) that pulls data from SharePoint via Microsoft Graph.
– A Copilot plugin integration layer (Abyx.Ai.CopilotPlugin) that registers the API with M365 Copilot.

##### File structure
- src/Abyx.Ai.Api
– Implements minimal API endpoints (GetChatCompletions).
– Uses a plugin architecture (Native and Semantic plugins) for custom RAG memory retrieval.
- src/Abyx.SharePoint.Lists.Ingestor
– A worker service that runs on a schedule to fetch SharePoint list items (Products) and load them into an in-memory or vector store.
- src/Abyx.Ai.CopilotPlugin
– Contains the ai-plugin.json, OpenAPI spec, adaptive cards, and manifest files that let M365 Copilot discover and call the API.

##### README for additional insights
- The solution demonstrates the RAG pattern with KernelMemory plus indexing SharePoint lists to supplement Copilot.
- Audience flow: SharePoint → Ingestor → Memory Store → API → Copilot.

##### Main components & their relationships
a. Data Source
– SharePoint Online Lists (Products list)
– Microsoft Graph API
b. Ingestion Layer
– Abyx.SharePoint.Lists.Ingestor (HostedService)
– Fetches list items, transforms to domain model (Product), pushes to RAG/Vector Store
c. Memory / Vector Store
– In-memory or persistent vector database (could be Azure Cognitive Search, Pinecone, or in-process KernelMemory)
d. API Layer
– Abyx.Ai.Api (Minimal Web API)
– Endpoint: /chat/completions uses RAG memory + LLM
– Plugin architecture:
- Native plugin (MyIpAddressPlugin)
- Semantic plugin (OurProductsPlugin) reading from the memory store
e. Integration Layer
– Abyx.Ai.CopilotPlugin app package
– openapi.yaml / ai-plugin.json / manifest.json
– Adaptive Cards + Declarative Agent config
f. External Consumer
– M365 Copilot (or any LLM client)
– Calls the registered plugin endpoint to augment chat with product info

##### Architectural patterns & design principles
- Microservices / Hosted services (separate API and ingestion)
- Plugin-based extensibility (IPlugin interface for RAG retrieval)
- Minimal Web API (lightweight endpoints)
- RAG pattern (combine vector search with LLM prompts)
- Declarative plugin registration (OpenAPI + ai-plugin.json for Copilot)

##### Essential elements
- Clear component names matching project folders (Abyx.SharePoint.Lists.Ingestor, Abyx.Ai.Api, Abyx.Ai.CopilotPlugin).
- Data flows annotated with request/response types (GetChatCompletionsRequest/Response, vector query).
- Plugin manifest (ai-plugin.json) pointing from Copilot to the Web API URL.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Data Source & Graph"
        SP["SharePoint Online Lists"]:::dataSource
        Graph["Microsoft Graph API"]:::dataSource
    end
    SP -->|"HTTPS Graph API"| Graph

    subgraph "Ingestion & Storage"
        Ingestor["Abyx.SharePoint.Lists.Ingestor"]:::ingestion
        Vector["Vector Store (RAG Memory)"]:::store
    end
    Graph -->|"REST"| Ingestor
    Ingestor -->|"Store Products"| Vector

    subgraph "API & Plugin"
        API["Abyx.Ai.Api (Web API)"]:::api
        Plugins["Plugin Extensions (Native & Semantic)"]:::api
        CopPlugin["Abyx.Ai.CopilotPlugin"]:::api
    end
    Vector -->|"Vector Query"| API
    API -->|"IPlugin Architecture"| Plugins
    CopPlugin -->|"OpenAPI + ai-plugin.json"| API

    subgraph "External Consumer"
        Copilot["M365 Copilot"]:::external
    end
    Copilot -->|"Plugin call /chat/completions"| CopPlugin

    click SP "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.SharePoint.Lists.Ingestor"
    click Graph "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.SharePoint.Lists.Ingestor/Services/GraphProductService.cs"
    click Ingestor "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.SharePoint.Lists.Ingestor"
    click Ingestor "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.SharePoint.Lists.Ingestor/Program.cs"
    click Ingestor "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.SharePoint.Lists.Ingestor/HostedServices/ProductsIngestorHostedService.cs"
    click Ingestor "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.SharePoint.Lists.Ingestor/Models/Product.cs"
    click Ingestor "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.SharePoint.Lists.Ingestor/Options/GraphOptions.cs"
    click Ingestor "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.SharePoint.Lists.Ingestor/Extensions/ServiceCollectionExtensions.cs"

    click API "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.Ai.Api"
    click API "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.Ai.Api/Program.cs"
    click API "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.Ai.Api/Abyx.Ai.Api.csproj"
    click Plugins "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.Ai.Api/Extensions/ServiceCollectionExtensions.cs"
    click Plugins "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.Ai.Api/Plugins/Native/MyIpAddressPlugin.cs"
    click Plugins "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.Ai.Api/Plugins/Semantic/OurProductsPlugin/OurProducts/OurProducts.yaml"
    click API "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.Ai.Api/Features/Chat/GetChatCompletions/GetChatCompletionsEndpoint.cs"
    click API "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.Ai.Api/Features/Chat/GetChatCompletions/GetChatCompletionsRequest.cs"
    click API "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.Ai.Api/Features/Chat/GetChatCompletions/GetChatCompletionsResponse.cs"

    click CopPlugin "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.Ai.CopilotPlugin"
    click CopPlugin "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.Ai.CopilotPlugin/appPackage/manifest.json"
    click CopPlugin "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.Ai.CopilotPlugin/appPackage/ai-plugin.json"
    click CopPlugin "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.Ai.CopilotPlugin/appPackage/apiSpecificationFile/openapi.yaml"
    click CopPlugin "https://github.com/luismanez/collabdays-madrid-2025/tree/main/src/Abyx.Ai.CopilotPlugin/appPackage/adaptiveCards"
    click CopPlugin "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.Ai.CopilotPlugin/appPackage/declarativeAgent.json"
    click CopPlugin "https://github.com/luismanez/collabdays-madrid-2025/blob/main/src/Abyx.Ai.CopilotPlugin/env/.env.dev"

    classDef dataSource fill:#D0E8FF,stroke:#0366d6,color:#0366d6;
    classDef ingestion fill:#D0F5D0,stroke:#228B22,color:#2E8B57;
    classDef store fill:#FFF9C4,stroke:#FBC02D,color:#F57F17;
    classDef api fill:#FFE0B2,stroke:#FB8C00,color:#E65100;
    classDef external fill:#E1BEE7,stroke:#9C27B0,color:#6A1B9A;
```
