Skip to content

Chore: Refactor for di#125

Merged
mariodebono merged 17 commits into
mainfrom
chore/refactor-for-di
May 26, 2026
Merged

Chore: Refactor for di#125
mariodebono merged 17 commits into
mainfrom
chore/refactor-for-di

Conversation

@mariodebono
Copy link
Copy Markdown
Contributor

This is a bit of a large PR, mainly targeting refactor and prep work to move into DI for future work.

Summary

  • Fixed macOS icon

Refactor the application into clearer runtime boundaries:

  • Move Electron main-process code into main/
  • Move renderer UI code into renderer/
  • Move locale files into top-level locales/
  • Extract shared app, IPC, project, release, preference, and tool types into shared/
  • Introduce DI-based Electron app bootstrap and typed runtime configuration
  • Migrate project tooling and CI from pnpm to npm
  • Update build, test, Vite, Vitest, Playwright, and Electron Builder paths for the new structure

Mario Debono added 17 commits May 20, 2026 20:55
…iables

- Added `@mariodebono/di-config` dependency for configuration management.
- Implemented CLI argument parsing using `yargs` in `app-config.cli.ts`.
- Created environment variable parsing in `app-config.env.ts` with Zod validation.
- Defined application configuration schema in `app-config.schema.ts`.
- Introduced `current-app-config.ts` to manage the current application configuration state.
- Updated `app.module.ts` to utilize the new configuration module.
- Refactored `electron-app.ts` to access configuration settings for window behavior and features.
- Modified `main.ts` to initialize application configuration and set it globally.
- Updated various utility functions to use the new configuration management system.
- Added tests for configuration parsing and validation.
- Updated package.json to include tsc-alias for better path resolution.
- Introduced new TypeScript declaration files in the shared directory for app, ipc, preferences, projects, releases, renderer, and tools.
- Modified tsconfig.json files to support path aliases for shared types.
- Updated Vite and Vitest configurations to resolve shared types using aliases.
- Improved the structure and organization of type definitions for better maintainability and clarity.
Move Electron code into main/src, renderer code into renderer/src, shared
types remain under shared/src, and relocate runtime resources to their
own ownership roots.

Also move renderer HTML/public assets under renderer, keep Vite config at
the repo root, and package main runtime assets from main/assets while
preserving the existing dist-electron and dist-react outputs.
@mariodebono mariodebono merged commit 227ef91 into main May 26, 2026
1 check passed
@mariodebono mariodebono deleted the chore/refactor-for-di branch May 26, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant