Skip to content

Jesplar/TimeLoggerApplication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Time Logger Application

A desktop time tracking application built with Electron, React, and ASP.NET Core.

Features

  • ⏱️ Log time entries with flexible input (hours or start/end times)
  • πŸ“… Weekly overview with filtering and summaries
  • πŸ“Š Project and customer management
  • πŸ“ˆ Comprehensive reports with Excel export
  • πŸ“€ Invoice generation with breakdown by time codes
  • πŸ’Ύ SQLite database - no server required
  • πŸ–₯️ Runs both installed and portable
  • πŸ“¦ Single-file database for easy backup

Quick Start

Option 1: Use the Build Script (Recommended)

.\build.ps1
cd Electron
npm start

Option 2: Create Installer/Portable Package

.\package.ps1

This creates:

  • Installer: Electron\dist\Time Logger Setup 1.0.0.exe
  • Portable: Electron\dist\TimeLogger-1.0.0-portable.zip

Installation Modes

Installed Mode

  • Database stored in: %LOCALAPPDATA%\TimeLogger\timelogger.db
  • Persists across application updates
  • Standard Windows installation

Portable Mode

  • Database stored in: <AppFolder>\Data\timelogger.db
  • Perfect for USB drives
  • No installation required
  • Determined by presence of portable.txt file

Prerequisites

Verify installation:

node --version
dotnet --version

Development Setup

  1. Install dependencies:

    cd Frontend
    npm install
    cd ..\Electron
    npm install
  2. Build and run:

    cd ..
    .\build.ps1
    cd Electron
    npm start

Building Packages

Create Installer and Portable Versions

.\package.ps1

Output:

  • Electron\dist\Time Logger Setup 1.0.0.exe - Windows installer
  • Electron\dist\TimeLogger-1.0.0-portable.zip - Portable version

Manual Build

# Build application
.\build.ps1

# Create packages
cd Electron
npm run build

Project Structure

TimeLoggerApplication/
β”œβ”€β”€ Backend/
β”‚   └── TimeLoggerAPI/          # ASP.NET Core Web API
β”‚       β”œβ”€β”€ Controllers/        # API endpoints
β”‚       β”œβ”€β”€ Data/              # EF Core DbContext
β”‚       β”œβ”€β”€ Models/            # Database entities
β”‚       └── Migrations/        # SQLite migrations
β”œβ”€β”€ Frontend/
β”‚   └── src/
β”‚       β”œβ”€β”€ components/        # React components
β”‚       └── api.ts            # API client
β”œβ”€β”€ Electron/
β”‚   β”œβ”€β”€ main.js               # Electron main process
β”‚   β”œβ”€β”€ backend/              # Published .NET API
β”‚   └── frontend/             # Built React app
β”œβ”€β”€ build.ps1                 # Development build script
└── package.ps1              # Production packaging script

Database

Provider: SQLite (single-file database)

Location:

  • Installed: %LOCALAPPDATA%\TimeLogger\timelogger.db
  • Portable: <AppFolder>\Data\timelogger.db

Backup: Simply copy the .db file

View Database Info: Go to Settings β†’ Database tab

Usage

Time Entry

  1. Click "+ New Entry"
  2. Select customer and project
  3. Choose date
  4. Enter hours or start/end times
  5. Add description (optional)
  6. Click "Create"

Reports

  1. Go to "Reports" tab
  2. Select date range
  3. Choose customer/project filters
  4. Click "Export to Excel"
  5. Opens generated invoice with breakdown

Settings

  • Configure billing rates
  • Set currency conversion
  • View database information
  • Manage time codes and receipt types

Tech Stack

  • Frontend: React 18 + TypeScript + Vite
  • Backend: ASP.NET Core 10 + Entity Framework Core
  • Database: SQLite
  • Desktop: Electron 28
  • Packaging: electron-builder

Troubleshooting

App won't start

  • Check if .NET SDK is installed: dotnet --version
  • Ensure ports 5001 is available
  • Check Electron console (Ctrl+Shift+I)

Database not found

  • Check Settings β†’ Database tab for location
  • Verify file permissions
  • For portable mode, ensure portable.txt exists

Changes not appearing

  • Run .\build.ps1 to rebuild
  • Hard refresh in app (Ctrl+Shift+R)

Releasing a New Version

One-time GitHub Setup

  1. In Electron/package.json, set your GitHub username and repo name under build.publish:

    "publish": {
      "provider": "github",
      "owner": "jesplar",
      "repo": "TimeLoggerApplication"
    }
  2. Create a GitHub Personal Access Token with repo scope:

    • GitHub β†’ Settings β†’ Developer settings β†’ Personal access tokens β†’ Generate new token
    • Save it somewhere safe

Publishing a Release (GitHub auto-update)

Installed users will be notified automatically on next launch.

# 1. Bump the version in Electron/package.json
#    e.g. "version": "1.0.0"  β†’  "version": "1.1.0"

# 2. Build and publish to GitHub Releases
$env:GH_TOKEN = "ghp_your_token_here"
.\package.ps1 -Publish

This will:

  • Build the backend, frontend, and Electron app
  • Create the installer and portable packages
  • Publish a GitHub Release with all artifacts and a latest.yml update manifest
  • Existing installed users will see an "Update Available" dialog on next launch

Note: The portable version does not auto-update. Users running portable must download the new release manually.

Local / Manual Update (no GitHub)

If you distribute updates directly (e.g. via email or shared drive) without GitHub:

# Build packages locally (no publish)
.\package.ps1

Send the user the new Time Logger Setup x.x.x.exe installer.
They can run it directly over the existing installation β€” no uninstall required.
The database in %LOCALAPPDATA%\TimeLogger\ is never touched by the installer.


Scripts

  • build.ps1 - Build backend, frontend, and copy to Electron
  • package.ps1 - Create installer and portable packages
  • package.ps1 -Publish - Build and publish a GitHub Release (requires $env:GH_TOKEN)

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors