No description
Find a file
Claudio Schaad ceb6a4ec12
feat: add script to extract shift icons from PEP PDF (#63)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 17:48:27 +02:00
.github Fix google calendar time zone (#50) 2025-09-06 21:47:47 +02:00
.idea/.idea.ShiftScheduler/.idea Initial Version 2025-08-17 20:15:45 +02:00
Client feat: configurable icons from Docker share (#61) 2026-04-19 17:03:27 +02:00
docs/superpowers feat: configurable icons from Docker share (#61) 2026-04-19 17:03:27 +02:00
scripts feat: add script to extract shift icons from PEP PDF (#63) 2026-04-19 17:48:27 +02:00
Server feat: configurable icons from Docker share (#61) 2026-04-19 17:03:27 +02:00
Services fix: resolve PDF export icons path after moving icons to config/icons/ (#62) 2026-04-19 17:43:34 +02:00
Shared feat: add Nextcloud CalDAV calendar sync 2026-04-13 20:00:18 +02:00
ShiftScheduler.Services.Tests feat: add Nextcloud CalDAV calendar sync 2026-04-13 20:00:18 +02:00
.gitignore feat: add Nextcloud CalDAV calendar sync 2026-04-13 20:00:18 +02:00
authentication-setup.md Add Google OAuth authentication with configurable authorized emails (#29) 2025-08-27 21:18:50 +02:00
CLAUDE.md chore: add CLAUDE.md with project guidance for Claude Code 2026-04-13 20:05:41 +02:00
Directory.Build.props feat: add Nextcloud CalDAV calendar sync 2026-04-13 20:00:18 +02:00
DOCKER_CONFIG.md feat: add Nextcloud CalDAV calendar sync 2026-04-13 20:00:18 +02:00
LICENSE Initial commit 2025-08-17 19:47:42 +02:00
README.md feat: add script to extract shift icons from PEP PDF (#63) 2026-04-19 17:48:27 +02:00
ShiftScheduler.sln Add comprehensive unit tests for TransportService with xUnit and Shouldly, plus CI/CD automation (#21) 2025-08-23 15:37:08 +02:00

ShiftScheduler

A Blazor WebAssembly application for managing work shift schedules with calendar export and transport integration.

Overview

ShiftScheduler is a web-based shift management system that allows users to:

  • Plan and visualize work shifts using a monthly calendar interface
  • Export schedules to ICS and PDF formats
  • Sync shifts directly to Google Calendar or Nextcloud Calendar
  • View optimal transport connections for work commutes
  • Secure access through Google OAuth authentication

Key Features

Calendar-Based Shift Management

  • Monthly calendar view with day-by-day shift assignment
  • Toggle between current and next month
  • Mobile-friendly week layout alongside the desktop grid view

Export & Sync

  • ICS Export: Download a calendar file compatible with any calendar application
  • PDF Export: Generate a printable monthly schedule
  • Google Calendar Sync: Direct sync to a selected Google Calendar; existing app-managed events are updated, other events are untouched
  • Nextcloud Calendar Sync: CalDAV-based sync to a selected Nextcloud calendar

Transport Integration

  • Calculates optimal departure and arrival times for work commutes
  • Integrates with the Swiss public transport API (transport.opendata.ch)
  • Displays morning and afternoon connections alongside each shift
  • Configurable safety buffers and break durations

Authentication

  • Google OAuth 2.0 with a configurable list of authorized email addresses

Configuration

  • Shift definitions (name, emoji icon, morning/afternoon time ranges) managed via the in-app configuration dialog
  • Transport settings (stations, API URL, timing buffers) configurable in-app
  • Configuration can be exported and imported as JSON for backup

Default Shift Types

Icon Name Morning Time Afternoon Time
⚫ Frei — —
🌴 Urlaub — —
🌅 Früh 06:00–14:00 —
🌆 Spät — 14:00–22:00
☀️ Tag 08:00–12:00 13:00–17:00
(icon) Pause 10:00–10:15 15:00–15:15

All shift types are configurable through the in-app settings dialog.

Configuration

Authentication (Server/appsettings.json)

{
  "Authentication": {
    "Google": {
      "ClientId": "your-google-client-id.apps.googleusercontent.com",
      "ClientSecret": "your-google-client-secret"
    },
    "AuthorizedEmails": [
      "user@gmail.com"
    ]
  }
}

Nextcloud CalDAV

{
  "Nextcloud": {
    "BaseUrl": "https://your-nextcloud-instance.example.com",
    "Username": "your-username",
    "AppPassword": "your-app-password"
  }
}

Transport

{
  "Transport": {
    "StartStation": "Zurich",
    "EndStation": "Basel",
    "ApiBaseUrl": "http://transport.opendata.ch/v1",
    "SafetyBufferMinutes": 30,
    "MinBreakMinutes": 60,
    "MaxEarlyArrivalMinutes": 60,
    "MaxLateArrivalMinutes": 15,
    "CacheDurationDays": 1
  }
}

Installation & Setup

Prerequisites

  • .NET 9.0 SDK
  • Google Cloud Console account (for OAuth)

Quick Start

  1. Clone the repository

    git clone https://github.com/clayschaad/ShiftScheduler.git
    cd ShiftScheduler
    
  2. Install dependencies

    dotnet restore
    
  3. Configure authentication

  4. Build and run

    dotnet build
    cd Server
    dotnet run
    
  5. Open the app

    • Navigate to http://localhost:5000
    • Sign in with your Google account

Scripts

scripts/extract_icons.py — Extract icons from a PEP shift plan PDF

Reads the Dienst-Legende on the last page of a POLYPOINT/PEP PDF, matches each icon to its shift code, and saves the icons as PNG files into config/icons/.

Requirements

pip install pymupdf

Usage

python scripts/extract_icons.py "Mai Plan Definitiv.pdf"
python scripts/extract_icons.py path/to/plan.pdf --out config/icons

The output directory defaults to Server/config/icons, which is the path served as /icons by the application.

Documentation

License

Apache License 2.0 — see the LICENSE file for details.