# nabin-poudel/askly architecture

> Architecture diagram of the GitHub repository nabin-poudel/askly, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nabin-poudel/askly
- Repository: https://github.com/nabin-poudel/askly

## Overview

Askly is a small Next.js chat app. A user submits a prompt in the chat interface; the interface invokes a server action, which requests a response from Google Gemini and returns either text or a user-facing error. The interface also shows loading state and supports copying assistant responses. The README documents the responsive, dark-themed chat experience. The sampled sources show the request and response path; no conversation-history persistence is present in the excerpts.

Main entry points: [`app/page.tsx`](https://github.com/nabin-poudel/askly/blob/main/app/page.tsx) (Chat interface), [`app/actions/aiAction.ts`](https://github.com/nabin-poudel/askly/blob/main/app/actions/aiAction.ts) (AI server action)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_chat["Chat experience"]
  node_interface["Chat interface<br/>[page.tsx]"]
end

subgraph group_generation["Response generation"]
  node_action["AI server action<br/>[aiAction.ts]"]
end

node_user(("User"))
node_gemini{{"Google Gemini"}}
node_clipboard["Browser clipboard"]

node_user -->|"submits prompt"| node_interface
node_interface -->|"calls"| node_action
node_action -->|"sends prompt"| node_gemini
node_gemini -->|"returns text"| node_action
node_action -->|"returns result"| node_interface
node_interface -->|"copies response"| node_clipboard

click node_interface "https://github.com/nabin-poudel/askly/blob/main/app/page.tsx"
click node_action "https://github.com/nabin-poudel/askly/blob/main/app/actions/aiAction.ts"

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_interface,node_user,node_clipboard toneBlue
class node_action toneAmber
class node_gemini toneIndigo
```

## Components

### Chat experience

- [Chat interface](https://github.com/nabin-poudel/askly/blob/main/app/page.tsx): `app/page.tsx`

### Response generation

- [AI server action](https://github.com/nabin-poudel/askly/blob/main/app/actions/aiAction.ts): `app/actions/aiAction.ts`

### Other components

- **User**
- **Google Gemini**
- **Browser clipboard**

## Connections

- User → Chat interface: submits prompt (evidence: `README.md`)
- Chat interface → AI server action: calls (evidence: `app/page.tsx`)
- AI server action → Google Gemini: sends prompt (evidence: `app/actions/aiAction.ts`)
- Google Gemini → AI server action: returns text (evidence: `app/actions/aiAction.ts`)
- AI server action → Chat interface: returns result (evidence: `app/page.tsx`)
- Chat interface → Browser clipboard: copies response (evidence: `app/page.tsx`)
