# mmt4j/ai-lab architecture

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

- Interactive diagram: https://gitdiagram.com/mmt4j/ai-lab
- Repository: https://github.com/mmt4j/ai-lab

## Overview

AI Lab is a Laravel/Livewire application offering six AI productivity tools. Users work through lab pages; review tagging and ticket classification are shown as save-or-select, classify, and persist workflows, with ticket processing also queued. The sampled services call dedicated AI agents and validate results before updating records. Other tools are documented in the README, but their implementation and wiring were not sampled, so those capability nodes are shown without inferred connections.

Main entry points: [`resources/views/pages/labs/⚡reviews.blade.php`](https://github.com/mmt4j/ai-lab/blob/main/resources/views/pages/labs/%E2%9A%A1reviews.blade.php) (Review workspace), [`resources/views/components/⚡ticket-dashboard.blade.php`](https://github.com/mmt4j/ai-lab/blob/main/resources/views/components/%E2%9A%A1ticket-dashboard.blade.php) (Ticket dashboard), [`app/Services/ReviewSentimentService.php`](https://github.com/mmt4j/ai-lab/blob/main/app/Services/ReviewSentimentService.php) (Review tagging service), [`app/Services/SupportTicketClassificationService.php`](https://github.com/mmt4j/ai-lab/blob/main/app/Services/SupportTicketClassificationService.php) (Ticket classification service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Lab experience"]
  node_reviews_ui["Review workspace<br/>[⚡reviews.blade.php]"]
  node_tickets_ui["Ticket dashboard"]
  node_ticket_classifier_ui["Ticket classifier"]
  node_faq_ui["FAQ page<br/>[⚡faq.blade.php]"]
  node_product_ui["Product page<br/>[⚡product.blade.php]"]
  node_receipt_ui["Receipt page<br/>[⚡receipt.blade.php]"]
  node_summarizer_ui["Summarizer page"]
end

subgraph group_ai["AI capabilities"]
  node_reviews_service["Review tagging service"]
  node_review_agent["Sentiment tagger"]
  node_ticket_service["Ticket classification service"]
  node_ticket_agent["Ticket classifier agent"]
  node_faq_agent["FAQ chatbot<br/>[FaqAssistant.php]"]
  node_product_agent["Description generator"]
  node_receipt_agent["Receipt reader<br/>[ReceiptReader.php]"]
  node_summarizer_agent["Text summarizer<br/>[Summarizer.php]"]
end

subgraph group_domain["Domain and persistence"]
  node_review_store[("Customer reviews<br/>[CustomerReview.php]")]
  node_ticket_store[("Support tickets")]
end

subgraph group_platform["Application platform"]
  node_classification_job["Classification job"]
  node_auth["Authentication"]
  node_user_model[("User account<br/>[User.php]")]
end

node_user(("User"))
node_groq{{"Groq AI"}}

node_user -->|"submits reviews"| node_reviews_ui
node_reviews_ui -->|"lists reviews"| node_review_store
node_reviews_ui -->|"requests tagging"| node_reviews_service
node_reviews_service -->|"prompts agent"| node_review_agent
node_reviews_service -->|"updates sentiment"| node_review_store
node_review_agent -->|"uses provider"| node_groq
node_user -.->|"manages tickets"| node_tickets_ui
node_tickets_ui -->|"dispatches classification"| node_classification_job
node_tickets_ui -->|"reads tickets"| node_ticket_store
node_classification_job -->|"invokes classification"| node_ticket_service
node_ticket_service -->|"prompts agent"| node_ticket_agent
node_ticket_service -->|"updates results"| node_ticket_store
node_ticket_agent -->|"uses provider"| node_groq
node_user -.->|"classifies tickets"| node_ticket_classifier_ui
node_user -.->|"asks questions"| node_faq_ui
node_user -.->|"generates descriptions"| node_product_ui
node_user -.->|"reads receipts"| node_receipt_ui
node_user -.->|"summarizes text"| node_summarizer_ui
node_user -.->|"authenticates"| node_auth

click node_reviews_ui "https://github.com/mmt4j/ai-lab/blob/main/resources/views/pages/labs/%E2%9A%A1reviews.blade.php"
click node_tickets_ui "https://github.com/mmt4j/ai-lab/blob/main/resources/views/components/%E2%9A%A1ticket-dashboard.blade.php"
click node_ticket_classifier_ui "https://github.com/mmt4j/ai-lab/blob/main/resources/views/components/%E2%9A%A1ticket-classifier.blade.php"
click node_faq_ui "https://github.com/mmt4j/ai-lab/blob/main/resources/views/pages/labs/%E2%9A%A1faq.blade.php"
click node_product_ui "https://github.com/mmt4j/ai-lab/blob/main/resources/views/pages/labs/%E2%9A%A1product.blade.php"
click node_receipt_ui "https://github.com/mmt4j/ai-lab/blob/main/resources/views/pages/labs/%E2%9A%A1receipt.blade.php"
click node_summarizer_ui "https://github.com/mmt4j/ai-lab/blob/main/resources/views/pages/labs/%E2%9A%A1summarizer.blade.php"
click node_reviews_service "https://github.com/mmt4j/ai-lab/blob/main/app/Services/ReviewSentimentService.php"
click node_review_agent "https://github.com/mmt4j/ai-lab/blob/main/app/Ai/Agents/ReviewSentimentTagger.php"
click node_ticket_service "https://github.com/mmt4j/ai-lab/blob/main/app/Services/SupportTicketClassificationService.php"
click node_ticket_agent "https://github.com/mmt4j/ai-lab/blob/main/app/Ai/Agents/SupportTicketClassifier.php"
click node_faq_agent "https://github.com/mmt4j/ai-lab/blob/main/app/Ai/Agents/FaqAssistant.php"
click node_product_agent "https://github.com/mmt4j/ai-lab/blob/main/app/Ai/Agents/ProductDescriptionGenerator.php"
click node_receipt_agent "https://github.com/mmt4j/ai-lab/blob/main/app/Ai/Agents/ReceiptReader.php"
click node_summarizer_agent "https://github.com/mmt4j/ai-lab/blob/main/app/Ai/Agents/Summarizer.php"
click node_review_store "https://github.com/mmt4j/ai-lab/blob/main/app/Models/CustomerReview.php"
click node_ticket_store "https://github.com/mmt4j/ai-lab/blob/main/app/Models/SupportTicketClassifier.php"
click node_classification_job "https://github.com/mmt4j/ai-lab/blob/main/app/Jobs/ClassifySupportTicket.php"
click node_auth "https://github.com/mmt4j/ai-lab/blob/main/app/Providers/FortifyServiceProvider.php"
click node_user_model "https://github.com/mmt4j/ai-lab/blob/main/app/Models/User.php"

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_reviews_ui,node_tickets_ui,node_ticket_classifier_ui,node_faq_ui,node_product_ui,node_receipt_ui,node_summarizer_ui,node_user toneBlue
class node_reviews_service,node_review_agent,node_ticket_service,node_ticket_agent,node_faq_agent,node_product_agent,node_receipt_agent,node_summarizer_agent toneAmber
class node_review_store,node_ticket_store toneMint
class node_classification_job,node_auth,node_user_model toneRose
class node_groq toneIndigo
```

## Components

### Lab experience

- [Review workspace](https://github.com/mmt4j/ai-lab/blob/main/resources/views/pages/labs/%E2%9A%A1reviews.blade.php): `resources/views/pages/labs/⚡reviews.blade.php`
- [Ticket dashboard](https://github.com/mmt4j/ai-lab/blob/main/resources/views/components/%E2%9A%A1ticket-dashboard.blade.php): `resources/views/components/⚡ticket-dashboard.blade.php`
- [Ticket classifier](https://github.com/mmt4j/ai-lab/blob/main/resources/views/components/%E2%9A%A1ticket-classifier.blade.php): `resources/views/components/⚡ticket-classifier.blade.php`
- [FAQ page](https://github.com/mmt4j/ai-lab/blob/main/resources/views/pages/labs/%E2%9A%A1faq.blade.php): `resources/views/pages/labs/⚡faq.blade.php`
- [Product page](https://github.com/mmt4j/ai-lab/blob/main/resources/views/pages/labs/%E2%9A%A1product.blade.php): `resources/views/pages/labs/⚡product.blade.php`
- [Receipt page](https://github.com/mmt4j/ai-lab/blob/main/resources/views/pages/labs/%E2%9A%A1receipt.blade.php): `resources/views/pages/labs/⚡receipt.blade.php`
- [Summarizer page](https://github.com/mmt4j/ai-lab/blob/main/resources/views/pages/labs/%E2%9A%A1summarizer.blade.php): `resources/views/pages/labs/⚡summarizer.blade.php`

### AI capabilities

- [Review tagging service](https://github.com/mmt4j/ai-lab/blob/main/app/Services/ReviewSentimentService.php): `app/Services/ReviewSentimentService.php`
- [Sentiment tagger](https://github.com/mmt4j/ai-lab/blob/main/app/Ai/Agents/ReviewSentimentTagger.php): `app/Ai/Agents/ReviewSentimentTagger.php`
- [Ticket classification service](https://github.com/mmt4j/ai-lab/blob/main/app/Services/SupportTicketClassificationService.php): `app/Services/SupportTicketClassificationService.php`
- [Ticket classifier agent](https://github.com/mmt4j/ai-lab/blob/main/app/Ai/Agents/SupportTicketClassifier.php): `app/Ai/Agents/SupportTicketClassifier.php`
- [FAQ chatbot](https://github.com/mmt4j/ai-lab/blob/main/app/Ai/Agents/FaqAssistant.php): `app/Ai/Agents/FaqAssistant.php`
- [Description generator](https://github.com/mmt4j/ai-lab/blob/main/app/Ai/Agents/ProductDescriptionGenerator.php): `app/Ai/Agents/ProductDescriptionGenerator.php`
- [Receipt reader](https://github.com/mmt4j/ai-lab/blob/main/app/Ai/Agents/ReceiptReader.php): `app/Ai/Agents/ReceiptReader.php`
- [Text summarizer](https://github.com/mmt4j/ai-lab/blob/main/app/Ai/Agents/Summarizer.php): `app/Ai/Agents/Summarizer.php`

### Domain and persistence

- [Customer reviews](https://github.com/mmt4j/ai-lab/blob/main/app/Models/CustomerReview.php): `app/Models/CustomerReview.php`
- [Support tickets](https://github.com/mmt4j/ai-lab/blob/main/app/Models/SupportTicketClassifier.php): `app/Models/SupportTicketClassifier.php`

### Application platform

- [Classification job](https://github.com/mmt4j/ai-lab/blob/main/app/Jobs/ClassifySupportTicket.php): `app/Jobs/ClassifySupportTicket.php`
- [Authentication](https://github.com/mmt4j/ai-lab/blob/main/app/Providers/FortifyServiceProvider.php): `app/Providers/FortifyServiceProvider.php`
- [User account](https://github.com/mmt4j/ai-lab/blob/main/app/Models/User.php): `app/Models/User.php`

### Other components

- **User**
- **Groq AI**

## Connections

- User → Review workspace: submits reviews (evidence: `resources/views/pages/labs/⚡reviews.blade.php`)
- Review workspace → Customer reviews: lists reviews (evidence: `resources/views/pages/labs/⚡reviews.blade.php`)
- Review workspace → Review tagging service: requests tagging (evidence: `resources/views/pages/labs/⚡reviews.blade.php`)
- Review tagging service → Sentiment tagger: prompts agent (evidence: `app/Services/ReviewSentimentService.php`)
- Review tagging service → Customer reviews: updates sentiment (evidence: `app/Services/ReviewSentimentService.php`)
- Sentiment tagger → Groq AI: uses provider (evidence: `app/Ai/Agents/ReviewSentimentTagger.php`)
- User → Ticket dashboard: manages tickets
- Ticket dashboard → Classification job: dispatches classification (evidence: `resources/views/components/⚡ticket-dashboard.blade.php`)
- Ticket dashboard → Support tickets: reads tickets (evidence: `resources/views/components/⚡ticket-dashboard.blade.php`)
- Classification job → Ticket classification service: invokes classification (evidence: `app/Jobs/ClassifySupportTicket.php`)
- Ticket classification service → Ticket classifier agent: prompts agent (evidence: `app/Services/SupportTicketClassificationService.php`)
- Ticket classification service → Support tickets: updates results (evidence: `app/Services/SupportTicketClassificationService.php`)
- Ticket classifier agent → Groq AI: uses provider (evidence: `app/Ai/Agents/SupportTicketClassifier.php`)
- User → Ticket classifier: classifies tickets
- User → FAQ page: asks questions
- User → Product page: generates descriptions
- User → Receipt page: reads receipts
- User → Summarizer page: summarizes text
- User → Authentication: authenticates
