# coolchan03/atlas architecture

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

- Interactive diagram: https://gitdiagram.com/coolchan03/atlas
- Repository: https://github.com/coolchan03/atlas

## Overview

Atlas is an on-device AI assistant combined with an offline library and field guide. A typical workflow is to choose an agent or project, ask through chat or voice, then receive a model-generated answer that can draw on project documents or offline references; learning and study modes turn those materials into checked knowledge and study outputs. The map also preserves the README’s distinct field, voice, model-management, and backup capabilities. Some core modules named in the source index are absent from the supplied tree, so directory-level nodes represent those subsystems; edges are limited to documented or excerpted relationships.

Main entry points: [`src/screens/ChatScreen`](https://github.com/coolchan03/atlas/tree/main/src/screens/ChatScreen) (Chat experience), [`src/services`](https://github.com/coolchan03/atlas/tree/main/src/services) (Text inference), [`src/storage/storageGroups.ts`](https://github.com/coolchan03/atlas/blob/main/src/storage/storageGroups.ts) (Device storage), [`src/services/rag`](https://github.com/coolchan03/atlas/tree/main/src/services/rag) (Document retrieval)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_conversation["Assistant and projects"]
  node_app["App entry<br/>[App.tsx]"]
  node_chat["Chat experience"]
  node_agents["Agents and projects"]
  node_chatdata[("Chat and project state")]
end

subgraph group_runtime["Models and media"]
  node_llm["Text inference"]
  node_modelmgmt["Models and downloads"]
  node_image["Image generation"]
  node_voice["Voice interaction"]
  node_native["Native device bridges"]
end

subgraph group_field["Offline field tools"]
  node_atlas["Atlas field guide"]
  node_maps["Offline maps<br/>[maps.ts]"]
  node_library["Offline library<br/>[offlineLibrary.ts]"]
  node_recorder["Recordings"]
  node_schedule["Reminders"]
end

subgraph group_knowledge["Knowledge and learning"]
  node_rag["Document retrieval"]
  node_documents["Document handling"]
  node_learning["Learning mode<br/>[engine.ts]"]
  node_study["Study mode<br/>[engine.ts]"]
end

subgraph group_device["Device services"]
  node_storage["Device storage<br/>[storageGroups.ts]"]
  node_persistent[("Persisted app state<br/>[appStore.ts]")]
end

node_user(("Person"))
node_internet{{"Internet tools"}}

node_user -->|"opens"| node_app
node_app -->|"offers chat"| node_chat
node_user -->|"chooses agent"| node_agents
node_agents -->|"configures"| node_chat
node_chat -->|"requests answer"| node_llm
node_llm -.->|"uses conversation"| node_chatdata
node_chat -->|"stores chats"| node_chatdata
node_user -->|"downloads models"| node_modelmgmt
node_modelmgmt -.->|"updates model state"| node_persistent
node_user -->|"requests image"| node_image
node_user -->|"speaks or listens"| node_voice
node_voice -.->|"uses device audio"| node_native
node_user -->|"adds documents"| node_documents
node_documents -->|"indexes content"| node_rag
node_rag -->|"checks generation"| node_llm
node_rag -.->|"scopes project data"| node_chatdata
node_user -->|"starts learning"| node_learning
node_learning -->|"runs learning roles"| node_llm
node_user -->|"creates study material"| node_study
node_study -->|"uses project sources"| node_rag
node_user -->|"opens field guide"| node_atlas
node_user -->|"uses offline map"| node_maps
node_maps -->|"provides map inventory"| node_storage
node_user -->|"searches library"| node_library
node_library -->|"supplies references"| node_llm
node_user -.->|"records audio"| node_recorder
node_user -.->|"sets reminders"| node_schedule
node_storage -->|"lists and deletes maps"| node_maps
node_storage -->|"lists and removes voices"| node_voice
node_storage -->|"lists and removes recordings"| node_recorder
node_internet -->|"provides downloads"| node_modelmgmt
node_chat -.->|"uses web tools"| node_internet

click node_app "https://github.com/coolchan03/atlas/blob/main/App.tsx"
click node_chat "https://github.com/coolchan03/atlas/tree/main/src/screens/ChatScreen"
click node_agents "https://github.com/coolchan03/atlas/tree/main/src/stores"
click node_chatdata "https://github.com/coolchan03/atlas/tree/main/src/stores"
click node_llm "https://github.com/coolchan03/atlas/tree/main/src/services"
click node_modelmgmt "https://github.com/coolchan03/atlas/blob/main/src/screens/DownloadManagerScreen/useDownloadManager.ts"
click node_image "https://github.com/coolchan03/atlas/tree/main/src/services"
click node_voice "https://github.com/coolchan03/atlas/tree/main/src/atlasVoice"
click node_native "https://github.com/coolchan03/atlas/tree/main/android/app/src/main/java/ai/offgridmobile/atlasdevice"
click node_rag "https://github.com/coolchan03/atlas/tree/main/src/services/rag"
click node_documents "https://github.com/coolchan03/atlas/tree/main/src/services"
click node_learning "https://github.com/coolchan03/atlas/blob/main/src/learning/engine.ts"
click node_study "https://github.com/coolchan03/atlas/blob/main/src/study/engine.ts"
click node_atlas "https://github.com/coolchan03/atlas/tree/main/src/atlasTools"
click node_maps "https://github.com/coolchan03/atlas/blob/main/src/atlasMaps/maps.ts"
click node_library "https://github.com/coolchan03/atlas/blob/main/src/atlasTools/offlineLibrary.ts"
click node_recorder "https://github.com/coolchan03/atlas/tree/main/src/atlasRecorder"
click node_schedule "https://github.com/coolchan03/atlas/tree/main/src/schedule"
click node_storage "https://github.com/coolchan03/atlas/blob/main/src/storage/storageGroups.ts"
click node_persistent "https://github.com/coolchan03/atlas/blob/main/src/stores/appStore.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_app,node_chat,node_agents,node_chatdata toneBlue
class node_llm,node_modelmgmt,node_image,node_voice,node_native toneAmber
class node_atlas,node_maps,node_library,node_recorder,node_schedule toneMint
class node_rag,node_documents,node_learning,node_study toneRose
class node_storage,node_persistent,node_user,node_internet toneIndigo
```

## Components

### Assistant and projects

- [App entry](https://github.com/coolchan03/atlas/blob/main/App.tsx): `App.tsx`
- [Chat experience](https://github.com/coolchan03/atlas/tree/main/src/screens/ChatScreen): `src/screens/ChatScreen`
- [Agents and projects](https://github.com/coolchan03/atlas/tree/main/src/stores): `src/stores`
- [Chat and project state](https://github.com/coolchan03/atlas/tree/main/src/stores): `src/stores`

### Models and media

- [Text inference](https://github.com/coolchan03/atlas/tree/main/src/services): `src/services`
- [Models and downloads](https://github.com/coolchan03/atlas/blob/main/src/screens/DownloadManagerScreen/useDownloadManager.ts): `src/screens/DownloadManagerScreen/useDownloadManager.ts`
- [Image generation](https://github.com/coolchan03/atlas/tree/main/src/services): `src/services`
- [Voice interaction](https://github.com/coolchan03/atlas/tree/main/src/atlasVoice): `src/atlasVoice`
- [Native device bridges](https://github.com/coolchan03/atlas/tree/main/android/app/src/main/java/ai/offgridmobile/atlasdevice): `android/app/src/main/java/ai/offgridmobile/atlasdevice`

### Offline field tools

- [Atlas field guide](https://github.com/coolchan03/atlas/tree/main/src/atlasTools): `src/atlasTools`
- [Offline maps](https://github.com/coolchan03/atlas/blob/main/src/atlasMaps/maps.ts): `src/atlasMaps/maps.ts`
- [Offline library](https://github.com/coolchan03/atlas/blob/main/src/atlasTools/offlineLibrary.ts): `src/atlasTools/offlineLibrary.ts`
- [Recordings](https://github.com/coolchan03/atlas/tree/main/src/atlasRecorder): `src/atlasRecorder`
- [Reminders](https://github.com/coolchan03/atlas/tree/main/src/schedule): `src/schedule`

### Knowledge and learning

- [Document retrieval](https://github.com/coolchan03/atlas/tree/main/src/services/rag): `src/services/rag`
- [Document handling](https://github.com/coolchan03/atlas/tree/main/src/services): `src/services`
- [Learning mode](https://github.com/coolchan03/atlas/blob/main/src/learning/engine.ts): `src/learning/engine.ts`
- [Study mode](https://github.com/coolchan03/atlas/blob/main/src/study/engine.ts): `src/study/engine.ts`

### Device services

- [Device storage](https://github.com/coolchan03/atlas/blob/main/src/storage/storageGroups.ts): `src/storage/storageGroups.ts`
- [Persisted app state](https://github.com/coolchan03/atlas/blob/main/src/stores/appStore.ts): `src/stores/appStore.ts`

### Other components

- **Person**
- **Internet tools**

## Connections

- Person → App entry: opens
- App entry → Chat experience: offers chat
- Person → Agents and projects: chooses agent
- Agents and projects → Chat experience: configures
- Chat experience → Text inference: requests answer (evidence: `src/screens/ChatScreen/useChatMessageHandlers.ts`)
- Text inference → Chat and project state: uses conversation (evidence: `src/services/researchReportStorage.ts`)
- Chat experience → Chat and project state: stores chats
- Person → Models and downloads: downloads models
- Models and downloads → Persisted app state: updates model state
- Person → Image generation: requests image
- Person → Voice interaction: speaks or listens
- Voice interaction → Native device bridges: uses device audio
- Person → Document handling: adds documents
- Document handling → Document retrieval: indexes content (evidence: `src/services/rag/index.ts`)
- Document retrieval → Text inference: checks generation (evidence: `src/services/rag/index.ts`)
- Document retrieval → Chat and project state: scopes project data (evidence: `src/services/rag/index.ts`)
- Person → Learning mode: starts learning
- Learning mode → Text inference: runs learning roles (evidence: `src/learning/engine.ts`)
- Person → Study mode: creates study material
- Study mode → Document retrieval: uses project sources (evidence: `src/study/engine.ts`)
- Person → Atlas field guide: opens field guide
- Person → Offline maps: uses offline map
- Offline maps → Device storage: provides map inventory (evidence: `src/storage/storageGroups.ts`)
- Person → Offline library: searches library
- Offline library → Text inference: supplies references
- Person → Recordings: records audio
- Person → Reminders: sets reminders
- Device storage → Offline maps: lists and deletes maps (evidence: `src/storage/storageGroups.ts`)
- Device storage → Voice interaction: lists and removes voices (evidence: `src/storage/storageGroups.ts`)
- Device storage → Recordings: lists and removes recordings (evidence: `src/storage/storageGroups.ts`)
- Internet tools → Models and downloads: provides downloads
- Chat experience → Internet tools: uses web tools
