# nativephp/dev-null-app architecture

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

- Interactive diagram: https://gitdiagram.com/nativephp/dev-null-app
- Repository: https://github.com/nativephp/dev-null-app

## Overview

This is the Laravel-backed NativePHP mobile client for devnull, a developer social network presented as a git log. Users authenticate with a device-held SSH key, then browse and interact with commits, people, organizations, guilds, conversations, notifications, and scheduled posts through native screens backed by devnull’s signed API. The graph keeps these domain areas distinct and includes local caching, queued writes, and native calling. README and excerpts establish the client/API and selected wiring; other major screen relationships are shown only where the route index or explicit documentation supports them.

Main entry points: [`app/Devnull/Client.php`](https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/Client.php) (Signed API client), [`app/NativeComponents/Layouts/TabsLayout.php`](https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Layouts/TabsLayout.php) (App navigation), [`app/NativeComponents/Conversation.php`](https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Conversation.php) (Conversations), [`app/Devnull/SignIn.php`](https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/SignIn.php) (Sign-in flow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Mobile app"]
  node_tabs["App navigation<br/>[TabsLayout.php]"]
end

subgraph group_identity["Identity and transport"]
  node_signin["Sign-in flow<br/>[SignIn.php]"]
  node_authcallback["Auth callback<br/>[AuthCallback.php]"]
  node_devicekey["Device SSH key<br/>[DeviceKey.php]"]
  node_keystore["Key storage"]
  node_client["Signed API client<br/>[Client.php]"]
end

subgraph group_social["Social activity"]
  node_log["Commit log<br/>[Log.php]"]
  node_commitdata["Commit models<br/>[Commit.php]"]
  node_search["Search<br/>[Search.php]"]
  node_notifications["Notifications<br/>[Notifications.php]"]
  node_organization["Organizations<br/>[Organization.php]"]
  node_guilds["Guilds<br/>[Guilds.php]"]
  node_scheduled["Scheduled commits"]
end

subgraph group_messaging["Messaging and calls"]
  node_conversation["Conversations<br/>[Conversation.php]"]
  node_messages["Message models<br/>[Message.php]"]
  node_call["Native calling<br/>[Call.php]"]
  node_callplugin["Calls plugin<br/>[Calls.php]"]
end

subgraph group_state["Local state"]
  node_account[("Account cache<br/>[Account.php]")]
  node_responsecache[("Response cache<br/>[ResponseCache.php]")]
  node_pendingwrites[("Pending writes<br/>[PendingWrite.php]")]
  node_images[("Image cache<br/>[ImageCache.php]")]
end

node_user(("Mobile user"))
node_devnull{{"devnull API"}}

node_user -->|"uses"| node_tabs
node_tabs -->|"opens"| node_log
node_tabs -->|"opens"| node_notifications
node_tabs -->|"opens"| node_guilds
node_user -->|"signs in"| node_signin
node_signin -->|"returns code"| node_authcallback
node_authcallback -->|"exchanges code"| node_client
node_signin -->|"proves identity"| node_devicekey
node_devicekey -->|"stores secret"| node_keystore
node_client -->|"signed requests"| node_devnull
node_client -->|"uses cache"| node_responsecache
node_log -.->|"loads feed"| node_client
node_log -.->|"renders commits"| node_commitdata
node_search -->|"searches API"| node_client
node_search -->|"maps results"| node_commitdata
node_notifications -.->|"loads alerts"| node_client
node_organization -.->|"loads organization"| node_client
node_guilds -.->|"loads guilds"| node_client
node_scheduled -.->|"manages posts"| node_client
node_conversation -.->|"loads messages"| node_client
node_conversation -.->|"renders messages"| node_messages
node_conversation -.->|"queues writes"| node_pendingwrites
node_call -.->|"uses native calls"| node_callplugin
node_client -.->|"updates account"| node_account
node_client -.->|"loads images"| node_images

click node_tabs "https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Layouts/TabsLayout.php"
click node_signin "https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/SignIn.php"
click node_authcallback "https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/AuthCallback.php"
click node_devicekey "https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/DeviceKey.php"
click node_keystore "https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/KeyStores/NoSecureStorage.php"
click node_client "https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/Client.php"
click node_account "https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/Account.php"
click node_responsecache "https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/ResponseCache.php"
click node_pendingwrites "https://github.com/nativephp/dev-null-app/blob/main/app/Models/PendingWrite.php"
click node_log "https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Log.php"
click node_commitdata "https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/Data/Commit.php"
click node_search "https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Search.php"
click node_notifications "https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Notifications.php"
click node_organization "https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Organization.php"
click node_guilds "https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Guilds.php"
click node_scheduled "https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/ScheduledCommits.php"
click node_conversation "https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Conversation.php"
click node_messages "https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/Data/Message.php"
click node_call "https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Call.php"
click node_callplugin "https://github.com/nativephp/dev-null-app/blob/main/packages/calls/src/Calls.php"
click node_images "https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/ImageCache.php"

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_tabs,node_user toneBlue
class node_signin,node_authcallback,node_devicekey,node_keystore,node_client toneAmber
class node_log,node_commitdata,node_search,node_notifications,node_organization,node_guilds,node_scheduled,node_devnull toneMint
class node_conversation,node_messages,node_call,node_callplugin toneRose
class node_account,node_responsecache,node_pendingwrites,node_images toneIndigo
```

## Components

### Mobile app

- [App navigation](https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Layouts/TabsLayout.php): `app/NativeComponents/Layouts/TabsLayout.php`

### Identity and transport

- [Sign-in flow](https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/SignIn.php): `app/Devnull/SignIn.php`
- [Auth callback](https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/AuthCallback.php): `app/NativeComponents/AuthCallback.php`
- [Device SSH key](https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/DeviceKey.php): `app/Devnull/DeviceKey.php`
- [Key storage](https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/KeyStores/NoSecureStorage.php): `app/Devnull/KeyStores/NoSecureStorage.php`
- [Signed API client](https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/Client.php): `app/Devnull/Client.php`

### Social activity

- [Commit log](https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Log.php): `app/NativeComponents/Log.php`
- [Commit models](https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/Data/Commit.php): `app/Devnull/Data/Commit.php`
- [Search](https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Search.php): `app/NativeComponents/Search.php`
- [Notifications](https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Notifications.php): `app/NativeComponents/Notifications.php`
- [Organizations](https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Organization.php): `app/NativeComponents/Organization.php`
- [Guilds](https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Guilds.php): `app/NativeComponents/Guilds.php`
- [Scheduled commits](https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/ScheduledCommits.php): `app/NativeComponents/ScheduledCommits.php`

### Messaging and calls

- [Conversations](https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Conversation.php): `app/NativeComponents/Conversation.php`
- [Message models](https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/Data/Message.php): `app/Devnull/Data/Message.php`
- [Native calling](https://github.com/nativephp/dev-null-app/blob/main/app/NativeComponents/Call.php): `app/NativeComponents/Call.php`
- [Calls plugin](https://github.com/nativephp/dev-null-app/blob/main/packages/calls/src/Calls.php): `packages/calls/src/Calls.php`

### Local state

- [Account cache](https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/Account.php): `app/Devnull/Account.php`
- [Response cache](https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/ResponseCache.php): `app/Devnull/ResponseCache.php`
- [Pending writes](https://github.com/nativephp/dev-null-app/blob/main/app/Models/PendingWrite.php): `app/Models/PendingWrite.php`
- [Image cache](https://github.com/nativephp/dev-null-app/blob/main/app/Devnull/ImageCache.php): `app/Devnull/ImageCache.php`

### Other components

- **Mobile user**
- **devnull API**

## Connections

- Mobile user → App navigation: uses
- App navigation → Commit log: opens (evidence: `app/NativeComponents/Layouts/TabsLayout.php`)
- App navigation → Notifications: opens (evidence: `app/NativeComponents/Layouts/TabsLayout.php`)
- App navigation → Guilds: opens (evidence: `app/NativeComponents/Layouts/TabsLayout.php`)
- Mobile user → Sign-in flow: signs in (evidence: `README.md`)
- Sign-in flow → Auth callback: returns code (evidence: `app/NativeComponents/AuthCallback.php`)
- Auth callback → Signed API client: exchanges code (evidence: `app/NativeComponents/AuthCallback.php`)
- Sign-in flow → Device SSH key: proves identity (evidence: `README.md`)
- Device SSH key → Key storage: stores secret (evidence: `app/Devnull/DeviceKey.php`)
- Signed API client → devnull API: signed requests (evidence: `README.md`)
- Signed API client → Response cache: uses cache (evidence: `app/Devnull/Client.php`)
- Commit log → Signed API client: loads feed
- Commit log → Commit models: renders commits
- Search → Signed API client: searches API (evidence: `app/NativeComponents/Search.php`)
- Search → Commit models: maps results (evidence: `app/NativeComponents/Search.php`)
- Notifications → Signed API client: loads alerts
- Organizations → Signed API client: loads organization
- Guilds → Signed API client: loads guilds
- Scheduled commits → Signed API client: manages posts
- Conversations → Signed API client: loads messages
- Conversations → Message models: renders messages
- Conversations → Pending writes: queues writes
- Native calling → Calls plugin: uses native calls
- Signed API client → Account cache: updates account
- Signed API client → Image cache: loads images (evidence: `app/Devnull/Client.php`)
