2.6 KiB
2.6 KiB
Repository Guidelines
Project Structure & Module Organization
src/: React renderer (UI). Main entry issrc/main.tsx, app shell insrc/App.tsx, shared types insrc/types.ts, and UI pieces insrc/components/.electron/: Electron main + preload (electron/main.ts,electron/preload.ts).public/: Static assets bundled with the renderer (for examplepublic/favicon.ico,public/logo.png).dist/,dist-electron/: Build artifacts (do not hand-edit).release/: Packaged installers output byelectron-builder(versioned subfolders).
Build, Test, and Development Commands
npm install: Install dependencies.npm run dev: Run the Vite dev server (with--host) and Electron viavite-plugin-electron.npm run lint: Run ESLint with--max-warnings 0(lint must be clean).npm run build:tsc && vite build && electron-builder(createsdist*and writes installers torelease/<version>/).npm run preview: Preview the built renderer (useful for renderer-only checks).
Coding Style & Naming Conventions
- Language: TypeScript + React, ESM (
"type": "module"). TypeScript isstrictand enables unused code checks; keep changes type-safe. - Indentation: 2 spaces (match existing files).
- Components:
PascalCase.tsxinsrc/components/(for exampleAppCard.tsx). Types/interfaces stay insrc/types.tsunless clearly feature-specific. - Linting: ESLint (
eslint:recommended,@typescript-eslint/recommended,react-hooks/recommended, plusreact-refreshrule).
Testing Guidelines
- No automated test framework is currently configured (no
npm test, no coverage gate). Changes should include manual smoke testing notes in PRs. - Minimum manual checks: add/edit/delete apps, category CRUD, config persistence across restart, icon extraction, window controls (min/max/close).
- If you introduce tests, prefer
*.spec.ts(x)colocated undersrc/(orsrc/**/__tests__/) and add atestscript.
Commit & Pull Request Guidelines
- Git history is not available in this workspace, so no repository-specific commit convention can be derived. Use Conventional Commits (for example
feat: add search,fix: handle missing exe,chore: bump deps). - PRs: include a short summary, testing steps, and screenshots/GIFs for UI changes. Link issues when applicable.
- Keep build artifacts and packaged outputs out of PRs unless intentionally updating release assets.
Security & Configuration Tips
- User configuration lives at
%APPDATA%/sprout-launcher/launcher-config.json; never commit local config data. - If you change the config schema, add a small migration path and document it in the PR.