mirror of
https://github.com/mue/mue.git
synced 2026-06-05 23:45:53 +02:00
2.0 KiB
2.0 KiB
Mue Engineering Standards (GEMINI.md)
This file contains project-specific instructions and guidelines for Mue.
Stack & Commands
- Package Manager: Always use
bun. Never usenpmoryarn. - Framework: React 19, Vite 7, Manifest V3.
- Core Commands:
bun install: Install dependencies.bun run dev: Start dev server.bun run build: Production build for Chrome, Firefox, Safari.bun run lint: Run ESLint and Stylelint.bun run lint:fix: Auto-fix lint issues.bun run pretty: Format with Prettier.bun run translations: Sync locale files fromen_GB.json.bun run translations:percentages: Update translation stats.bun run translations:unused: Find unused translation keys.bun run test:e2e:headless: Run Cypress tests headlessly.
Architecture & Patterns
- State Management: Use localStorage for persistent state.
- Communication: Use
src/utils/eventbus.jsfor inter-widget/UI communication.- Register in
useEffect, cleanup withEventBus.off().
- Register in
- I18n: All user-visible strings MUST use
src/i18n/locales/en_GB.jsonas the base.- Use
useT()hook orgetMessage()helper.
- Use
- Routing: Hash-based router (
createHashRouter) insrc/router/. - Path Aliases: Use
@/,components/,features/, etc. (seevite.config.mjs).
Coding Rules
- No Comments: Keep code self-explanatory through descriptive naming.
- No Emojis: Do not use emojis in code strings or logs (except user-facing toasts).
- Naming: Concise names. Use
const [open, setOpen] = useState(false), notisOpen. - Commits: Conventional commits (
feat:,fix:, etc.) are enforced. - Translations: Edit
en_GB.jsonfirst, then runbun run translations.
Directory Structure
src/features/: Feature-based organization (background, time, quote, etc.).src/components/: Shared UI elements and layouts.src/utils/: Shared utilities and helpers.manifest/: Extension manifest templates.safari/: Safari-specific project files.