If you find TimeGuard useful, please give it a star to show your support! ★
TimeGuard is a Progressive Web App that lets employees log work hours effortlessly, even offline, while providing managers real‑time sync and detailed reporting. Built with TypeScript, Vite, TailwindCSS, and Tauri, it delivers a seamless, cross‑platform experience.
mermaid graph TD; subgraph Client UI[UI (Vite + TailwindCSS)] --> ServiceWorker[Service Worker (offline sync)] UI --> Tauri[Tauri Native Bridge] end; subgraph Backend Sync[Realtime Sync Service] --> DB[Database] Sync --> Report[Manager Reporting API] end; ServiceWorker --> Sync; Tauri --> Sync; Report --> UI;
🤖 AI Agent Directives
Tech Stack Definition
- Language: TypeScript (strict mode)
- Build Tool: Vite
- Styling: TailwindCSS v4
- Desktop Bridge: Tauri v2 (provides native capabilities & PWA fallback)
- Lint/Format: Biome (fast, auto‑fix)
- Testing: Vitest (unit) & Playwright (E2E)
- Package Manager: npm (or pnpm) with lockfile
Architectural Patterns
- Feature‑Sliced Design (FSD): Organize
src/by feature domains (src/features/timeEntry,src/features/reporting, etc.). - SOLID & DRY: Enforce interface segregation and single‑responsibility for service layers.
- Offline‑First: Service Worker caches API payloads; sync layer resolves conflicts on reconnection.
- Continuous Delivery: GitHub Actions CI runs lint, tests, builds, and publishes a preview on Vercel/Netlify.
Verification Commands bash
npm ci
npm run lint
npm run test:unit
npm run test:e2e
npm run build
These commands are the canonical entry points for any autonomous agent interacting with the repo.
bash
git clone https://github.com/chirag127/TimeGuard-Office-Time-Tracker-PWA.git cd TimeGuard-Office-Time-Tracker-PWA
npm ci
| Script | Description |
|---|---|
dev |
Starts Vite dev server with hot‑module reload |
build |
Produces a production‑ready bundle |
lint |
Runs Biome linting and auto‑fixes |
test:unit |
Executes Vitest unit tests |
test:e2e |
Launches Playwright end‑to‑end suite |
preview |
Serves the built app locally for QA |
- SOLID – Keep modules extensible and maintainable.
- DRY – Reuse components and utility functions across features.
- YAGNI – Implement only what the product needs today.
- Zero‑Defect – CI enforces 100 % test coverage and lint passing before merge.
We welcome contributions! Please read our CONTRIBUTING.md for guidelines on how to propose enhancements, report bugs, and submit pull requests.
This project is licensed under the Creative Commons Attribution‑NonCommercial 4.0 International (CC BY‑NC 4.0). See the full text in the LICENSE file.