feat: complete ShiftCraft — AI-powered shift scheduling SaaS

Complete implementation including:
- Landing page with hero, features, how-it-works, pricing
- Employee management (CRUD with soft delete)
- AI constraint parser (Anthropic Claude API)
- German labor law templates (ArbZG §3, §5, §9)
- HiGHS ILP solver for optimal fair schedules
- Schedule calendar result view (employee × date grid)
- Shift framework configuration (periods + shifts)
- Subscription tiers: Free / Pro / Business
- PocketBase setup script with collection creation + seed data
- .env.example with all required variables documented

Pages: employees, constraints (list/new/templates), schedules (list/new/[id]),
       settings (organization/shifts/billing), dashboard

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-18 07:47:31 +02:00
parent 2ea4ca5d52
commit 36e0946ee4
38 changed files with 4254 additions and 133 deletions

View File

@@ -0,0 +1,95 @@
export interface Organization {
id: string
name: string
slug: string
timezone: string
industry: string
owner: string
plan: 'free' | 'pro' | 'business'
plan_employee_limit: number
plan_history_months: number
stripe_customer_id: string
stripe_subscription_id: string
stripe_subscription_status: string
trial_ends_at: string
created: string
updated: string
}
export interface PBEmployee {
id: string
org_id: string
name: string
email: string
employee_number: string
roles: string[]
skills: string[]
employment_type: string
weekly_hours_target: number
max_weekly_hours: number
available_periods: string[]
unavailable_dates: string[]
notes: string
active: boolean
created: string
updated: string
}
export interface PBConstraint {
id: string
org_id: string
label: string
source_text: string
constraint_json: import('./constraint').ConstraintJSON
scope: string
scope_ref: string
category: string
hard: boolean
weight: number
active: boolean
source: string
template_id: string
created: string
updated: string
}
export interface PBScheduleRun {
id: string
org_id: string
name: string
period_start: string
period_end: string
framework_snapshot: unknown
constraints_snapshot: unknown
employees_snapshot: unknown
status: 'pending' | 'solving' | 'solved' | 'infeasible' | 'error'
solver_duration_ms: number
objective_value: number
infeasibility_hints: unknown
result: unknown
created_by: string
created: string
updated: string
}
export interface LegalTemplate {
id: string
region: string
law_name: string
label: string
description: string
constraint_json: import('./constraint').ConstraintJSON
category: string
mandatory: boolean
sort_order: number
}
export interface ShiftFramework {
id: string
org_id: string
periods: import('./schedule').Period[]
shifts: import('./schedule').Shift[]
scheduling_horizon_days: number
created: string
updated: string
}