--- name: parlo-styring description: Parlo Styring app for Parlobyg - Next.js job management system. Use for development, deployment, and working with Mikkel's scheduling app. Triggers on parlo-styring, scheduling app, or Coolify deployment tasks. --- # Parlo Styring Skill Next.js job management and scheduling application for Parlobyg construction company. ## Live App - **URL:** https://parlo.machinemachine.ai - **Status:** ✅ Running healthy ## Repository - **Git:** http://git.machinemachine.ai/machine.machine/parlo-styring.git - **Forgejo UI:** http://git.machinemachine.ai/machine.machine/parlo-styring ## Deployment (Coolify) - **App UUID:** xht4hfyngaimnf0mjmrc93vx - **Stack:** Next.js 14.2.5 (standalone) - **Port:** 3000 (internal) - **Domain:** parlo.machinemachine.ai (via Traefik) ### Environment Variables ``` ORDRESTYRING_API_KEY=q3mjVDR6wAdPCvZT ENABLE_WRITES=false OPENROUTER_API_KEY=sk-or-v1-... NEXTAUTH_URL=https://parlo.machinemachine.ai ``` ## Development ### Clone & Run Locally ```bash # Clone git clone http://git.machinemachine.ai/machine.machine/parlo-styring.git cd parlo-styring # Install & run npm install npm run dev ``` ### Push Changes ```bash git add -A git commit -m "feat: description" git push origin main # Coolify auto-deploys on push ``` ## Architecture ``` src/ ├── app/ # Next.js App Router pages │ ├── api/ # API routes │ │ ├── cases/ # Ordrestyring cases │ │ ├── customers/ │ │ ├── workers/ │ │ └── ai/ # AI chat endpoint │ ├── dashboard/ # Main dashboard │ ├── sager/ # Cases (Sager) pages │ ├── kunder/ # Customers pages │ └── medarbejdere/ # Workers pages ├── components/ # React components │ ├── GanttChart/ # Scheduling Gantt view │ ├── CaseDetail/ # Case detail panel │ └── Chat/ # AI chat interface └── lib/ └── ordrestyring.ts # GraphQL client ``` ## Features - 📋 **Dashboard** — Overview of cases, workers, schedule - 📅 **Gantt Chart** — Visual scheduling with AI suggestions - 👥 **Customers** — Customer list with detail views - 👷 **Workers** — Worker management and daily views - 💬 **AI Chat** — OpenRouter-powered assistant - 📱 **PWA** — Mobile-friendly, installable ## API Integration ### Ordrestyring The app fetches live data from Ordrestyring GraphQL: - Cases, customers, workers, hours - Read-only by default (`ENABLE_WRITES=false`) ### AI Chat Uses OpenRouter API with context from: - Qdrant vector memory (memory-qdrant:6333) - BGE-M3 embeddings (memory-embeddings:8000) ## Work Packages The repo contains WORKPACKAGE-*.md files documenting features to build. Current count: ~39 work packages ## Quick Commands ```bash # Check deployment status curl -s https://parlo.machinemachine.ai/api/health # View recent commits curl -s -H "Authorization: token $FORGEJO_TOKEN" \ "http://git.machinemachine.ai/api/v1/repos/machine.machine/parlo-styring/commits?limit=5" # Trigger rebuild (via Forgejo webhook) # Push any change → Coolify auto-deploys ``` ## Related Skills - **ordrestyring** — GraphQL API for job data - **parlobyg-email** — Email integration - **microsoft-graph** — Mikkel's Outlook/OneDrive ## References - [App Architecture](references/architecture.md) - [Deployment Guide](references/deployment.md)