How jackietkfrost/ravencm works
Purpose and Runtime
Raven CM is a desktop D&D 5e character manager for creating, editing, leveling, and exporting character information. It runs as an Electron application: a Node/Electron main process hosts the window and native integrations, while a Vue renderer provides the UI. Core launch paths are src/main/index.ts, development bootstrap src/main/index.dev.ts, and renderer bootstrap src/renderer/main.ts.
Electron Process Boundary
The main process owns application lifecycle, browser-window startup, and OS-facing behavior through src/main/index.ts and src/main/MainRunner.ts. Native menu/tray behavior is isolated in src/main/tray.ts. Renderer access to privileged capabilities should cross the Electron IPC boundary defined by src/main/IPCs.ts and exposed through src/preload/index.ts, rather than directly using Node APIs.
Renderer Application Shell
The Vue single-page renderer is rooted at src/renderer/App.vue, with navigation controlled by src/renderer/router/index.ts. Shared structural UI—title bar, headers, and page framing—is centralized in src/renderer/components/layout/DefaultLayout.vue, src/renderer/components/layout/CustomTitleBar.vue, and src/renderer/components/layout/HeaderLayout.vue. Vuetify is the UI runtime integration in src/renderer/plugins/vuetify.ts.
Character Creation Workflow
Character construction is a staged wizard surfaced from src/renderer/screens/BuildScreen.vue and creation drawer src/renderer/screens/CreateCharacterDrawer.vue. Its domain steps are separated by D&D concern: ancestry in src/renderer/screens/builderScreens/RaceScreen.vue, class in src/renderer/screens/builderScreens/ClassScreen.vue, background in src/renderer/screens/builderScreens/BackgroundScreen.vue, and ability scores in src/renderer/screens/builderScreens/AbilityScoreScreen.vue. Additional stages cover feats, languages, and proficiencies.
Character Management Domains
The primary post-creation views partition mutable character state into dedicated domains: character-sheet presentation in src/renderer/screens/CharacterSheet.vue, equipment and inventory in src/renderer/screens/EquipmentScreen.vue and src/renderer/screens/equipmentScreens/InventoryScreen.vue, and magic/spell management in src/renderer/screens/MagicScreen.vue and src/renderer/screens/magicScreens/SpellsScreen.vue. General character administration is routed through src/renderer/screens/ManagerScreen.vue and src/renderer/screens/manageScreens/ManageCharacterTab.vue.
State, Preferences, and Presentation
Application-level renderer state is centralized in src/renderer/store/appStore.ts; workflow screens should use this as the coordination point rather than independently owning canonical character data. Settings are represented by src/renderer/screens/SettingsScreen.vue. Internationalization is initialized in src/renderer/plugins/i18n.ts and backed by locale catalogs such as src/renderer/locales/en.json and src/renderer/locales/de.json; visual theme customization resides in src/renderer/utils/customTheme.ts.
PDF Asset and Export Boundary
A fillable D&D 5e sheet is shipped as buildAssets/Sheets/5E_CharacterSheet_Fillable.pdf; available field names are documented in pdf_fields.txt. Main-process PDF handling appears to use src/main/pdf-lib.js, making PDF population/export a native-side operation likely invoked from the renderer through IPC. Build-specific asset configuration is under buildAssets/builder/config.js.
Main entry points: BuildScreen.vue Build workflow · index.ts Router · appStore.ts App store · main.ts Renderer bootstrap
Components 24
Electron host
Main-process lifecycle and privileged integrations.
- Main process · Owns lifecycle and browser-window startup.
src/main/index.ts - Window runner
src/main/MainRunner.ts - Tray and menu
src/main/tray.ts - IPC handlers · Defines renderer access to privileged operations.
src/main/IPCs.ts - Preload bridge
src/preload/index.ts
Vue renderer
SPA shell, navigation, and shared state.
- Renderer bootstrap
src/renderer/main.ts - Application shell
src/renderer/App.vue - Router
src/renderer/router/index.ts - Default layout · Provides page framing alongside title-bar and header components.
src/renderer/components/layout/DefaultLayout.vue - Vuetify
src/renderer/plugins/vuetify.ts - App store · Coordinates application and character state.
src/renderer/store/appStore.ts - Internationalization · Loads locale catalogs for the renderer.
src/renderer/plugins/i18n.ts
Character builder
Staged character creation workflow.
- Build workflow
src/renderer/screens/BuildScreen.vue - Character creation drawer
src/renderer/screens/CreateCharacterDrawer.vue - Ancestry step
src/renderer/screens/builderScreens/RaceScreen.vue - Class step
src/renderer/screens/builderScreens/ClassScreen.vue - Background step
src/renderer/screens/builderScreens/BackgroundScreen.vue - Ability scores step
src/renderer/screens/builderScreens/AbilityScoreScreen.vue
Character domains
Post-creation character management views.
- Character sheet
src/renderer/screens/CharacterSheet.vue - Equipment and inventory · Includes inventory management.
src/renderer/screens/EquipmentScreen.vue - Magic and spells · Includes spell management.
src/renderer/screens/MagicScreen.vue - Character manager
src/renderer/screens/ManagerScreen.vue
PDF export
Native-side sheet population and export.
- PDF population · Fills and exports the character sheet.
src/main/pdf-lib.js - Fillable 5e sheet
buildAssets/Sheets/5E_CharacterSheet_Fillable.pdf
Connections 27
- Main process → Window runner: starts window
- Main process → Tray and menu: owns
- Main process → IPC handlers: registers
- IPC handlers → Preload bridge: exposes capabilities
- Preload bridge → Renderer bootstrap: bridges privileged calls
- Renderer bootstrap → Application shell: mounts
- Application shell → Router: uses
- Application shell → Default layout: frames pages
- Renderer bootstrap → Vuetify: installs
- Renderer bootstrap → Internationalization: initializes
- Router → Build workflow: routes to
- Router → Character sheet: routes to
- Router → Equipment and inventory: routes to
- Router → Magic and spells: routes to
- Router → Character manager: routes to
- Build workflow → Character creation drawer: launches
- Build workflow → Ancestry step: stages
- Build workflow → Class step: stages
- Build workflow → Background step: stages
- Build workflow → Ability scores step: stages
- Build workflow → App store: updates character
- Character sheet → App store: reads character
- Equipment and inventory → App store: updates inventory
- Magic and spells → App store: updates spells
- Character manager → App store: administers character
- IPC handlers → PDF population: invokes export
- PDF population → Fillable 5e sheet: fills template