For information about features, the product, and what we are building, see PRODUCT.md.
This repository is an npm workspace/Turborepo monorepo organized around feature slices and shared business commands.
- Vertical Slice / Feature Slice: Organize code by feature, not by technical layer. Move code to shared locations only when it is truly shared across features.
- CQRS: Keep write operations (commands) and read operations (queries) separate in modeling and handling.
- Composition over Inheritance: Prefer composing focused units unless inheritance provides clear value.
- Single Responsibility Execution Model: Most classes represent one operation and expose one
executemethod. Class names describe the operation.
packages/commands(packages/commandin some docs): Shared feature logic and business operations used by multiple apps. Core command/query workflows originate here.apps/cli: Thincommander-based interface that parses CLI input and invokes shared logic frompackages/commands.apps/desktop: Electron + React application that delivers feature UI and calls shared commands/query flows frompackages/commands.
Use feature-first folders. Keep each feature self-contained and move code upward only when truly shared.
src/
task/
create/
create-task.command.ts
create-task.model.ts
create-task.response.ts
create-task.facade.ts
create-task.service.ts
create-task.repository.ts
find/
find-task.query.ts
task.entity.ts
task.repository.ts
repository.tsLayer responsibilities:
- Command / Query: Input contracts for mutation vs read flows.
- Service: Validation and business rules.
- Facade: Feature orchestration across services, repositories, and integrations.
- Repository: Persistence concerns (DB/filesystem/API).
- Model / Response: Internal models and external response contracts.
- All git operations must use
simple-git.
apps/cli is a thin adapter around shared commands.
src/
task/
index.ts
index.tsResponsibilities:
- Parse arguments/options and register commands (for example
addProjects(program)). - Map CLI inputs to shared command/query objects.
- Handle CLI-only output formatting and process concerns.
apps/desktop is an Electron app with a React renderer and shadcn/ui components.
src/
components/
ui/
example-component.tsx
hooks/
lib/
features/Guidelines:
components/ui: shadcn components only; install withnpx shadcn@latest add <component-name>and do not manually edit generated primitives.components/: only truly shared app components.hooks/andlib/: only shared hooks/utilities.features/: default location for feature-specific UI, hooks, and logic (vertical slices).- Use shadcn
sonnerfor user-facing status messages in the desktop app: success states must use a success toast, and failures must use an error/danger toast.
This repository is an npm workspace/Turborepo monorepo.
apps/cli: Node CLI entrypoint (src/index.ts), compiled todist/.apps/desktop: Electron + Vite desktop app (src/main.ts,src/preload.ts,src/renderer.ts,src/app.tsx).packages/commands: Shared TypeScript command library used by CLI and desktop.- Root config:
turbo.json,tsconfig.base.json, and workspace-level scripts inpackage.json.
Add new shared logic in packages/commands first, then consume it from app packages.
Run commands from repo root unless noted.
npm run dev: Runs all packagedevtasks through Turbo.npm run build: Builds all workspaces.npm run lint: Runs lint tasks (currently meaningful inapps/desktop).npm run typecheck: Type-checks all TypeScript packages.npm run dev -- --filter=@zeta/cli: Run only the CLI in watch mode.npm run build -- --filter=desktop: Build/package only desktop-related tasks.
Package-level examples:
npm --workspace apps/desktop run devnpm --workspace apps/cli run build
- Language: TypeScript across apps/packages.
- Indentation: 2 spaces; keep imports grouped and sorted logically.
- Naming:
PascalCasefor React components,camelCasefor functions/variables, kebab-case for filenames unless framework conventions require otherwise. - Linting:
apps/desktopuses ESLint with@typescript-eslintandeslint-plugin-import. - For UI components, always add them with
npx shadcn@latest add <component-name>. - Always add a simple, concise comment above logical groupings of code.
There is no committed automated test framework yet.
Use Conventional Commits for all commit messages and PR titles.
- Format:
<type>(<optional-scope>): <short imperative summary> - Common types:
feat,fix,chore,refactor,docs,test,build,ci,perf,style,revert. - Keep summaries concise and specific to the behavior or code change.
Examples:
feat(cli): add hello subcommandfix(desktop): handle missing preload bridgedocs(root): clarify workspace build commandschore(commands): update tsconfig references