- 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>
- Add Erfassung form page for capturing product data with optional AI assist
- Create database schema for inventory items and customer profiles
- Add factsheet/label printing page for products
- Add inventory management tab in admin products view
- Create public shop API for published inventory products
- Update shop page to display inventory products with search and profile filters
- Update product detail page to support both inventory and Medusa products
- Add customer profile badges and condition labels to product display
- Add technical specifications display for inventory products
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Database Changes:
- Migration 004: Add is_super_admin column to users table
- Sync existing super admins from SUPER_ADMIN_EMAILS list
Auth Updates:
- auth.ts: Add is_super_admin to User and Session types
- auth.ts: Pass is_super_admin through JWT to session
- db.ts: Add is_super_admin to DbUser interface
- permissions.ts: Update isSuperAdmin() to check both email list and DB flag
- permissions.ts: Add is_super_admin to StaffUser interface
API Endpoints:
- PATCH /api/admin/users/[id]/permissions
- Super admins can update staff permissions directly
- Super admins can promote/demote other super admins
- Cannot demote users in hardcoded SUPER_ADMIN_EMAILS list
- Cannot demote yourself
UI Components:
- UserPermissionsEditor: Modal for managing user permissions
- Toggle super admin status
- Toggle full access
- Select individual section permissions
- Visual distinction for sensitive sections
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Features:
- staff_permission_requests table (migration 003)
- API endpoints:
- POST /api/admin/permissions/request - Staff submits access request
- GET /api/admin/permissions/requests - Super admin lists pending requests
- POST /api/admin/permissions/requests/[id] - Super admin approves/rejects
UI Components:
- PermissionRequestForm - Staff can select sections and provide reason
- PermissionRequestsManager - Super admin sees and handles pending requests
- RequestAccessSection - Shows on dashboard for staff without full access
Workflow:
1. Staff sees sections they can't access on dashboard
2. Staff clicks "Request Access" and fills form
3. Super admin sees request in dashboard
4. Super admin approves/rejects
5. If approved, permissions are added to user's staff_permissions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace complex role-based auth with simple staff/permission model:
- Staff detected by @revamp-it.ch email domain
- Super admins (allowlist) get full access to sensitive sections
- Regular staff get configurable permissions via staff_permissions[]
- Admin layout shows only accessible sections in sidebar
Also adds:
- Space page showing physical location needs and donation CTA
- Database migration for is_staff, staff_permissions columns
- technician_profiles table (replaces repairer)
- Content approval workflow tables
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Peer Repair Marketplace ("Uber for repairs"):
- Create database migration for peer_repair_requests and peer_repair_offers tables
- Add API routes for requests, offers, and acceptance flow
- Build browse, create, and detail pages for repair requests
- Implement my-requests and my-offers dashboard pages
- Add peer-repairs config with categories, skills, and budget types
HIRN Admin Dashboard:
- Add financial data visualization with yearly income charts
- Create kennzahlen (KPIs), transparenz, and wirkung pages
- Implement data loading utilities and TypeScript types
- Add comprehensive documentation and presentation materials
Supporting changes:
- Update navigation config with new routes
- Add useMediaQuery hook for responsive layouts
- Extend constants with new configuration values
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Stripe payment integration to WorkshopRegistrationForm
- Create admin UI for workshop instance management with registrations
- Implement email notifications for registration, reminders, and feedback
- Add reviews display component with ratings and feedback submission
- Add workshop materials management with access control (public/registered/attended)
- Create migration for workshop_materials table
- Add API endpoints for admin and public material access
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add GET /api/repairers/[id]/availability endpoint for slot fetching
- Add POST /api/repairers/[id]/book endpoint for appointment booking
- Add /repairers/[id]/book booking page with 3-step wizard
- Add database migration for booking enhancements
- Support home visits with address fields
- Integrate with service_appointments table
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updated vulnerable packages where possible.
Some vulnerabilities remain due to next-contentlayer peer dependency conflicts.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix UserMenu buttons to show immediately without waiting for session check
- Update password validation to enforce 12 character minimum
- Add database connection error handling in auth routes
- Improve session provider configuration for non-blocking session checks
- Add graceful error handling for slow local database connections
- Added curl to Dockerfile for health check improvements.
- Modified npm install commands to build TypeScript and prune unnecessary packages.
- Updated health check command to use curl for better reliability.
- Adjusted TypeScript definitions for user-related functions to return more specific response types.
- Changed user role options from 'viewer' to 'user' in multiple places for consistency.
- Updated package.json dependencies, including downgrading jsonwebtoken types and switching bcrypt to bcryptjs for compatibility.
- Added new environment variables for email configuration in the env.template file.
- Cleaned up various files by removing unnecessary newlines and ensuring consistent formatting.
- Updated the product owner identification in the POST request to use a fallback for the owner's name.
- Enhanced the type safety of the sendEmail function by specifying argument types as unknown.
- Adjusted the email template retrieval to ensure proper typing for email templates.
These changes improve code clarity and maintainability across the application.
- Updated password hashing and verification functions to use bcryptjs for improved compatibility.
- Added a constant-time string comparison function to enhance security against timing attacks.
- Refactored JWT token generation to utilize environment variables for secret management.
- Adjusted user roles in registration and role selection components to align with new role definitions.
- Cleaned up unused imports and improved code organization across several files.
This change enhances security and maintains consistency in the authentication process.wd
Major cleanup removing all Strapi-related code and migrating to static content:
- Remove all Strapi integration files (strapi.ts, types)
- Delete legacy Strapi pages and components
- Remove migration scripts and Strapi tooling
- Update Docker compose to remove Strapi services
- Reorganize documentation files into docs/ directory
- Remove obsolete test components and legacy API routes
- Add new responsive design components and utilities
- Update service pages to use static content
- Simplify blog pages to use hardcoded content
- Remove package dependency on Strapi
This cleanup reduces codebase complexity and prepares for production deployment.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major improvements to make the repository welcoming for new contributors:
- Completely rewrote README.md with clear project overview, installation steps, and professional presentation
- Added comprehensive CONTRIBUTING.md with development workflow, code standards, and contributor recognition
- Created MIT LICENSE file for proper open source compliance
- Added .env.example files for both frontend and CMS API with all necessary configuration variables
- Organized documentation in docs/ folder for better structure
- Removed outdated files and AI-related placeholders
- Updated project description to focus on sustainable technology mission
- Added professional badges and clear feature descriptions
- Included proper setup instructions for both development environments
The repository now presents a professional, legitimate open source project that clearly communicates its purpose and makes it easy for developers to contribute.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add Next.js admin routes (/admin, /admin/login, /admin/pages, /admin/pages/new, /admin/pages/[id])
- Create admin layout with navigation and authentication
- Build login page with email/password form
- Implement pages list with search and create functionality
- Add WYSIWYG editor for content creation/editing
- Create API routes for admin authentication and content management
- Add middleware for route protection
- Include sample data population script
- Add comprehensive admin interface documentation for non-technical users
- Create test page for validating admin functionality
- Update environment configuration for JWT secret
Admin interface is now super easy and intuitive for non-technical team members to:
- Login with email/password
- View all pages with search
- Create new pages
- Edit existing pages with rich text editor
- Save as draft or publish immediately
- Preview content before publishing
All code follows best practices with proper error handling, security, and accessibility.