Skip to content

chirag127/TimeGuard-Office-Time-Tracker-PWA

Repository files navigation

TimeGuard Office Time Tracker PWA

TimeGuard Logo

Build Status Coverage Status Tech Stack Lint License Stars


⭐️ Star this Repo

If you find TimeGuard useful, please give it a star to show your support! ★


🎯 Quick Pitch (BLUF)

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.


📐 Architecture Overview

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;


📑 Table of Contents


🤖 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

Install dependencies

npm ci

Run lint & auto‑fix

npm run lint

Run unit tests

npm run test:unit

Run end‑to‑end tests

npm run test:e2e

Build for production

npm run build

These commands are the canonical entry points for any autonomous agent interacting with the repo.


🛠 Development Standards

Setup

bash

Clone the repo

git clone https://github.com/chirag127/TimeGuard-Office-Time-Tracker-PWA.git cd TimeGuard-Office-Time-Tracker-PWA

Install dependencies (uses lockfile for reproducibility)

npm ci

Available Scripts

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

Core Principles

  • 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.

🤝 Contributing

We welcome contributions! Please read our CONTRIBUTING.md for guidelines on how to propose enhancements, report bugs, and submit pull requests.


📄 License

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.

About

A Progressive Web App for tracking office work hours with offline support, real-time sync, and manager reporting.

Topics

Resources

License

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors