Work-Report-Svelte Svelte Themes

Work Report Svelte

Recreating the work report front end in svelte.

šŸ“Š Work Report Svelte

A modern, elegant dashboard for tracking work hours, visualizing progress, and calculating earnings. Built with SvelteKit and Tailwind CSS.

✨ Features

  • šŸ“ˆ Real-time Tracking: Automatically syncs work data from local StaffCounter logs.
  • šŸŽÆ Goal Management: Set and track weekly hour targets with visual progress bars.
  • šŸ’° Earnings Calculator: Real-time conversion of hours to USD and BDT with customizable rates.
  • šŸ“Š Data Visualization: Interactive charts for daily, weekly, and monthly storage.
  • šŸŒ— Dark/Light Mode: Beautiful, responsive UI with automatic system theme detection.
  • šŸ“ Detailed Reporting: View detailed breakdown of daily work sessions.
  • ⚔ Fast & Reactive: Built on Svelte 5 for blazing fast performance.

šŸ› ļø Tech Stack

Frontend

  • Framework: SvelteKit (Svelte 5)
  • Styling: Tailwind CSS v4, Bits UI
  • Icons: Lucide Svelte
  • Charts: Chart.js
  • Utils: Date-fns

Backend (/Work-Time-Backend)

  • Runtime: Node.js (Express)
  • Database: MySQL
  • Scraping: Cheerio (parses local HTML logs)

šŸš€ Getting Started

Prerequisites

  • Node.js (v18+)
  • pnpm (recommended)
  • MySQL Server
  • StaffCounter desktop app (installed and logging locally)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd Work-Report-Svelte
    
  2. Install Frontend Dependencies

    pnpm install
    
  3. Setup the Backend Navigate to the backend directory and install dependencies:

    cd Work-Time-Backend
    npm install
    

Configuration

Backend

  1. Ensure MySQL is running.
  2. Create the database using Work-Time-Backend/schema.sql.
  3. Configure database connection in Work-Time-Backend/server.js or separate config file (if applicable).
  4. Important: detailed in api_documentation.md, the backend looks for logs at C:/Program Files (x86)/StaffCounter/logs/USER/. Ensure this path matches your environment or update worktime.py/workTimeScraper.js.

Frontend

  1. The frontend connects to the backend at http://192.168.0.2:88 by default (see src/lib/config.ts or api_documentation.md). Update this if running locally or on a different port.

Running the App

  1. Start the Backend:

    cd Work-Time-Backend
    node server.js
    # OR use nodemon
    npx nodemon server.js
    
  2. Start the Frontend:

    # In the root directory
    pnpm dev
    
  3. Open your browser at http://localhost:5173.

šŸ“‚ Project Structure

Work-Report-Svelte/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ lib/
│   │   ā”œā”€ā”€ components/   # UI Components (Header, Charts, etc.)
│   │   ā”œā”€ā”€ stores/       # Svelte stores for state management
│   │   ā”œā”€ā”€ utils/        # Helper functions
│   │   └── types.ts      # TypeScript interfaces
│   └── routes/           # SvelteKit File-based routing
ā”œā”€ā”€ Work-Time-Backend/      # Node.js API & Scraper
│   ā”œā”€ā”€ database/         # SQL schema
│   ā”œā”€ā”€ scripts/          # Scraping logic
│   └── server.js         # Express app entry point
└── ...config files

šŸ“„ License

This project is for personal use.


Built with ā¤ļø using Svelte.

Top categories

Loading Svelte Themes