Backend runtime and operations
RomM's backend turns a configured game library into a self-hosted API and work system. It stores durable library and account state in SQL, shares short-lived state and queued work through Redis or Valkey, runs long work outside request handling, and gives operators health, task, log, notification, and audit signals.
Runtime responsibilities
The backend has one request service and several supporting processes. Together they serve the API, reconcile the library, run long work, maintain shared user state, and connect browser play sessions to external streaming services.
The main relationships are:
flowchart LR
Client[Web or API client] --> Edge[Nginx edge]
Edge --> API[Gunicorn and FastAPI]
API --> DB[(SQL database)]
API --> Cache[(Redis or Valkey)]
API --> Files[Mounted library and resources]
Scheduler[Task scheduler] --> Queues[Task queues]
Worker[Task workers] --> Queues
API --> Queues
Watcher[Library and sync watchers] --> Queues
Worker --> DB
Worker --> Cache
Worker --> Files
API --> Providers[Metadata providers]
API --> Broker[Streaming brokers]
API --> Signals[Logs, health, sockets]
Worker --> Signals
The detailed assembly of the FastAPI service, middleware, sockets, and process context is covered in Backend runtime composition. The task model, schedules, worker behavior, and task status flow are covered in Background jobs and scheduling. Notification delivery and audit history are covered in Notifications and audit.
Startup lifecycle
Container startup
The container entry point loads secret values, renders edge-server settings, fixes resource links when the base path changes, and prepares the database before normal work begins. A supervisor watches child processes and shuts them down in a safe order. This makes the container the process boundary for the API, edge server, queue system, and optional watchers.
The container can run an internal Valkey service or use one external Redis or Valkey service shared by the API, workers, scheduler, and watchers. A stable deployment should provide a persistent authentication secret so replacement does not invalidate active sessions.
References: docker/…/docker-entrypoint.sh• L3-79 docker/…/init• L86-166 docker/…/init• L168-236 docker/…/init• L297-401
Application initialization
The API creates its shared application context during startup. It opens shared HTTP clients, starts the streaming grace period, and starts the operational log forwarder before normal requests depend on them. On shutdown it flushes pending activity and closes shared resources.
Authentication and session handling cover HTTP and WebSocket traffic. Upload limits protect storage and request workers before large save, state, screenshot, snapshot, sync, or memory-card bodies reach the file layer. Memory-card uploads use the lower of the general asset limit and the broker limit. Direct application startup also applies migrations and checks library, scheduler, and cache state before it serves requests.
References: backend/main.py• L88-186 backend/main.py• L227-244 backend/startup.py• L54-126 backend/startup.py• L138-229
Persistence and infrastructure
SQL state
The SQL database is the durable source for library records, accounts, permissions, user activity, media, save history, audit history, notifications, device state, and sync history. RomM supports MariaDB, MySQL, and PostgreSQL. Schema migrations bring the database to the release version before normal service work starts.
The database also supports fast library search and natural title ordering. ROM rows retain whether a sort key is user-set, so later name changes do not overwrite that choice. Platform rows can retain the original first release year found during metadata discovery. Recent migrations also move retired arcade board records to the shared arcade platform and add an index for platform and age-based ROM totals.
The database session boundary keeps request and worker work separate. MariaDB and MySQL connections use a safe isolation level where the server permits it, while statement-based binary logging keeps the server's required level.
References: backend/…/config_manager.py• L661-700 backend/…/base_handler.py• L14-22 backend/…/base_handler.py• L33-52 backend/…/rom.py• L139-155 backend/…/rom.py• L934-941 backend/…/rom.py• L1147-1159 backend/…/platform.py• L56-69 backend/…/0084_add_roms_search_index.py• L1-18 backend/…/0084_add_roms_search_index.py• L58-137 backend/…/0155_retired_arcade_slugs.py• L18-43 backend/…/0156_roms_platform_min_age_index.py• L17-27 backend/…/0157_rom_custom_sort_key_flag.py• L23-100 backend/…/0158_platform_first_release_year.py• L8-22
Redis and Valkey state
Redis or Valkey holds shared state that does not belong in SQL. The backend uses it for sessions, caches, task queues, task results, scheduled work, live logs, metadata indexes, pairing flows, and active streaming sessions. All processes use the same service so a task, session, or signal remains visible when another process handles the next request.
The service separates high-priority, default, low-priority, scan, and streaming work. Scan and streaming isolation keep long library work and broker waits from blocking unrelated jobs. Short-lived device authorization and client-token pairing state also live there and expire automatically.
References: backend/…/redis_handler.py• L13-101 backend/…/auth.py• L69-108 backend/…/client_tokens.py• L19-23 backend/…/client_tokens.py• L130-164 backend/…/client_tokens.py• L149-189
File and library state
The mounted file system is the source for ROMs, firmware, saves, states, screenshots, resources, uploads, cache files, configuration, and sync data. SQL indexes that. Scans compare the two and mark records missing when files leave the library instead of treating a database row as proof that a file still exists.
Platform names have one shared vocabulary across the library, metadata providers, and exports. Folder aliases map names used by systems such as Batocera, RetroBat, and ES-DE to that vocabulary. Arcade board aliases now resolve to the shared arcade family, while provider and feed groupings retain the platform differences needed by each external system. This lets scans and exports preserve the user's folder layout while providers and external frontends receive stable platform names.
References: backend/…/platform_slugs.py• L1-5 backend/…/platform_slugs.py• L11-499 backend/…/platform_aliases.py• L11-21 backend/…/platform_aliases.py• L40-55 backend/…/platform_aliases.py• L120-167 backend/…/platform_aliases.py• L178-217 backend/…/arcade_platforms.py• L8-38 backend/…/base_handler.py• L365-468 backend/…/roms_handler.py• L377-400 backend/…/roms_handler.py• L708-816
Authentication state
Authentication combines durable user records with short-lived session and token state. The backend accepts browser sessions, password credentials, OAuth access tokens, client tokens, OIDC identities, and kiosk access where enabled. A client token stores only a hash and a scope set; each request intersects those scopes with the owner's current permissions, so later permission changes also limit old tokens.
Device authorization lets a device start without credentials, while an authenticated user approves a short-lived request. The result is a device record and a client token bound to it. Password and credential changes revoke sessions and close token-backed sockets so old access does not remain live.
References: backend/…/hybrid_auth.py• L24-50 backend/…/hybrid_auth.py• L63-152 backend/…/rom_visibility.py• L34-47 backend/…/base_handler.py• L117-181 backend/…/client_token.py• L16-39 backend/…/client_tokens.py• L49-75 backend/…/auth.py• L150-270
Access visibility
The permission model combines a user's role, permission group, and per-user changes. A group grants read, write, or delete actions over broad entity types. An own-only grant applies only where the entity has an owner; ownerless actions use the broad grant instead.
A ROM visibility filter is a separate data rule. It removes hidden platforms, directly hidden ROMs, and ROMs above the user's age limit from queries and loaded results. Platform totals, collections, feeds, recommendations, and streaming checks use that same rule so a hidden item does not reappear through another response path.
References: backend/…/user.py• L28-40 backend/…/user.py• L72-93 backend/…/permission.py• L25-57 backend/…/permission.py• L89-171 backend/…/rom_visibility.py• L34-140 backend/…/platforms_handler.py• L32-79 backend/…/collections.py• L64-95 backend/…/feeds.py• L89-99
Streaming infrastructure
Browser streaming is an optional service boundary. RomM checks configured containers, groups compatible containers into pools, and claims one container for a user and platform. The live session is shared in Redis and records ownership, the running ROM, and the state-transfer rules used by later save and control requests.
The session owner controls the session. A scoped administrator can recover a session owned by another user. ROM and platform visibility still apply, so a hidden game is not exposed through a stream or a joinable-session list. A stale heartbeat lets the system recover a container after a closed tab or failed browser.
A pool is safe only when its members have matching emulator, core, protocol, and save behavior. When whole-card sync is enabled, RomM hydrates the owner's card before launch and evacuates it before release. Teardown stops the emulator before it reads or wipes the card, then records saves and states before the container returns to the pool.
References: backend/…/access.py• L54-155 backend/…/config.py• L160-234 backend/…/session_store.py• L34-73 backend/…/session_store.py• L220-260 backend/…/memory_cards.py• L1-7 backend/…/memory_cards.py• L196-226 backend/…/lifecycle.py• L117-129 backend/…/launch.py• L43-69
Background work
Queued work
Background work keeps scans, metadata updates, conversions, cleanup, synchronization, and other long operations out of request paths. The scheduler places recurring tasks on the right queue, and workers report progress and results through a common task record that the API and administration UI can inspect.
Tasks can be enabled by configuration, scheduled by cron, or started by an authorized user. Startup reconciles schedules so disabled work is removed and enabled work is present after a restart. Worker cleanup closes inherited database pools after fork, and killed jobs still pass through failure reporting.
Scheduled cleanup also prunes expired save-sync branches and unreachable archival saves. This removes old file content without removing the current save history that remains reachable through active branches or retained records.
The scheduled RetroAchievements progress task refreshes linked users' external game progress and stores the latest result. It also maps award levels to ROM completion status across every local ROM that shares the external game ID. A per-user refresh reports completion to the user's open tabs, while the scheduled run keeps processing other users when one refresh fails.
See Background jobs and scheduling for the task lifecycle and task families.
References: backend/…/redis_handler.py• L17-44 backend/…/rq_worker.py• L47-89 backend/…/tasks.py• L17-154 backend/…/registry.py• L193-230 backend/…/registry.py• L304-320 backend/…/prune_snapshots.py• L1-23 backend/…/sync_retroachievements_progress.py• L50-77 backend/…/sync_retroachievements_progress.py• L82-103 backend/…/sync_retroachievements_progress.py• L115-171 backend/…/tasks.py• L69-136 backend/…/tasks.py• L152-226
Metadata work
Metadata enrichment is an optional part of scan work. Local data and enabled remote providers can supply names, artwork, IDs, release data, and tags. The scan applies configured source priorities while preserving a manual or local choice when a remote lookup cannot answer.
IGDB responses use typed records for the requested game and platform data. Platform discovery can add current artwork and the earliest known release year to the durable platform record. Other scan services can derive RetroAchievements hashes and platform-native title IDs from supported ROM files. They resolve supported folder, archive, and playlist forms before hashing or reading a title ID, while missing tools, unsupported formats, and encrypted files without keys leave enrichment absent instead of stopping the scan.
Remote providers are best-effort dependencies. Requests use time, size, rate, and quota limits. Typed response checks report provider drift without making one incomplete response stop the whole library scan. Platform slug mappings keep provider names aligned with RomM's internal platform vocabulary. Facet data also accepts the structured name records used by provider metadata, so search and recommendation views can keep readable names.
References: backend/…/scan_handler.py• L102-151 backend/…/scan_handler.py• L597-718 backend/…/base_handler.py• L30-39 backend/…/response_validation.py• L8-87 backend/…/igdb.py• L64-143 backend/…/igdb.py• L168-218 backend/…/igdb_types.py• L7-16 backend/…/igdb_types.py• L285-341 backend/…/igdb_types.py• L401-473 backend/…/igdb_handler.py• L783-810 backend/…/rahasher.py• L194-300 backend/…/rahasher.py• L302-386 backend/…/sigil.py• L62-142 backend/…/facets.py• L4-17 backend/…/platform_slugs.py• L483-499
Library and sync events
The library watcher turns file changes into delayed scan requests. It filters excluded paths and merges activity for one platform so a burst of changes produces controlled scan work. A platform-folder change requests a wider rescan than a single file change.
Save synchronization is a separate flow. File-transfer events and SSH or SFTP jobs compare device and server saves, record a durable sync session, transfer newer data, and report conflicts without silently choosing a winner. The scheduled push-pull task applies this flow to enabled devices, also sends missing server saves to devices, and records each device's last-seen state.
The task keeps slot-bound saves in the device flow and leaves archival uploads outside device pairing. It reports start, progress, conflict, error, and completion events while keeping per-file failures separate from failures that stop the full device session.
A manual folder scan provides recovery when file events are missed.
References: backend/watcher.py• L54-70 backend/watcher.py• L117-150 backend/sync_watcher.py• L71-203 backend/…/sync_folder_scan.py• L1-62 backend/…/sync_push_pull_task.py• L35-66 backend/…/sync_push_pull_task.py• L69-129 backend/…/sync_push_pull_task.py• L131-225 backend/…/sync_push_pull_task.py• L239-396 backend/…/sync_sessions_handler.py• L14-215
Operational signals
Health and capability signals
The heartbeat endpoint gives clients a compact view of runtime capability. It reports release and setup state, enabled metadata sources, discovered platforms, feature switches, identity-provider state, and selected task or streaming settings. Provider checks are separate and bounded so a slow external service does not block the main health view.
References: backend/…/heartbeat.py• L67-216 backend/…/igdb_handler.py• L754-767 backend/…/hasheous_handler.py• L227-239
Task and scan signals
The task status API combines queue state, worker state, finished work, failed work, and task-specific progress. Scan work also emits progress and ROM-level events so the web client can refresh its view without treating events as the durable library state.
When a worker dies or a scan times out before it reports completion, the worker failure path emits a terminal scan event, records the failure, and notifies the affected user or administrators. This prevents a dead scan from remaining active in the client.
User-specific RetroAchievements refreshes emit a completion event after the refresh attempt. The event carries success or failure so open client tabs can stop waiting without using the event as the durable progress record.
References: backend/…/tasks.py• L152-226 backend/…/tasks.py• L267-335 backend/…/scan.py• L122-179 backend/…/scan_handler.py• L709-717 backend/…/scan_handler.py• L1144-1183 backend/…/sync_retroachievements_progress.py• L115-131
Log and realtime signals
Standard output is the primary backend log stream. RomM also sends redacted records to a bounded Redis buffer and pub/sub channel. The API can return recent records, while one forwarder relays new records to administrator Socket.IO clients. Redis delivery is an extra signal, so a Redis error does not stop application work or hide standard output.
The same shared channel lets API and worker processes publish realtime events. Authenticated and administrator rooms remain separate from unauthenticated netplay rooms. A socket retains the session that opened it, so session revocation can close it across workers.
References: backend/…/log_stream_handler.py• L8-37 backend/…/log_stream_handler.py• L39-63 backend/…/logs.py• L16-40 backend/…/socket_handler.py• L20-104 backend/…/scan.py• L199-220
Notification and audit signals
Audit events provide durable history for important user and system actions. User notifications remain in SQL until read or deleted, while enabled notification channels track delivery state and errors. Repeated delivery failures disable a channel so one broken destination does not create endless work.
See Notifications and audit for the delivery flow, audit visibility, retention, and channel rules.
References: backend/…/client_tokens.py• L54-60 backend/…/auth.py• L259-270 backend/…/user.py• L613-637 backend/…/notification_handler.py• L1-120 backend/…/audit_events_handler.py• L25-163 backend/…/notification_channels_handler.py• L46-200
Deployment model
Production image
The production image combines the built web client, Python backend, native helpers, browser-player assets, Valkey, and Nginx. Its build also brings Python dependencies into the runtime as a separate virtual environment and compiles the backend before the image runs. /romm and /redis-data are persistent volume roots so library files, resources, uploads, configuration, cache data, and internal Valkey data survive container replacement.
The slim image omits optional emulator bundles. The full image adds them. Development variants reuse the image layers with development dependencies.
References: docker/Dockerfile• L291-393 Dockerfile• L5-154
Edge routing
Nginx serves the web client and resource paths, forwards API and realtime traffic to FastAPI, and applies browser-player headers. It serves internal library and converted-cache paths only through backend-controlled routes. Cache rules vary by resource type so versioned assets can stay cached while stable-name resources revalidate.
Feeds generate download links through the same protected content routes. Their platform and ROM lists apply the caller's visibility filter and require files on disk, so an external client receives only content it can reach.
References: docker/…/docker-entrypoint.sh• L36-79 docker/…/default.conf.template• L5-142 backend/…/feeds.py• L63-99 backend/…/feeds.py• L118-177
Service topology
The supported deployment pairs one RomM container with a SQL database. Redis or Valkey can run inside the RomM container or as an external service. Compose examples mount the library and resource paths, wait for the database, and provide service names for the backing systems.
The development Compose file pins the project network name to romm so OIDC and streaming overlays can join it. It runs the application shell with source and mock-library mounts, then connects it to separate MariaDB and Valkey services through the romm-db-dev and romm-valkey-dev service names. It exposes development, API, HTTPS, and debug ports, so it is a local integration layout rather than a production process topology.
The optional OIDC Compose overlay runs an Authentik server and worker with a separate PostgreSQL database. It uses its own Compose project but joins the external romm_default network, so Authentik can reach the development Valkey service and the backend can reach the OIDC issuer by service name. Its database and Authentik media use named volumes, while published ports serve the issuer to the browser.
In every topology, database settings, shared cache settings, volume paths, service names, and RomM configuration must describe the same services and files.
References: examples/docker-compose.example.yml• L1-54 docker-compose.yml• L3-64 docker-compose.oidc.yml• L1-83 env.template• L1-26
Change checklist
When these files or sections are changed, remember to consider these:
- When permission entities, actions, roles, ownership rules, or age visibility change, keep migrations, resolver rules, endpoint guards, query filters, platform totals, collections, feeds, recommendations, client-token scope intersection, and streaming access aligned.
- When a permission change affects a user, preserve cache invalidation, permission-change events, and closure of that user's client-token sockets.
- When client-token or device-pairing state changes, keep Redis key expiry, one-time consumption, stored hashes, scope limits, device binding, last-used updates, and socket revocation aligned.
- When Redis key or queue behavior changes, check sessions, task state, log delivery, Socket.IO fan-out, pairing flows, metadata caches, and streaming sessions together.
- When platform names, arcade groups, aliases, or provider mappings change, update the shared slug vocabulary, database migration, filesystem aliases, scan lookup, platform totals, feeds, and export names together.
- When provider response shapes change, keep typed validation, retry and rate limits, provider health checks, facet names, and scan fallback behavior aligned.
- When provider platform discovery changes, keep typed provider fields, scan merging, platform persistence, and API response data aligned.
- When ROM sort-key rules change, keep runtime derivation, the custom-key flag, migration backfills, and search and sort indexes aligned.
- When title-ID or external hash extraction changes, keep platform mappings, scan feature flags, playlist and archive handling, optional dependency behavior, and stored metadata aligned.
- When external progress synchronization changes, keep award-to-status mapping, shared external IDs across local ROMs, stale-write protection, task progress, and the user completion event aligned.
- When snapshot retention changes, keep branch expiry, reachability cleanup, content-row removal, save-history links, and the scheduled prune task aligned.
- When push-pull sync changes, keep device mode selection, slot-bound save filtering, SSH/SFTP paths, sync-session counts, conflict handling, last-seen updates, and realtime sync events aligned.
- When a persistent path or library layout changes, update volume mounts, scanner discovery, watcher paths, edge aliases, feeds, and export paths as one contract.
- When the backend bind port or WebSocket path changes, keep the process manager, Nginx, readiness checks, published ports, and Socket.IO paths aligned.
- When Compose project names, service names, or overlay network assumptions change, keep the OIDC overlay's separate project, the external
romm_defaultnetwork, streaming overlays,DB_HOST,REDIS_HOST, published ports, and startup dependencies aligned. - When streaming access or container pooling changes, keep ROM visibility, session ownership, claim stamps, pool compatibility, stale-session takeover, memory-card isolation, and save or card transfer rules aligned.
- When audit or notification state changes, keep event targets, visibility filters, retention, channel failure tracking, and user delivery state aligned.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Database settings point to an unsupported or unreachable server | The backend cannot finish startup or run migration work | Validate the selected driver and server before startup |
| Redis or Valkey is unavailable | Sessions, queues, pairing state, live logs, Socket.IO fan-out, and streaming state fail or become incomplete | Use one reachable shared service and keep readiness checks active |
| The container generates a new authentication secret after replacement | Existing browser sessions and signed tokens become invalid | Set a stable ROMM_AUTH_SECRET_KEY |
| A Compose project name or service name no longer matches an overlay or host setting | OIDC or streaming overlays cannot join the expected network, or the app cannot reach MariaDB or Valkey | Preserve the pinned romm network and align DB_HOST, REDIS_HOST, and overlay service names |
| A permission grant uses own-only on an ownerless entity | The grant has no meaningful owner boundary and can drift from the enforced model | Reject new values and migrate old rows to the broad action scope |
| A client token keeps scopes that its owner no longer holds | The token could expose more access than the account now has | Intersect stored scopes with current user scopes on every authentication |
| A device pairing code or token poll is replayed or polled too fast | An untrusted device can consume a flow or overload the authorization path | Use short Redis TTLs, one-time consumption, and per-IP or per-code limits |
| A hidden or over-age ROM or platform is exposed through a feed, collection, recommendation, or stream listing | A user can learn about or access library content outside their visibility | Apply the shared visibility filter to queries, totals, feeds, downloads, and streaming |
| A provider response changes shape or becomes unavailable | One ROM can keep incomplete metadata, while a strict top-level mismatch can return no provider data | Log typed mismatches, bound requests, and keep provider failure local to the scan |
| A migration runs without the required database feature or permission | Startup can stop before the API serves requests, or search and sort support can remain incomplete | Use backend-specific migration branches and verify schema state after upgrades |
| A queue name or worker role changes without its scheduler and watcher paths | Work stays queued or long scans compete with normal jobs | Keep queue declarations, worker commands, scheduler entries, and enqueue calls aligned |
| A worker dies or a scan exceeds its limit before its terminal event | The client can show a scan that is no longer running | Route killed and timed-out jobs through failure reporting and terminal notifications |
| A user's external progress refresh is rejected as stale | Durable progress and ROM completion status remain at the prior value | Preserve freshness checks and do not replace a newer stored progression |
| A ROM status update fails during an external progress refresh | Progress is stored but one or more local completion statuses can remain old | Keep the status update best effort and allow a later sync to retry it |
| A hash or title-ID tool lacks a required binary, key, or supported file form | ROM enrichment remains absent, and external matching can be less complete | Treat extraction as optional and resolve supported archives, playlists, and platform forms before the tool call |
| A scheduled snapshot prune removes a branch without checking reachability | A save or content row still needed by another branch can be lost | Prune expired branches first and remove only content that is no longer reachable |
| An SSH/SFTP device is unreachable or has no save directory | Its sync session fails or completes without transfer, while other devices can still run | Record the device result and session state, close the connection, and continue the device loop |
| A remote save and server save both changed after their last common sync | The system could overwrite one side and lose user data | Record a conflict and require an explicit resolution instead of choosing a winner |
| A persistent volume or base path differs between processes | API, workers, watchers, Nginx, and broker containers see different library or resource state | Match mounts, configured paths, aliases, and broker paths across the topology |
Key files
| File | Why to read it |
|---|---|
docker/init_scripts/init | Defines process startup order, readiness waits, supervision, and shutdown. |
| docker/…/docker-entrypoint.sh | Shows secret loading, edge configuration, path defaults, and the container boundary. |
| backend/main.py | Shows the application lifecycle, middleware, upload limits, and runtime mounts. |
| backend/startup.py | Shows work that must happen before normal operation. |
| backend/…/__init__.py | Defines environment-backed runtime settings for persistence, task schedules, sync, retention, and service limits. |
| backend/…/config_manager.py | Defines user configuration, database selection, library layout, and streaming settings. |
| backend/…/redis_handler.py | Defines shared Redis clients and queue roles. |
| backend/…/base_handler.py | Defines the shared SQL engine and session boundary. |
| backend/…/rom.py | Shows durable ROM search and sort state, including custom sort choices. |
| backend/…/platform.py | Shows the durable platform identity and release-year state. |
| backend/…/permission.py | Defines permission entities, actions, ownership, and visibility records. |
| backend/…/rom_visibility.py | Defines the shared hidden-platform, hidden-ROM, and age visibility rule. |
| backend/…/hybrid_auth.py | Shows how sessions, password credentials, OAuth, client tokens, and kiosk access enter the request system. |
| backend/…/auth.py | Shows the device pairing flow from open request to bound client token. |
| backend/…/scan_handler.py | Connects file state, metadata providers, database state, and scan signals. |
| backend/…/igdb.py | Connects IGDB metadata to game and platform discovery. |
| backend/…/igdb_types.py | Defines the typed provider records used by IGDB requests. |
| backend/…/rahasher.py | Shows how supported ROM forms become RetroAchievements hashes. |
| backend/…/sigil.py | Shows optional extraction of platform-native title IDs. |
| backend/…/sync_retroachievements_progress.py | Shows external progress refresh, local completion status updates, and user completion signals. |
| backend/…/prune_snapshots.py | Shows scheduled removal of expired branches and unreachable save content. |
| backend/…/sync_push_pull_task.py | Shows device save comparison, transfer, conflict reporting, and sync session signals. |
| backend/…/platform_aliases.py | Shows how external folder names map to the shared platform vocabulary. |
| backend/…/arcade_platforms.py | Shows the shared arcade groups used by providers, the player, and feeds. |
| backend/…/registry.py | Defines task names, schedules, queues, and manual-task policy. |
| backend/…/rq_worker.py | Shows worker failure reporting and database-pool cleanup. |
| backend/…/tasks.py | Shows how operators start and inspect background work. |
| backend/…/log_stream_handler.py | Defines the shared operational log buffer and pub/sub signal. |
| backend/…/socket_handler.py | Defines shared realtime channels and session-bound socket cleanup. |
| backend/…/config.py | Resolves streaming configuration into compatible container pools and capabilities. |
| backend/…/access.py | Shows streaming ownership, visibility, and container-session resolution. |
| backend/…/session_store.py | Defines shared session claims, expiry, and compare-and-set updates. |
| backend/…/lifecycle.py | Shows the order for stopping sessions, transferring saves, and releasing containers. |
| backend/…/memory_cards.py | Shows whole-card isolation and card transfer rules. |
| backend/…/streaming.py | Shows the user-facing streaming lifecycle and claim behavior. |
| backend/…/audit_events_handler.py | Shows durable audit history and retention. |
| backend/…/notification_channels_handler.py | Shows delivery state and channel disablement after repeated failures. |
| backend/…/0084_add_roms_search_index.py | Defines the database search and natural-sort support for ROMs. |
| backend/…/0157_rom_custom_sort_key_flag.py | Preserves the difference between derived and user-set ROM sort keys. |
| backend/…/0158_platform_first_release_year.py | Adds durable platform release-year state. |
Dockerfile | Defines development runtime layers and native helpers. |
docker/Dockerfile | Defines the production image, runtime Python environment, compiled backend, and persistent volume roots. |
| docker-compose.yml | Defines the local integration topology, fixed Compose network, service names, mounts, and development ports. |
| docker-compose.oidc.yml | Defines the optional Authentik OIDC overlay, its PostgreSQL state, and its shared development network. |
| examples/docker-compose.example.yml | Provides the main deployment topology and volume contract. |
docker/nginx/templates/default.conf.template | Defines edge routing for static, API, download, player, resource, and realtime traffic. |