This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
npm start # dev server (http)
npm run https # dev server (https, uses local SSL cert)
npm run build # production build
npm test # run tests headless in terminal (Karma/Jasmine)
npm run test:watch # run tests in watch mode with Chrome window
npm run watch # build in watch modeA serverless browser-based time tracker. All data lives in IndexedDB (via Dexie.js) — no backend, no auth. Angular 21, Bootstrap 5, Luxon for dates, ng-bootstrap for modals.
-
Store (
src/app/store/) — Dexie wrapper (SheetStoreService) + raw IndexedDB record interfaces inrecords/. Schema has 10 versions with a migration chain (migrate-v2→migrate-v9). Tables:activities,issues,projects. -
Entities (
src/app/entities/) — Rich domain classes (Activity,Issue,Project,Week,Day) with business logic. Each has static factory methods:Entity.fromRecord()andEntity.fromImport(). These are distinct from the thin store records. -
Repository services (
src/app/services/) —ActivitiesRepositoryService,IssueRepositoryService,ProjectRepositoryServicequery Dexie and map records → entities. -
Business logic services —
ActivitiesService(calculations),DurationService(time math),WeekService,OverviewService,IssuesService. -
Workflow services —
SaveActivitiesWorkflowService,ExportWorkflowService,RemoveActivitiesWorkflowServiceorchestrate multi-step operations across repositories. -
Pages (
src/app/pages/) — Route-based: daily-activities (main view), issues, projects, analytics, import, settings. -
Components (
src/app/components/) — Shared UI components used across pages.
/ daily-activities (default)
/issues issues list
/issues/:issueKey issue detail
/projects projects list
/projects/:projectId project detail (has resolver)
/import data import
/settings settings
Navbar action buttons use a named router outlet.
- Tabs for indentation, size 4
- Single quotes in TypeScript files
- Final newline at end of every file, no trailing whitespace
- When changing a component's TypeScript, check its HTML template too — and vice versa
- Getters and setters are OK
- Getters and Setters must follow the PascalCase
- Do not write long one-liners and nested function calls
- Don't skip the braces in early return if statements
- Desktop/mobile splits: some components have a
-mobilevariant (e.g.,daily-activity-itemvsdaily-activity-item-mobile).ScreenServicedrives which renders. - Signals: use
input()/input.required()andsignal()for reactivity — not@Input(). - Global events:
ActionsServiceis an EventEmitter bus for app-wide actions (CreateIssue, AddProject, Export, Import, ToggleMode). - Modals: ng-bootstrap
NgbModalfor dialogs. - Styling: SCSS, Bootstrap 5 utility classes. Default component style is SCSS. Prefer Bootstrap 5 utility classes over custom CSS — only write custom SCSS when Bootstrap has no equivalent utility.
- Strict TypeScript:
strict: true,noImplicitReturns,noFallthroughCasesInSwitchare all on.