# danielrendaprevisivel-web/rendy architecture

> Architecture diagram of the GitHub repository danielrendaprevisivel-web/rendy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/danielrendaprevisivel-web/rendy
- Repository: https://github.com/danielrendaprevisivel-web/rendy

## Overview

Rendy appears to be a browser-based AI chat product. The visible runtime handles chat requests by validating a Supabase user token, converting the submitted chat format, and forwarding it to Groq. The HTML files suggest browser interfaces, but their contents were not sampled, so their roles and calls to the API cannot be confirmed; those connections are shown as unverified. The source excerpt does not establish how the two HTML pages relate.

Main entry points: [`api/chat.js`](https://github.com/danielrendaprevisivel-web/rendy/blob/master/api/chat.js) (Chat handler), [`bot_produto_rp_v3.html`](https://github.com/danielrendaprevisivel-web/rendy/blob/master/bot_produto_rp_v3.html) (Chat interface), [`public/index.html`](https://github.com/danielrendaprevisivel-web/rendy/blob/master/public/index.html) (Public page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_chat_ui["Chat interface"]
  node_public_page["Public page<br/>[index.html]"]
end

subgraph group_api["Chat API"]
  node_chat_api["Chat handler<br/>[chat.js]"]
end

subgraph group_services["External services"]
  node_supabase["Supabase Auth"]
  node_groq["Groq API"]
end

node_user(("User"))

node_user -.->|"uses"| node_chat_ui
node_user -.->|"visits"| node_public_page
node_chat_ui -.->|"submits chat"| node_chat_api
node_chat_api -->|"validates token"| node_supabase
node_supabase -->|"returns user"| node_chat_api
node_chat_api -->|"sends messages"| node_groq
node_groq -->|"returns completion"| node_chat_api

click node_chat_ui "https://github.com/danielrendaprevisivel-web/rendy/blob/master/bot_produto_rp_v3.html"
click node_public_page "https://github.com/danielrendaprevisivel-web/rendy/blob/master/public/index.html"
click node_chat_api "https://github.com/danielrendaprevisivel-web/rendy/blob/master/api/chat.js"

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_chat_ui,node_public_page,node_user toneBlue
class node_chat_api toneAmber
class node_supabase,node_groq toneMint
```

## Components

### Web interface

- [Chat interface](https://github.com/danielrendaprevisivel-web/rendy/blob/master/bot_produto_rp_v3.html): `bot_produto_rp_v3.html`
- [Public page](https://github.com/danielrendaprevisivel-web/rendy/blob/master/public/index.html): `public/index.html`

### Chat API

- [Chat handler](https://github.com/danielrendaprevisivel-web/rendy/blob/master/api/chat.js): `api/chat.js`

### External services

- **Supabase Auth**
- **Groq API**

### Other components

- **User**

## Connections

- User → Chat interface: uses
- User → Public page: visits
- Chat interface → Chat handler: submits chat
- Chat handler → Supabase Auth: validates token (evidence: `api/chat.js`)
- Supabase Auth → Chat handler: returns user (evidence: `api/chat.js`)
- Chat handler → Groq API: sends messages (evidence: `api/chat.js`)
- Groq API → Chat handler: returns completion (evidence: `api/chat.js`)
