Code map
Where to read and change each part of Akari.
Repository structure
| Path | Responsibility |
|---|---|
apps/greeter/lib/app/app.dart | Application lifetime, selected theme, shared GreeterFeature, and multi-display views |
apps/greeter/lib/infrastructure/ | D-Bus gateway (GreeterDbusGateway) and session preference storage |
packages/greeter_ui/ | Greeter business state, typed commands, and GreeterSceneAdapter |
packages/theme_sdk/ | Public GreeterHost, slot types, and ThemeDefinition contracts |
packages/scene_schema/ | Flutter-free scene model, codec, conditions, and component/layout/preset authoring contracts |
packages/scene/ | SceneRuntime, ThemeBundle, background renderers, and motion lifecycle |
packages/scene_codegen/ | Build-time *.scene.json to *.scene.g.dart code generator |
packages/greeter_components/ | Optional reusable widget set (StandardGreeterComponents) |
packages/theme_project/ | Pure Dart project validation, scene discovery, and independent theme synthesis |
packages/greeter_harness/ | Shared preview journeys, frame attribution, report aggregation, and Timeline summaries |
packages/theme_studio/ | Internal model/, ui/, resources/, authoring/, preview/, timeline/, canvas/, inspector/, and workspace/ domains |
themes/ | Independent compiled theme packages (default, fallback, preset1) and perf suites |
crates/akari-backend/src/ | Rust D-Bus service, authentication actor, greetd transport, and session/user catalogs |
apps/greeter/linux/ | Native GTK/Flutter runner and multi-monitor window management |
crates/akari-splash/ | Standalone Rust DRM/KMS and windowed startup splash renderer |
packages/akari_cli/ | akari CLI grammar, theme host generator, and run report engine |
scripts/ | Toolchain bootstrap, Sway session runner, and login/harness controllers |
system/ | Production systemd, greetd, Sway, and VT handoff assets |
test/probes/ | Interactive terminal and shell completion probes |
test/workflows/ | Python deployment and native compositor regression tests; Dart tests live with their app/package |
Trace common workflows
1. Theme build & host generation
packages/akari_cli/bin/akari.dartparses CLI flags viapackages/akari_cli/lib/src/cli/definition.dart.packages/akari_cli/lib/src/commands/constructs aRunPlanof build/verification steps, executed bypackages/akari_cli/lib/src/execution/.packages/akari_cli/lib/src/theme/project.dartresolves the theme manifest and builder function;packages/akari_cli/lib/src/theme/host.dartgenerates the Flutter host underbuild/tool/hosts/.scene_codegenvalidates*.scene.jsonwithscene_schemaand emits*.scene.g.dart.
2. UI state update & scene rendering
GreeterFeature(packages/greeter_ui/lib/src/feature/) updates immutable state and notifies typed region slots.GreeterSceneAdapterprojects state intoScenePredicateflags andGreeterHostlistenables.SceneRuntimeevaluatesvisibleWhenpredicates per node, runs enter/exit motion transitions, and renders theme widgets inside per-nodeRepaintBoundarylayers.
3. Authentication & session handoff
apps/greeter/lib/infrastructure/dbus/greeter_dbus_gateway.dartcallsio.akari.Greeter1methods and listens forPrompt/StateChangedsignals.crates/akari-backend/src/service.rsandcrates/akari-backend/src/auth/actor.rsserialize commands for the activeattempt_id.crates/akari-backend/src/greetd/transport.rsexchanges framed JSON overGREETD_SOCK, andcrates/akari-backend/src/session_launch.rsforwards the authenticated desktop command through the user’s login shell.
4. Multi-display & Sway sessions
- Native multi-monitor:
apps/greeter/linux/runner/my_application.cccreates one fullscreenFlViewper monitor and reports active window focus throughakari/displays;apps/greeter/lib/app/app.dartshares a singleGreeterFeatureand credential controller across all views. - Display profiles & nested Sway:
scripts/greetd-test/display_profile.pyvalidates TTY output captures, andscripts/sway-session.pyruns nested/headless Sway sessions with scale compensation.
5. Theme Studio editing
SceneEditormanages the active document, selection, undo/redo history, and atomic saving.NodeInspectorControllervalidates pending inspector drafts;node_geometry.dartcomputes canvas move/resize math across transformed nodes.StudioViewporthandles pan/zoom outside undo history, whileStudioAssetsimports files into the owningtheme_*package.
Public package entrypoints
Always import package root libraries (theme_sdk.dart, scene.dart, scene_schema.dart, theme_project.dart, greeter_ui.dart, greeter_components.dart, akari_cli.dart, greeter_harness.dart, theme_studio.dart). Treat lib/src/ as private implementation detail. Browse the API reference for exported symbols.