Phase 1 — IT-Hilfe ↔ Repairer unification:
- Add repairer_profile_id to it_hilfe_offers (soft FK to repairer_profiles)
- New API: GET /api/repairers/[id]/matching-requests (skill-based matching)
- New MatchingRequestsTab component on repairer detail pages
- IT-Hilfe offers now display repairer profile info (verified badge, rating)
- Repairers can see and respond to matching IT-Hilfe requests
Phase 2 — Erfassung vs Intake audit:
- docs/ERFASSUNG_INTAKE_AUDIT.md: full overlap analysis and consolidation plan
- Erfassung = AI-powered capture, Intake = checklist pipeline
- Recommended: merge into single pipeline with AI as optional first step
Apply Zod validation imports and status config imports across
remaining page components (admin approvals, decisions, locations,
protocols, workshops, blog, dashboard, IT-Hilfe, marketplace).
Delete unused MarketplaceCheckoutForm. Update audit report with
current findings and scores.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Marketplace payments now use Payrexx reservation-based escrow instead of
Stripe manual capture. Checkout redirects to Payrexx hosted payment page
rather than rendering inline Stripe Elements. Dev mock mode enables full
E2E testing without Payrexx credentials.
Navigation reorganized: merged standalone Shop into "Marktplatz" mega-menu
alongside Marketplace and IT-Hilfe (7→6 nav items). Homepage hero CTA now
points to /marketplace. Removed 10 unused TABLE_NAMES constants.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Messages dashboard: split-panel conversation list + thread view with
mobile-responsive layout, deep-linking via ?conversation= param
- Share listing: Web Share API with clipboard fallback + "Kopiert!" toast
- Report listing: modal with reason radio buttons, DB migration, API route
- Duplicate listing: copy fields + specs as draft, redirect to edit
- JSON-LD Product schema on listing detail pages (Schema.org structured data)
- Dynamic sitemap for active marketplace listings (/marketplace/sitemap.xml)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement all 6 Phase 1 features for the marketplace competitive roadmap:
1.1 Seller type toggle (RevampIT Geräte / Community Inserate) on browse page
1.2 RevampIT verified badge with admin verify endpoint and verification details
1.3 Categories migrated to KATEGORIEN SSOT (numeric IDs) + structured tech specs
(listing_specs table, spec filters on browse, spec tags on cards, spec table on detail)
1.4 Category-specific condition criteria checklists in sell form and detail page
1.5 Gratis listings (price=0) with badge + zero commission (COMMISSION_RATE=0)
1.6 AI spec extraction — enhanced marketplace AI prompt to extract specs from text
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove all Medusa-specific documentation (MEDUSA_*.md, SETUP_*.md,
README_MEDUSA.md, AI_AGENT_QUICK_REFERENCE.md, REVAMPIT_SHOP_*.md).
Update remaining docs, README, AGENTS.md, CLAUDE.md, env examples,
sitemap, and agent config files to reflect the simplified architecture
without Medusa dependency. Replace Medusa.js with WooCommerce in
service offerings documentation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the entire Medusa integration that was replaced by native database
queries for product management. This includes the medusa-backend directory,
all Medusa API routes (cart, orders, products, regions, health), Medusa
client library and React hooks, StripeCheckout component, publish service,
Docker services (medusa, medusa_db, medusa_redis), CI/CD workflow, and
all Medusa references from config files, scripts, and docker-compose.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sends in-app + email notification to the person who created a task request
when someone responds to it, closing the feedback loop in the request flow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Connect notification service to email infrastructure — each notification
now sends an email when user has email_notifications enabled (default).
Replace hardcoded navigation in NotificationBell with SSOT config lookup.
Fix CHECK constraint to include decision_voting, decision_closed, and
protocol_finalized types that the codebase actually inserts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migration 038 adds 12 columns to workshops and 2 to workshop_instances so
the proposal approve route no longer crashes with 500. Approvals page now
only shows workshop proposals and blog posts (products/services are
admin-only), and surfaces permission requests for super admins. Removed
dead Medusa product-publish logic from the approval API route.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously inventory products showed "Anfrage senden" because they had
no Medusa variant ID, and the order service used hardcoded placeholder
data. This wires up the full end-to-end flow:
- Add medusa_variant_id column to inventory_items (migration 037)
- Extract Medusa publish logic into medusa-publish-service.ts
- Auto-publish to Medusa on product publish (fire-and-forget)
- Return Medusa IDs from inventory detail API
- Enable "In den Warenkorb" when variant ID exists on product page
- Rewrite order service to fetch real cart data from Medusa
- Make paymentIntentId optional (payments deferred)
- Update order-service tests for new Medusa cart integration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace RAG-based document retrieval with a rich system prompt containing
all organizational knowledge derived from SSOT sources. The Llama 3.3 70B
model (128k context) handles it easily without needing vector search.
- Create system-prompt.ts deriving all numbers from org-numbers.defaults
- Remove RAG retrieval (searchSimilar, formatContext, contextUsed)
- Remove chunks UI (sources panel, similarity scores) from HirnChat
- Add input validation for temperature/maxTokens at API boundary
- Scope history queries by user_id for defense in depth
- Update welcome text to reflect baked-in knowledge
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
All organizational numbers now flow from a single `org_numbers` table
in the shared Neon database, resolving contradictions across 6+ files
(e.g. internship success 40% vs 90%, devices 150 vs 1000, CO₂ 300kg
vs 350kg). Numbers reconciled against audited revamp-info registry.
Key corrections: CO₂ production 300→350kg (Fraunhofer IZM 2023),
refurbishment 15→65kg, annual CO₂ saved ~43t (not 285t), internship
success ~40% (not 90%), people helped 100+ (not 347), team ~20 (not 23).
Also fixes German language consistency in services.ts (Linux & Web
pricing/features were in English).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add EditHistoryEntry type and edit tracking fields to WorkshopProposal
- Add reviewer_name and editor_name to WorkshopProposalWithProposer
- Fix type assertions in API routes (currentProposal as WorkshopProposal)
- Fix optional property access in EditProposalModal and EditSubmissionModal
- Fix Heading import (default vs named export)
- Add null checks in test file
- All typechecks now pass
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add database migration (034) for edit tracking columns
- Implement edit history with JSONB audit trail
- Create workshop proposal detail page with edit modal
- Add blog submission edit functionality
- Display edit history with timestamps and field changes
- Show 'Von Admin bearbeitet' badges in list views
- Full API endpoints for edit operations
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Fix 3 admin pages querying dead technician_profiles table instead of
helper_profiles (IT_HILFE_TECHNICIAN_PROFILES)
- Replace dynamic require() with static import in technician-profile API
- Fix multi-skill filter: frontend now sends comma-separated skills,
API parses as array with ANY() SQL matching
- Make FK migration 028 idempotent with DO $$ guard
- Rename duplicate 028_ migration to 029_
- Add seed migration 030 for 3 IT-Hilfe technician profiles
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Protocol-level voting tables renamed from decision_votes/decision_outcomes
to protocol_decision_votes/protocol_decision_outcomes to avoid naming
conflict with the standalone team decisions system (027).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable creating decisions from protocol action items by adding FK
constraint, decision_data schema field, and linkActionItemToDecision
service function. Remove placeholder guard in actions API route.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Complete decision lifecycle for protocol action items with item_type 'decision':
team voting (thumbs up/down with toggle), auto/manual close, AI-generated task
proposals for approved decisions, and one-click bulk task creation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add full decisions/voting feature for team governance — proposals,
discussion threads, multiple voting methods, and result tracking.
- Add migration 027 for decisions, votes, and comments tables
- Add decisions config, Zod schemas, and service layer
- Add admin UI: list, detail, create, edit pages
- Add API routes for CRUD, voting, comments, and status transitions
- Add TABLE_NAMES, error/success messages, and admin section config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add comprehensive input validation across all high-priority API routes:
- Create 12 domain-specific schema files (payments, appointments, reviews,
workshops, messages, user, repairer, seller, blog, ai, inventory, common)
- Add validateBody/validateQuery helpers with structured German error responses
- Wire validation into 20+ route files replacing manual field-presence checks
- Add discriminated union schema for appointment PATCH actions
- Standardize payment route error messages to German
- Fix lint errors in CategoryForm and RegistrationWizard (setState in useEffect)
- Extract thick route handlers to service layer (seller, inventory, orders)
- Add loading states to admin and dashboard pages
- Add 67 unit tests covering all schemas with valid/invalid/default cases
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add comprehensive activity tracking for team profiles:
- Current focus status on profile detail page
- Manual activity updates (accomplishments, milestones, notes, announcements)
- Help request system (broadcast or targeted)
- Unified activity feed aggregating all sources
- Weekly digest for management with stats and top contributors
Also includes code quality fixes:
- Fix SQL injection vulnerabilities in activity and digest routes
- Extract shared formatRelativeTime utility to reduce duplication
- Fix TypeScript type errors in ActivityCard and focus route
- Fix lint errors in CurrentFocusInput (replace useEffect with useMemo)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fix TypeScript errors by properly typing database query results
throughout the task management API routes.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds a complete task management system for team coordination including:
- Database migration with tasks, completions, attention flags, requests, and projects tables
- Full CRUD API endpoints for tasks, projects, and task requests
- Analytics endpoint for task metrics
- Admin UI pages: task list with filters, task detail, create/edit forms
- Task completion tracking with optional photo proof
- Attention flag system for urgent tasks
- Project-based task organization
- Zod schemas for validation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix Listmonk/CMS users table conflict by using separate listmonk_db database
- Fix migration errors: index column names, conditional index creation,
seller_profiles missing columns, immutable function in unique index
- Add staffVerificationCode and staffWelcome email templates for @revamp-it.ch
- Update registerUser() to select template based on staff status
- Add Listmonk service to docker-compose with Mailpit for local testing
- Add email provider abstraction supporting both Listmonk and direct SMTP
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The original donations table migration didn't include thank_you_sent_at,
causing PATCH requests to fail when marking donations as thanked.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement comprehensive team profile system for staff management:
- Database migration for team_profiles table with talent development fields
- Team profile CRUD API with permission-based HR notes visibility
- Team components: cards, filters, form with progressive disclosure, detail view
- Team pages: overview with PermissionRequestsManager, detail, edit, create
- Enhanced users API with search, filter, and pagination
- User detail page with link to team profile
- Config-driven labels and options (SSOT principle)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements Phase 1 of donations feature enabling staff to record donations
against user accounts and users to view their donation history.
- Add config SSOT for donation types, device categories, conditions, statuses
- Extend donations table with device fields via migration
- Add DbDonation interface and Zod validation schemas
- Create user API to fetch donation history
- Create admin API for CRUD operations with filtering/pagination
- Add user dashboard page showing donation history
- Add admin page with stats, filters, and donation recording form
- Register donations sections in admin sidebar and user dashboard
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create blog_submissions table for unified storage (migration 019)
- Add public submission endpoint at /api/public/blog/submit (CSRF-exempt)
- Add admin API at /api/admin/blog/submissions/[id] for approve/reject/publish
- Add admin UI at /admin/content/submissions for reviewing submissions
- Add public categories API at /api/blog/categories
- Update submission form to fetch categories from database
- Fix CSRF validation issue by using /api/public/ path
Flow: User submits → Admin reviews → Approve/Reject/Publish
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add database fields and admin UI for editing all service content:
- Migration 018 adds presentation columns (icon, hero, features, process, pricing)
- Service icons config with curated Lucide icons for selection
- Category styling config for visual consistency
- IconPicker and ServiceForm admin components
- API routes for CRUD operations on services
- Edit page at /admin/services/[id]/edit
- Updated services list with edit links and category display
DB content now takes priority over presentation.ts with fallback support.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create unified service layer merging DB operational data with presentation config
- Add migration 017 to align service_types slugs with marketing data
- Refactor service detail pages to use getService() from unified layer
- Update API route to use getFeaturedServices/getBookableServices
- Add SERVICE_CATEGORIES and FEATURED_SERVICE_SLUGS constants
- Update service components to import types from @/lib/services
- Fix Next.js 16 params handling (await params)
- Mark src/data/services.ts as deprecated
Architecture:
- Database (service_types) = SSOT for operational data (prices, availability)
- Presentation config = rich display data (icons, features, process steps)
- Unified layer merges both for components to consume
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix services admin: use correct column name (price_cents not base_price_cents)
- Fix workshops public page: handle consistent API response format
- Fix workshop proposals API: use staff-based permissions, return items array
- Standardize API pattern: arrays returned directly, not wrapped in named objects
- Add PROPOSAL_STATUS constants to workshops config (SSOT)
- Add workshop error messages to error-messages config
- Document API response pattern in lib/api/helpers.ts
- Add migration 016 for workshop_proposals and locations tables
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Blog Admin System:
- Add BlogPostForm component for create/edit
- Add /admin/content/blog/new and [id] pages
- Add /api/admin/blog CRUD endpoints
- Add /api/services public endpoint
- Add blog-db.ts and services-db.ts utilities
- Add 015_content_management.sql migration
- Update blog pages to use database with file fallback
Hirn Provider Simplification:
- Remove premium providers (Anthropic, OpenAI, Google, xAI)
- Keep only Ollama, Groq, OpenRouter
- Update HirnProviderSelector to show only free/local options
- Fix provider type definitions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename peer-repairs to it-hilfe with enhanced matching system
- Add voice input for product data entry (erfassung)
- Add product management components for admin
- Add user helper profile and skills management
- Simplify registration flow (remove role selection)
- Add new migrations for it-hilfe user skills
- Update navigation and config files
- Various bug fixes and improvements
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add scripts/start-all.sh: orchestrated startup with health checks for all
services (Docker, Medusa, Next.js) in correct dependency order
- Add scripts/stop-all.sh: graceful shutdown of application services
- Update package.json with cleaner commands (npm run d, start:all, stop:all)
- Enhance /api/health endpoint to check all services (database, Medusa,
Meilisearch) with latency metrics and overall status
- Add graceful degradation to shop API: returns empty products instead of
crashing when Medusa backend is unavailable
- Fix inventory API: remove references to non-existent item_uuid column
This makes the system more resilient - the frontend continues working even
when optional services (Medusa) are temporarily down.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add lazy validation for admin password config (prevents build failures)
- Create modular sensitive areas config in src/config/sensitive-areas.ts
- Add visual indicator (shield icon) for sensitive sections in admin sidebar
- Add "Admin" link in UserMenu for staff members
- Add "Website" button in admin header for easy site switching
- Fix LogOut icon → User icon for "Mein Bereich" in admin sidebar
- Add npm script to generate bcrypt hashes: npm run generate:admin-hash
Admin password configuration:
- Production requires ADMIN_PASSWORD_HASH (bcrypt)
- Development allows ADMIN_PASSWORD (plain text, with warning)
- Validation now runs lazily at first use, not during build
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>