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:
14
server/utils/anthropic.ts
Normal file
14
server/utils/anthropic.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import Anthropic from '@anthropic-ai/sdk'
|
||||
|
||||
let _client: Anthropic | null = null
|
||||
|
||||
export function getAnthropicClient(): Anthropic {
|
||||
const config = useRuntimeConfig()
|
||||
if (!config.anthropicApiKey) {
|
||||
throw new Error('ANTHROPIC_API_KEY is not configured')
|
||||
}
|
||||
if (!_client) {
|
||||
_client = new Anthropic({ apiKey: config.anthropicApiKey as string })
|
||||
}
|
||||
return _client
|
||||
}
|
||||
Reference in New Issue
Block a user