Skip to content

Conversation

@SimHacker
Copy link

Monorepo setup with pnpm; move Electron app to apps/kando; add skeleton packages

Summary

  • Converted repo to pnpm monorepo (apps/, packages/) without app behavior changes.
  • Moved Electron app into apps/kando and fixed paths.
  • Added placeholder packages @kando/core and @kando/renderer-dom for future extraction.

Changes

  • Added pnpm-workspace.yaml (packages/, apps/), pnpm-lock.yaml.
  • Root package.json: [email protected]; scripts: dev, build, clean, start:kando.
  • Added .npmrc (prefer-workspace-packages, auto-install-peers, strict-peer-dependencies).
  • Expanded .gitignore (dist, build, .svelte-kit, apps/kando/.webpack, apps/kando/Release, apps/kando/out).
  • Relocated app to apps/kando: src, assets, locales, tools, appstream, webpack.*.config.ts, CMakeLists.txt, forge.config.ts.
  • Path updates after move:
    • docs/changelog.md: key-codes.ts link -> apps/kando/src/common/key-codes.ts.
    • apps/kando/forge.config.ts: icon URL -> apps/kando/assets/icons/icon.ico.
    • apps/kando/appstream/menu.kando.Kando.metainfo.xml: screenshot paths fixed.
    • REUSE.toml: paths updated to apps/kando/*.
    • Root tsconfig.json: include apps/kando/src///* to keep webpack/ts-loader happy.
  • Renderer webpack polyfill: resolve.fallback.events = require.resolve('events/'); added events devDependency.
  • New skeleton packages:
    • packages/core (@kando/core) – placeholder (types/schemata/math later).
    • packages/renderer-dom (@kando/renderer-dom) – placeholder (overlay/portal/theme later).

What did not change

  • No functional changes to Electron app code; builds and runs as before.

How to run

  • From repo root: pnpm -r install
  • Then: cd apps/kando && pnpm start
  • If Electron binary error appears, re-run its install script or reinstall; macOS may require Accessibility and Screen Recording permissions.

Follow-ups (separate PRs)

  • Add Changesets and TypeScript project references.
  • Extract real code into @kando/core and @kando/renderer-dom.
  • Add theme packages (@kando/themes-menu, @kando/themes-sound).
  • Add @kando/wrapper-svelte and a SvelteKit demo app.
  • CI: cache pnpm store; build/test affected workspaces only.

Review focus

  • Verify moved paths under apps/kando, updated links, and the small webpack events fallback.

@SimHacker SimHacker mentioned this pull request Nov 17, 2025
@Schneegans
Copy link
Contributor

Thank you so much for looking into this! As soon as I find the time, I'll look into this. I'm currently busy preparing a bugfix release which will address some pressing issues, but then I hope to find the time to discuss this in detail!

@SimHacker
Copy link
Author

You're welcome, I'm glad to help, and these first steps will make collaboration and building on top of Kando easier! I am fiddling around to get the ci/cd github actions working now.
I'll write up a document explaining all the goals and effects of these changes.

@Schneegans
Copy link
Contributor

This looks really good! I think it's a great starting point to make Kando much more versatile in terms of potential applications. The only thing I needed to change to make this working was to add the following to pnpm-workspace.yaml:

onlyBuiltDependencies:
  - '@parcel/watcher'
  - electron
  - electron-winstaller
  - esbuild

How are the imports from @kando/core working? I mean it seems to work, but I do not see this mentioned as a dependency. If I add "@kando/core": "workspace:*", I can import as import { MenuItem } from '@kando/core/src';, but I think that's not the way it's meant to be, right?

Anyways, now I wonder... How to proceed? I guess a lot needs to be tested and tweaked. Things which come to my mind:

  • CI jobs
  • Creation of binary packages
  • Localization via weblate
  • Documentation updates

What do you think? Should we maybe merge this to a separate branch and get it working there with smaller PRs? Then we can focus on individual tasks and merge it only to main once the setup is fully complete?

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.

2 participants