# c4rl0s79/emustartnxt architecture

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

- Interactive diagram: https://gitdiagram.com/c4rl0s79/emustartnxt
- Repository: https://github.com/c4rl0s79/emustartnxt

## Overview

EmuStartNXT combines Lumen, an Electron/React launcher, with the EmuStart engine and server. The user-facing flow is library browsing and management in Lumen, with the engine providing EmuStart services for server exchange; the documented direction is that Lumen reads local media while EmuStart handles server data exchange. The graph preserves library, artwork, profiles, saves, device sync, and server-access capabilities. Several engine subsystems are unsampled, so edges are limited to README statements and source-index references.

Main entry points: [`lumen/src/renderer/src/App.tsx`](https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/src/renderer/src/App.tsx) (Launcher UI), [`emustart/emustart/syncclient.py`](https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/syncclient.py) (Save sync client), [`lumen/src/main/library/service.ts`](https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/src/main/library/service.ts) (Library service), [`lumen/engine/engine_main.py`](https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/engine/engine_main.py) (Engine process)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lumen["Lumen launcher"]
  node_ui["Launcher UI<br/>[App.tsx]"]
  node_library_service["Library service<br/>[service.ts]"]
  node_launchbox["LaunchBox integration<br/>[service.ts]"]
  node_artwork["Artwork management<br/>[artSync.ts]"]
end

subgraph group_engine["EmuStart client engine"]
  node_engine_process["Engine process<br/>[engine_main.py]"]
  node_engine_api["Engine API<br/>[lumen.py]"]
  node_client_api["Device API client<br/>[remote.py]"]
  node_library_sync["Library sync<br/>[libsync.py]"]
  node_file_source["Remote file access<br/>[netsrc.py]"]
  node_profile_manager["Player profiles<br/>[profiles.py]"]
  node_save_bundles["Save bundles<br/>[savebundles.py]"]
  node_save_sync["Save sync client<br/>[syncclient.py]"]
  node_save_slots["Save slots<br/>[saveslots.py]"]
end

subgraph group_server["EmuStart server"]
  node_server_http["Server HTTP routing<br/>[server.py]"]
  node_server_remote["Device endpoints<br/>[remote.py]"]
  node_server_public["Public access<br/>[public.py]"]
  node_server_library[("Server library sync<br/>[library.py]")]
  node_server_save_sync["Server save sync<br/>[savesync.py]"]
end

subgraph group_shared["Local data and media"]
  node_library_db[("Game library<br/>[library.py]")]
  node_local_media["Local media files<br/>[localMedia.ts]"]
end

node_user(("User"))
node_server_actor{{"EmuStart server"}}

node_user -->|"browses"| node_ui
node_ui -->|"requests library"| node_library_service
node_library_service -->|"merges library data"| node_library_db
node_library_service -->|"uses lookup and builder"| node_launchbox
node_ui -.->|"manages artwork"| node_artwork
node_ui -.->|"starts engine"| node_engine_process
node_engine_process -->|"attaches API"| node_engine_api
node_engine_process -->|"starts server"| node_server_http
node_engine_api -.->|"reads local media"| node_local_media
node_server_http -->|"routes device requests"| node_server_remote
node_server_remote -.->|"serves library data"| node_server_library
node_server_remote -.->|"serves save operations"| node_server_save_sync
node_client_api -.->|"exchanges data"| node_server_actor
node_library_sync -->|"updates library"| node_library_db
node_file_source -.->|"reads game files"| node_server_actor
node_profile_manager -.->|"stores profile data"| node_library_db
node_save_sync -->|"packages saves"| node_save_bundles
node_save_sync -->|"checks slots"| node_save_slots
node_save_sync -.->|"syncs saves"| node_server_save_sync
node_server_http -->|"checks public access"| node_server_public

click node_ui "https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/src/renderer/src/App.tsx"
click node_library_service "https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/src/main/library/service.ts"
click node_launchbox "https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/src/main/launchbox/service.ts"
click node_artwork "https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/src/main/art/artSync.ts"
click node_engine_process "https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/engine/engine_main.py"
click node_engine_api "https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/engine/emustart/lumen.py"
click node_client_api "https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/remote.py"
click node_library_db "https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/library.py"
click node_library_sync "https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/libsync.py"
click node_file_source "https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/netsrc.py"
click node_profile_manager "https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/profiles.py"
click node_save_bundles "https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/savebundles.py"
click node_save_sync "https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/syncclient.py"
click node_save_slots "https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/saveslots.py"
click node_server_http "https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/server.py"
click node_server_remote "https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/remote.py"
click node_server_public "https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/public.py"
click node_server_library "https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/library.py"
click node_server_save_sync "https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/savesync.py"
click node_local_media "https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/src/main/localMedia.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_ui,node_library_service,node_launchbox,node_artwork,node_user toneBlue
class node_engine_process,node_engine_api,node_client_api,node_library_sync,node_file_source,node_profile_manager,node_save_bundles,node_save_sync,node_save_slots toneAmber
class node_server_http,node_server_remote,node_server_public,node_server_library,node_server_save_sync,node_server_actor toneMint
class node_library_db,node_local_media toneRose
```

## Components

### Lumen launcher

- [Launcher UI](https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/src/renderer/src/App.tsx): `lumen/src/renderer/src/App.tsx`
- [Library service](https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/src/main/library/service.ts): `lumen/src/main/library/service.ts`
- [LaunchBox integration](https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/src/main/launchbox/service.ts): `lumen/src/main/launchbox/service.ts`
- [Artwork management](https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/src/main/art/artSync.ts): `lumen/src/main/art/artSync.ts`

### EmuStart client engine

- [Engine process](https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/engine/engine_main.py): `lumen/engine/engine_main.py`
- [Engine API](https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/engine/emustart/lumen.py): `lumen/engine/emustart/lumen.py`
- [Device API client](https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/remote.py): `emustart/emustart/remote.py`
- [Library sync](https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/libsync.py): `emustart/emustart/libsync.py`
- [Remote file access](https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/netsrc.py): `emustart/emustart/netsrc.py`
- [Player profiles](https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/profiles.py): `emustart/emustart/profiles.py`
- [Save bundles](https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/savebundles.py): `emustart/emustart/savebundles.py`
- [Save sync client](https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/syncclient.py): `emustart/emustart/syncclient.py`
- [Save slots](https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/saveslots.py): `emustart/emustart/saveslots.py`

### EmuStart server

- [Server HTTP routing](https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/server.py): `emustart/emustart/server.py`
- [Device endpoints](https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/remote.py): `emustart/emustart/remote.py`
- [Public access](https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/public.py): `emustart/emustart/public.py`
- [Server library sync](https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/library.py): `emustart/emustart/library.py`
- [Server save sync](https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/savesync.py): `emustart/emustart/savesync.py`

### Local data and media

- [Game library](https://github.com/c4rl0s79/emustartnxt/blob/main/emustart/emustart/library.py): `emustart/emustart/library.py`
- [Local media files](https://github.com/c4rl0s79/emustartnxt/blob/main/lumen/src/main/localMedia.ts): `lumen/src/main/localMedia.ts`

### Other components

- **User**
- **EmuStart server**

## Connections

- User → Launcher UI: browses (evidence: `lumen/src/renderer/src/App.tsx`)
- Launcher UI → Library service: requests library (evidence: `lumen/src/renderer/src/App.tsx`)
- Library service → Game library: merges library data (evidence: `lumen/src/main/library/service.ts`)
- Library service → LaunchBox integration: uses lookup and builder (evidence: `lumen/src/main/library/service.ts`)
- Launcher UI → Artwork management: manages artwork
- Launcher UI → Engine process: starts engine
- Engine process → Engine API: attaches API (evidence: `lumen/engine/engine_main.py`)
- Engine process → Server HTTP routing: starts server (evidence: `lumen/engine/engine_main.py`)
- Engine API → Local media files: reads local media
- Server HTTP routing → Device endpoints: routes device requests (evidence: `emustart/emustart/server.py`)
- Device endpoints → Server library sync: serves library data (evidence: `emustart/emustart/remote.py`)
- Device endpoints → Server save sync: serves save operations (evidence: `emustart/emustart/remote.py`)
- Device API client → EmuStart server: exchanges data
- Library sync → Game library: updates library (evidence: `emustart/emustart/libsync.py`)
- Remote file access → EmuStart server: reads game files
- Player profiles → Game library: stores profile data (evidence: `emustart/emustart/profiles.py`)
- Save sync client → Save bundles: packages saves (evidence: `emustart/emustart/syncclient.py`)
- Save sync client → Save slots: checks slots (evidence: `emustart/emustart/syncclient.py`)
- Save sync client → Server save sync: syncs saves (evidence: `emustart/emustart/syncclient.py`)
- Server HTTP routing → Public access: checks public access (evidence: `emustart/emustart/server.py`)
