# light-alter7/code-design architecture

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

- Interactive diagram: https://gitdiagram.com/light-alter7/code-design
- Repository: https://github.com/light-alter7/code-design

## Overview

This is a small native Android chat client. The user enters an API base URL, model, and session-only key in Settings, sends a message, and receives an assistant response from an OpenAI-compatible chat API; HTTP 402 and 404 responses lead to dedicated error screens. The app also exposes a Projects screen, though its text says project syncing and local file access are not connected. Chat UI, state, request handling, and screen behavior are concentrated in MainActivity; endpoint normalization is a separate helper. The README is empty, so capabilities and links are based on the sampled source only.

Main entry points: [`apps/android-native/app/src/main/java/com/codesign/mobile/MainActivity.kt`](https://github.com/light-alter7/code-design/blob/main/apps/android-native/app/src/main/java/com/codesign/mobile/MainActivity.kt) (Chat request), [`apps/android-native/app/src/main/java/com/codesign/mobile/ApiEndpoint.kt`](https://github.com/light-alter7/code-design/blob/main/apps/android-native/app/src/main/java/com/codesign/mobile/ApiEndpoint.kt) (Endpoint normalization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Android client"]
  node_app["Chat and screens<br/>[MainActivity.kt]"]
end

subgraph group_connectivity["API connectivity"]
  node_request["Chat request<br/>[MainActivity.kt]"]
  node_endpoint["Endpoint normalization<br/>[ApiEndpoint.kt]"]
end

node_user(("App user"))
node_chat_api{{"Chat API"}}

node_user -.->|"uses"| node_app
node_app -->|"starts request"| node_request
node_request -->|"normalizes URL"| node_endpoint
node_request -->|"sends POST"| node_chat_api

click node_app "https://github.com/light-alter7/code-design/blob/main/apps/android-native/app/src/main/java/com/codesign/mobile/MainActivity.kt"
click node_request "https://github.com/light-alter7/code-design/blob/main/apps/android-native/app/src/main/java/com/codesign/mobile/MainActivity.kt"
click node_endpoint "https://github.com/light-alter7/code-design/blob/main/apps/android-native/app/src/main/java/com/codesign/mobile/ApiEndpoint.kt"

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_app,node_user toneBlue
class node_request,node_endpoint toneAmber
class node_chat_api toneMint
```

## Components

### Android client

- [Chat and screens](https://github.com/light-alter7/code-design/blob/main/apps/android-native/app/src/main/java/com/codesign/mobile/MainActivity.kt): `apps/android-native/app/src/main/java/com/codesign/mobile/MainActivity.kt`

### API connectivity

- [Chat request](https://github.com/light-alter7/code-design/blob/main/apps/android-native/app/src/main/java/com/codesign/mobile/MainActivity.kt): `apps/android-native/app/src/main/java/com/codesign/mobile/MainActivity.kt`
- [Endpoint normalization](https://github.com/light-alter7/code-design/blob/main/apps/android-native/app/src/main/java/com/codesign/mobile/ApiEndpoint.kt): `apps/android-native/app/src/main/java/com/codesign/mobile/ApiEndpoint.kt`

### Other components

- **App user**
- **Chat API**

## Connections

- App user → Chat and screens: uses
- Chat and screens → Chat request: starts request (evidence: `apps/android-native/app/src/main/java/com/codesign/mobile/MainActivity.kt`)
- Chat request → Endpoint normalization: normalizes URL (evidence: `apps/android-native/app/src/main/java/com/codesign/mobile/MainActivity.kt`)
- Chat request → Chat API: sends POST (evidence: `apps/android-native/app/src/main/java/com/codesign/mobile/MainActivity.kt`)
