# akosdevhu/octogit architecture

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

- Interactive diagram: https://gitdiagram.com/akosdevhu/octogit
- Repository: https://github.com/akosdevhu/octogit

## Overview

OctoGit is a React Native GitHub mobile client. The main workflow is app startup, token lookup, GitHub data loading, then browsing account, repository, and notification views; actions call GitHub API helpers. Authentication stores tokens securely, with browser OAuth and device flow. The large App.js is a monolithic UI and interaction layer. README capabilities such as editing, releases, gestures, and 2FA are represented as planned/documented rather than confirmed implementations; source excerpts do not expose their full wiring.

Main entry points: [`App.js`](https://github.com/akosdevhu/octogit/blob/main/App.js) (App shell), [`auth.js`](https://github.com/akosdevhu/octogit/blob/main/auth.js) (OAuth & device flow), [`github.js`](https://github.com/akosdevhu/octogit/blob/main/github.js) (GitHub API client), [`index.js`](https://github.com/akosdevhu/octogit/blob/main/index.js) (App entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Mobile app"]
  node_entry["App entry<br/>[index.js]"]
  node_ui["App shell<br/>[App.js]"]
  node_dashboard["Account dashboard<br/>[App.js]"]
  node_repo["Repository browser<br/>[App.js]"]
  node_editing["File editing &amp; uploads<br/>[App.js]"]
  node_releases["Release management<br/>[App.js]"]
  node_notifications["Notifications &amp; gestures<br/>[App.js]"]
  node_discovery["Repository discovery<br/>[App.js]"]
  node_orgs["Organizations &amp; gists<br/>[App.js]"]
  node_twofa["Built-in 2FA<br/>[App.js]"]
end

subgraph group_auth["Authentication"]
  node_authflow["OAuth &amp; device flow<br/>[auth.js]"]
  node_secure[("Secure token storage<br/>[auth.js]")]
  node_exchange["OAuth exchange service"]
end

subgraph group_github["GitHub access"]
  node_githubapi["GitHub API client<br/>[github.js]"]
end

node_user(("Mobile user"))
node_github["GitHub services"]
node_browser["System browser"]

node_user -->|"opens app"| node_entry
node_entry -->|"registers"| node_ui
node_user -->|"uses"| node_ui
node_ui -->|"loads token"| node_authflow
node_ui -->|"signs out"| node_authflow
node_authflow -->|"reads / writes"| node_secure
node_authflow -->|"opens login"| node_browser
node_authflow -->|"requests device auth"| node_github
node_authflow -->|"exchanges code"| node_exchange
node_ui -->|"loads account data"| node_githubapi
node_ui -->|"creates repository"| node_githubapi
node_ui -->|"loads orgs / gists"| node_githubapi
node_githubapi -->|"calls API"| node_github
node_ui -->|"renders"| node_dashboard
node_ui -->|"opens"| node_repo
node_ui -->|"presents"| node_notifications
node_ui -.->|"supports"| node_discovery
node_ui -.->|"plans"| node_editing
node_ui -.->|"plans"| node_releases
node_ui -.->|"plans gestures"| node_notifications
node_ui -->|"opens lists"| node_orgs
node_ui -.->|"plans"| node_twofa

click node_entry "https://github.com/akosdevhu/octogit/blob/main/index.js"
click node_ui "https://github.com/akosdevhu/octogit/blob/main/App.js"
click node_dashboard "https://github.com/akosdevhu/octogit/blob/main/App.js"
click node_repo "https://github.com/akosdevhu/octogit/blob/main/App.js"
click node_editing "https://github.com/akosdevhu/octogit/blob/main/App.js"
click node_releases "https://github.com/akosdevhu/octogit/blob/main/App.js"
click node_notifications "https://github.com/akosdevhu/octogit/blob/main/App.js"
click node_discovery "https://github.com/akosdevhu/octogit/blob/main/App.js"
click node_orgs "https://github.com/akosdevhu/octogit/blob/main/App.js"
click node_twofa "https://github.com/akosdevhu/octogit/blob/main/App.js"
click node_authflow "https://github.com/akosdevhu/octogit/blob/main/auth.js"
click node_secure "https://github.com/akosdevhu/octogit/blob/main/auth.js"
click node_githubapi "https://github.com/akosdevhu/octogit/blob/main/github.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_entry,node_ui,node_dashboard,node_repo,node_editing,node_releases,node_notifications,node_discovery,node_orgs,node_twofa,node_user,node_browser toneBlue
class node_authflow,node_secure,node_exchange toneAmber
class node_githubapi toneMint
class node_github toneIndigo
```

## Components

### Mobile app

- [App entry](https://github.com/akosdevhu/octogit/blob/main/index.js): `index.js`
- [App shell](https://github.com/akosdevhu/octogit/blob/main/App.js): `App.js`
- [Account dashboard](https://github.com/akosdevhu/octogit/blob/main/App.js): `App.js`
- [Repository browser](https://github.com/akosdevhu/octogit/blob/main/App.js): `App.js`
- [File editing & uploads](https://github.com/akosdevhu/octogit/blob/main/App.js): `App.js`
- [Release management](https://github.com/akosdevhu/octogit/blob/main/App.js): `App.js`
- [Notifications & gestures](https://github.com/akosdevhu/octogit/blob/main/App.js): `App.js`
- [Repository discovery](https://github.com/akosdevhu/octogit/blob/main/App.js): `App.js`
- [Organizations & gists](https://github.com/akosdevhu/octogit/blob/main/App.js): `App.js`
- [Built-in 2FA](https://github.com/akosdevhu/octogit/blob/main/App.js): `App.js`

### Authentication

- [OAuth & device flow](https://github.com/akosdevhu/octogit/blob/main/auth.js): `auth.js`
- [Secure token storage](https://github.com/akosdevhu/octogit/blob/main/auth.js): `auth.js`
- **OAuth exchange service**

### GitHub access

- [GitHub API client](https://github.com/akosdevhu/octogit/blob/main/github.js): `github.js`

### Other components

- **Mobile user**
- **GitHub services**
- **System browser**

## Connections

- Mobile user → App entry: opens app (evidence: `index.js`)
- App entry → App shell: registers (evidence: `index.js`)
- Mobile user → App shell: uses (evidence: `README.md`)
- App shell → OAuth & device flow: loads token (evidence: `App.js`)
- App shell → OAuth & device flow: signs out (evidence: `App.js`)
- OAuth & device flow → Secure token storage: reads / writes (evidence: `auth.js`)
- OAuth & device flow → System browser: opens login (evidence: `auth.js`)
- OAuth & device flow → GitHub services: requests device auth (evidence: `auth.js`)
- OAuth & device flow → OAuth exchange service: exchanges code (evidence: `auth.js`)
- App shell → GitHub API client: loads account data (evidence: `App.js`)
- App shell → GitHub API client: creates repository (evidence: `App.js`)
- App shell → GitHub API client: loads orgs / gists (evidence: `App.js`)
- GitHub API client → GitHub services: calls API (evidence: `github.js`)
- App shell → Account dashboard: renders (evidence: `README.md`)
- App shell → Repository browser: opens (evidence: `README.md`)
- App shell → Notifications & gestures: presents (evidence: `README.md`)
- App shell → Repository discovery: supports (evidence: `App.js`)
- App shell → File editing & uploads: plans (evidence: `README.md`)
- App shell → Release management: plans (evidence: `README.md`)
- App shell → Notifications & gestures: plans gestures (evidence: `README.md`)
- App shell → Organizations & gists: opens lists (evidence: `App.js`)
- App shell → Built-in 2FA: plans (evidence: `README.md`)
