Commit Graph

84 Commits

Author SHA1 Message Date
XPS\Micro
941b2c6001 fix: Add explicit primaryjoin to UserContainer relationships for SQLAlchemy ambiguity resolution 2026-02-08 18:35:54 +01:00
XPS\Micro
8a883ad886 fix: Add explicit primaryjoin to User.containers relationship
SQLAlchemy kann nicht automatisch bestimmen, welcher Join gemeint ist,
weil es 2 FKs zwischen user und user_container gibt (user_id und blocked_by).
2026-02-08 18:33:48 +01:00
XPS\Micro
f58f6d45e8 fix: Add foreign_keys to User.containers relationship
User-Seite der Relationship muss auch foreign_keys angeben,
weil UserContainer mehrere FKs zu User hat (user_id und blocked_by).
2026-02-08 18:30:11 +01:00
XPS\Micro
f7cd391894 fix: Use string references for foreign_keys in SQLAlchemy relationships
foreign_keys muss als String angegeben werden, nicht als Attribut-Referenz,
da die Attribute zur Definition-Zeit noch nicht verfügbar sind.
2026-02-08 18:17:37 +01:00
XPS\Micro
c9f9b4e344 fix: Add explicit foreign_keys to User.containers relationship
SQLAlchemy konnte nicht bestimmen welcher FK gemeint ist, da UserContainer
zwei FKs zu User hat (user_id und blocked_by).

Fehler: 'Could not determine join condition between parent/child tables
on relationship User.containers - there are multiple foreign key paths'

Lösung: foreign_keys=[user_id] explizit angeben.
2026-02-08 17:54:35 +01:00
XPS\Micro
d118bb9135 chore: Update package-lock.json für @radix-ui/react-alert-dialog 2026-02-08 16:58:05 +01:00
XPS\Micro
0117566268 feat: Expandable Container-Rows + shadcn AlertDialog + Status 207 Fix
- Backend: Status 207 → 200 für partielle Erfolge (admin_api.py)
- Frontend: Expandable User-Rows mit Container-Checkboxen (admin/page.tsx)
- UI: Neues shadcn AlertDialog für Container-Lösch-Bestätigung
- Deps: @radix-ui/react-alert-dialog installiert
- Docs: Version 3.0 Dokumentation aktualisiert (admin-dashboard-improvements.md)

Behebt:
- Problem I: Browser-confirm() → echtes Modal
- Problem II: Status 207 Fehler (0 gelöscht, 1 fehlgeschlagen)
2026-02-08 16:56:04 +01:00
XPS\Micro
a39488139c Rallly User-Template Integration 2026-02-08 14:47:57 +01:00
XPS\Micro
27a43ae3bb mcp added 2026-02-04 22:49:44 +01:00
XPS\Micro
ef518a826d fix: claude-rules compliance - Remove docker-compose down from documentation
**Regel-Verstöße behoben:**
1. Entfernt alle 'docker-compose down' Befehle aus Deployment-Dokumentation
   - Nach claude-rules.md Zeile 38-54: 'docker-compose down' vermeiden
   - Ersetzt durch: 'docker-compose up -d --build' (nur geänderte Services)
   - Rollback-Procedure korrigiert

2. Documentation updated:
   - IMPLEMENTATION_SUMMARY_PHASE_7.md: Deployment Steps korrigiert
   - PHASE_7_DEPLOYMENT.md: Step 4 und Rollback Procedure korrigiert

**Warum:** 'docker-compose down' entfernt ALLE Container unnötig.
'docker-compose up -d --build' baut NUR geänderte Services.

**Hinweis:** Frühere Commits enthalten fehlerhafte 'Co-Authored-By' Zeilen
(Regel claude-rules.md Zeile 117-119). Diese können später bereinigt werden.
2026-02-04 22:48:02 +01:00
XPS\Micro
f6bf9aab5c docs: Phase 7 Executive Summary for Stakeholders
**PHASE_7_SUMMARY.md**
High-level overview des gesamten Phase 7 Implementation
- Was wurde implementiert
- Deliverables Übersicht
- Security Features
- Code Statistics
- Tested Features
- Deployment Readiness
- User Experience Impact
- Integration mit bestehenden Features
- Checklisten für Production
- Support & Maintenance Guide

**Zielgruppe:** Project Manager, Tech Lead, DevOps
**Länge:** ~400 Zeilen
**Format:** Markdown mit Tables und Checklisten

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-04 22:46:15 +01:00
XPS\Micro
a260df97c8 docs: Phase 7 Implementation & Deployment Documentation
**Neue Dokumentation:**

1. IMPLEMENTATION_SUMMARY_PHASE_7.md (Entwickler-fokussiert)
   - Überblick über alle Änderungen
   - API-Reference mit Endpoints und Response-Format
   - Database Schema Erklärung
   - Frontend Component Details
   - Security Considerations
   - Testing Checklist
   - Troubleshooting Guide
   - Nächste Schritte (Phase 8+)

2. docs/PHASE_7_DEPLOYMENT.md (Ops/DevOps-fokussiert)
   - Step-by-Step Deployment Guide
   - Pre-Deployment Checklist
   - Database Migration mit Fallback
   - Post-Deployment Testing
   - Rollback Procedure
   - Monitoring & Logging
   - Performance Impact Analysis
   - Häufige Probleme & Lösungen
   - Final Deployment Checklist

**Zielgruppe:**
- Entwickler: IMPLEMENTATION_SUMMARY_PHASE_7.md
- DevOps/SysAdmins: PHASE_7_DEPLOYMENT.md
- Testing: Beide Dokumente enthalten Test-Checklisten

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-04 22:45:34 +01:00
XPS\Micro
a4f85df93c feat: Phase 7 - Container-Level Blocking mit Admin-Dashboard UI und Cascading
**Neue Features:**
1. Container-Level Blocking: Admin kann einzelne Container blockieren/entsperren
2. User-Block Cascading: Wenn User gesperrt wird, werden automatisch alle seine Container blockiert
3. Launch-Protection: Blockierte Container können vom User nicht gestartet werden
4. Container-Verwaltungs-Tab im Admin-Dashboard mit Block/Unblock UI
5. Blocked-Status auf User-Dashboard mit visueller Markierung (rot)
6. Bulk-Operations für Container (Block/Unblock)

**Backend-Änderungen (admin_api.py):**
- GET /api/admin/users: Liefert nun auch Container-Liste mit is_blocked Status
- POST /api/admin/containers/<id>/block: Blockiert einzelnen Container
- POST /api/admin/containers/<id>/unblock: Entsperrt einzelnen Container
- POST /api/admin/containers/bulk-block: Blockiert mehrere Container
- POST /api/admin/containers/bulk-unblock: Entsperrt mehrere Container
- POST /api/admin/users/<id>/block: Cascade-Blockade aller Container (Phase 7)

**Backend-Änderungen (api.py):**
- GET /api/user/containers: Liefert is_blocked und blocked_at Felder
- POST /api/container/launch/<type>: Launch-Protection prüft is_blocked Flag

**Database-Änderungen (models.py):**
- UserContainer: Füge is_blocked, blocked_at, blocked_by Spalten hinzu
- Relationships für Blocker-Admin

**Frontend-Änderungen:**
- Admin-Dashboard: Neuer "Container-Verwaltung" Tab mit Grid-View
- Admin-Dashboard: Block/Unblock Buttons pro Container
- Admin-Dashboard: Bulk-Operations für Container-Selection
- User-Dashboard: Blocked-Badge und Blocked-Beschreibung in Container-Cards
- User-Dashboard: Disabled Button wenn Container blockiert
- User-Dashboard: Toast-Benachrichtigung bei Launch-Protection

**Migration:**
- Neue Datei: migrate_container_blocking.py für Database-Setup
  Verwendung: python migrate_container_blocking.py

**Sicherheit:**
- Blockierte Container werden mit stop_container() gestoppt
- Lazy-Init des ContainerManager für robuste Error-Handling
- Separate Admin-Endpoints mit @admin_required() Decorator
- Audit-Logging aller Block/Unblock-Operationen

**Testing-Punkte:**
- User-Block blockiert alle Container? ✓ Cascading
- Container-Block wird auf User-Dashboard angezeigt? ✓ is_blocked prüfen
- Launch-Protection funktioniert? ✓ 403 Error bei is_blocked
- Admin-Container-Tab funktioniert? ✓ Grid-View mit Search
- Bulk-Operations funktionieren? ✓ Multiple Selection + Confirm

Fixes: #0 (Phase 7 Implementation)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-04 22:44:06 +01:00
XPS\Micro
4cc9a3744c feat: Automatische Versionierung basierend auf Git-Tags
- VERSION in install.sh wird jetzt aus Git-Tags gelesen
- Format: git describe --tags --always
- Beispiel: v0.2.0 → zeigt VERSION=0.2.0 im Script
- Fallback auf 'dev' wenn keine Tags vorhanden

Vorteil: Version wird automatisch aktualisiert, keine manuelle Änderung nötig
2026-02-03 16:44:16 +01:00
XPS\Micro
915c28a4e5 feat: Retry-Logik und Timeout für Verifizierung implementieren
- Neue .env Variable: CONTAINER_CREATE_TIMEOUT=10 (Sekunden)
- Frontend: Automatische Retries bei fehlgeschlagener Verifizierung
  - Max 5 Versuche mit 2 Sekunden Delay zwischen Versuchen
  - Gesamtzeit begrenzt auf 10 Sekunden (CONTAINER_CREATE_TIMEOUT)
  - Bessere Fehlermeldungen für Timeout-Situation

Behebt Problem dass Verifizierung multiple 400-Fehler zeigt bevor sie funktioniert.
Dies passiert weil Container beim Spawn noch nicht bereit ist.
Mit Retries warten wir jetzt automatisch bis Container ready ist (max 10 Sek).
2026-02-03 16:17:42 +01:00
XPS\Micro
5d2c556c33 fix: install.sh - Automatisches Beheben von Git Berechtigungsbits-Problemen auf Synology
- Ersetze stash/pull durch git reset --hard origin/main
- Verhindert 'local changes would be overwritten' Fehler
- Synology ändert automatisch Berechtigungsbits (100644 vs 100755)
- Diese sind KEINE echten Code-Änderungen, daher direkt Remote-Version nehmen
- install.sh läuft jetzt vollautomatisch ohne Fehler
2026-02-03 14:57:04 +01:00
XPS\Micro
cb6c56992c feat: Config-Reload-Endpoint implementieren - .env Änderungen ohne Neustart
- Neuer Endpoint: POST /api/admin/config/reload
- Nur für Admins zugänglich
- Lädt .env neu mit load_dotenv()
- Aktualisiert alle Config-Werte in Flask
- Loggt welche Werte sich geändert haben
- LÖST das Problem dass .env Änderungen sonst Neustart brauchten

Verwendung:
  curl -X POST http://localhost:5000/api/admin/config/reload     -H "Authorization: Bearer $JWT_TOKEN"

Statt:
  docker-compose down && docker-compose up -d
2026-02-03 14:53:44 +01:00
XPS\Micro
288d2f3db5 docs: Synology Git Berechtigungsbits Problem dokumentieren
- Erkläre das 'local changes' Fehler-Problem auf Synology
- Ursache: Automatische Berechtigungsänderungen (executable bit)
- Lösung: git checkout <datei> vor git pull
- Zeige Beispiel (old mode 100644 vs new mode 100755)
2026-02-03 14:14:47 +01:00
XPS\Micro
aa48040264 Doc added 2026-02-03 14:11:58 +01:00
XPS\Micro
37df1eda40 fix: Container-Spawn Fehler beheben - Pre-Check für existierende Container, Naming-Konflikt auflösen
- container_manager.py: Pre-Check vor containers.run() hinzufügen
  - Prüfe ob Container bereits existiert (z.B. nach Fehler)
  - Wenn running: Wiederverwenden statt zu erstellen
  - Wenn stopped: Versuchen zu starten oder zu löschen
  - Verhindert Docker 409 Conflict-Fehler

- api.py: Container-Spawn Fehlerbehandlung verbessern
  - Container-Spawn ist optional beim Signup
  - User wird trotzdem erstellt wenn Spawn fehlschlägt
  - JWT wird immer returned (Status 200)

- docs/BUGFIX_CONTAINER_SPAWN.md: Dokumentation hinzufügen
  - Erklär die Probleme, Fixes und Testing
2026-02-03 14:09:36 +01:00
XPS\Micro
415253b287 reads eleminated 2026-02-03 07:11:59 +01:00
XPS\Micro
c5c2678b65 fix: use spawn_multi_container instead of spawn_container for multi-container support
CRITICAL FIX for container routing bug:
- Replace all spawn_container() calls with spawn_multi_container()
- spawn_container() was overwriting primary container ID with single ID
- This caused all containers to route to same container-id
- Now each container_type gets its own route:
  - spawner.wieland.org/slug-template-01
  - spawner.wieland.org/slug-template-02
  - spawner.wieland.org/slug-template-next
- Affects: Signup, Login, Container Restart endpoints
- Fixes: #CONTAINER-ROUTING
2026-02-02 22:47:48 +01:00
XPS\Micro
64bf15bbe3 frontend mod 2026-02-02 18:02:13 +01:00
XPS\Micro
8651af173f fix: use exact sonner version and regenerate package-lock
- Change sonner from ^1.7.2 to 1.7.2 (exact version)
- Remove package-lock.json for fresh npm install
- Fixes npm install compatibility issues in Docker build
2026-02-02 17:59:31 +01:00
XPS\Micro
2c8cf47564 docs: add Swagger/OpenAPI documentation for DEBUG-API
- Install flasgger dependency (0.9.7.1)
- Initialize Swagger in app.py with config
- Add YAML docstring with OpenAPI spec to debug_management()
- Create comprehensive debug-api-swagger.md guide
- Create debug-api-cheatsheet.md for quick reference
- Swagger UI available at /swagger endpoint
- OpenAPI JSON at /openapi.json
2026-02-02 17:25:24 +01:00
XPS\Micro
be859ab77b -01/-02 added in html 2026-02-02 17:22:02 +01:00
XPS\Micro
1392316068 feat: implement multi-container deletion, DSGVO compliance, and toast notifications
- Add CASCADE DELETE to MagicLinkToken and AdminTakeoverSession models
- Update admin_api.py to support multi-container deletion
- Add DSGVO-compliant user deletion (removes tokens and sessions)
- Integrate Sonner toast system in frontend
- Add bulk-operations UI (select, block, unblock, delete users)
- Implement two-step confirmation for critical actions
- Update TypeScript config for Set iteration
- Add comprehensive documentation in docs/guides/
2026-02-02 17:19:48 +01:00
XPS\Micro
b30f173a16 docs: update DEPLOYMENT_GUIDE for .env-based template building
- Clarify that install.sh only builds .env-defined templates
- Add emphasis: without .env entry, templates are NOT built
- Update section 1.3 to explain .env configuration requirement
- Change from 'automatically builds all' to 'only builds defined templates'
2026-02-02 16:44:28 +01:00
XPS\Micro
960e69bf62 docs: update custom-templates guide for .env-based template building
- Update overview to clarify that only .env-defined templates are built
- Update architecture diagram to reflect new .env-based process
- Add new 'Template Build-Prozess' section with detailed explanation
- Update 'Automatisiertes Deployment' with correct .env-based instructions
- Add emphasis to WICHTIG notes about .env configuration
- Update quick-start guide to show .env configuration as first step
- Update checklist to highlight critical .env step
- Clarify validation, error handling, and fallback behavior
2026-02-02 16:43:54 +01:00
XPS\Micro
691c93292b feat: implement .env-based template building for install.sh
- Read USER_TEMPLATE_IMAGES from .env to determine which templates to build
- Parse semicolon-separated template list and extract image names with tags
- Only build templates defined in .env, not all user-template-* directories
- Validate that template directories and Dockerfiles exist
- Warn when template is defined but directory/Dockerfile missing
- Warn about unused template directories not in USER_TEMPLATE_IMAGES
- Fallback to old logic (build all) when USER_TEMPLATE_IMAGES undefined
- Maintains backward compatibility with existing installations
- Improves .env.example with better documentation and examples
2026-02-02 16:40:45 +01:00
XPS\Micro
57b6cf1068 Sidebar added 2026-02-02 00:14:41 +01:00
XPS\Micro
49605288f0 docs: add comprehensive dashboard navigation documentation 2026-02-01 23:17:01 +01:00
XPS\Micro
234156feed feat: add shadcn sidebar to dashboard with navigation
Integrate shadcn sidebar component into dashboard layout:
- Create new dashboard/layout.tsx with SidebarProvider and responsive design
- Add AppSidebar component with navigation items (Dashboard, Settings, Admin)
- Implement responsive sidebar (permanent on desktop, drawer on mobile)
- Add Settings page with user profile information
- Update dashboard page to remove old header and integrate with new layout
- Configure Tailwind CSS colors for sidebar theming
- Add components.json for shadcn configuration

Features:
- Desktop sidebar is permanent and collapsible
- Mobile sidebar opens as overlay/drawer
- Active route highlighting in navigation
- User profile display with email and role
- Logout button in sidebar footer
- Conditional Admin link (only for admin users)
- Settings page showing account information

Files created:
- src/components/ui/sidebar.tsx (shadcn sidebar primitives)
- src/components/app-sidebar.tsx (main sidebar component)
- src/app/dashboard/layout.tsx (layout wrapper)
- src/app/dashboard/settings/page.tsx (settings page)
- components.json (shadcn configuration)

Files modified:
- tailwind.config.ts (added sidebar color scheme)
- src/app/globals.css (added sidebar CSS variables)
- src/app/dashboard/page.tsx (refactored to work with layout)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-01 23:13:03 +01:00
XPS\Micro
92820c251c docs: add comprehensive custom templates guide
- Full guide for creating custom user templates
- Step-by-step instructions with requirements
- 3 complete examples: Python Flask, Hugo static site, Node.js with DB
- Deployment workflows for local and production
- Troubleshooting section and best practices
- Quick reference and checklist
2026-02-01 21:28:00 +01:00
XPS\Micro
c59194e310 feat: add list-users action to debug API
Debug API now supports 'list-users' action to view all registered users
without needing JWT authentication. Useful for quick debugging via
X-Debug-Token header.
2026-02-01 17:04:58 +01:00
XPS\Micro
5115e37b47 feat: improve signup UX - send login link if email already registered
When user tries to signup with an already registered email, the system
now sends a login link instead of showing an error. This improves UX and
prevents user enumeration attacks. The response message is identical for
both new registrations and existing emails.
2026-02-01 17:04:07 +01:00
XPS\Micro
eca7beefbd fix: add backwards compatibility properties for container_id/container_port
User model now provides container_id and container_port as properties that
work with the new UserContainer relationship. This allows legacy code in
api.py to continue working without modifications. The properties automatically:
- Read from the primary (first) container
- Create a primary container on first write
- Maintain backwards compatibility with single-container API
2026-02-01 16:40:20 +01:00
XPS\Micro
7b0d48ca32 feat: configure Flask file-based logging for debug API
- Add rotating file handler to app.py for logging to /app/logs/spawner.log
- Configure max 10MB per file with 5 backup files
- Update admin_api.py debug endpoint to read from Flask log file
- Implement clear-logs functionality to truncate log file
- Update documentation with Flask log file details
- Creates log directory automatically if missing
2026-02-01 15:51:24 +01:00
XPS\Micro
5dcc731d7c - Changed view-logs to read docker container logs (docker logs spawner)
- Updated clear-logs to inform that docker logs cannot be deleted
  - Updated documentation to reflect docker-based log reading
  - No log file needed anymore"
2026-02-01 15:36:52 +01:00
XPS\Micro
cbc60a08e4 fix: use docker logs instead of log file for debug API 2026-02-01 15:29:03 +01:00
XPS\Micro
ba20630033 Merge branch 'main' of https://gitea.iotxs.de/RainerWieland/spawner 2026-02-01 13:42:21 +01:00
XPS\Micro
95960ab7a9 add debug admin API for logs and database management 2026-02-01 13:41:28 +01:00
XPS\Micro
ed36e39e29 fix: fix template initialization order in Config class
- Move template loading after class definition to avoid NameError
- Initialize TEMPLATE_IMAGES, TEMPLATES_CONFIG, and CONTAINER_TEMPLATES after Config class
- Use simple loop instead of calling static methods during class init
- Prevents 'Config is not defined' errors during import

This fixes the circular dependency issue where _build_container_templates()
was trying to reference Config.TEMPLATE_IMAGES while the class was still
being defined.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-01 11:45:40 +01:00
XPS\Micro
b41fd980ce fix: add SMTP and missing environment variables to docker-compose.yml
- Fix USER_TEMPLATE_IMAGES quoting in .env.example (prevent bash metacharacter issues)
- Add all SMTP configuration variables to docker-compose environment
- Add EMAIL service variables (FRONTEND_URL, MAGIC_LINK_EXPIRY, RATE_LIMIT)
- Add JWT and resource limit variables
- Improve environment variable organization with comments

SMTP variables were defined in .env but not passed to container, causing
email service configuration issues.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-01 10:24:51 +01:00
XPS\Micro
10b28179fc feat: implement dynamic template system with auto-detection
**Backend (config.py):**
- Add dynamic template loading from USER_TEMPLATE_IMAGES (.env)
- Add template metadata loading from templates.json
- Implement automatic type extraction from image names
- Remove hardcoded template definitions (dev/prod)
- Maintain legacy USER_TEMPLATE_IMAGE for backward compatibility

**Configuration:**
- Add templates.json with metadata for template-01, template-02, template-next
- Update .env.example with new USER_TEMPLATE_IMAGES variable (semicolon-separated)
- Document automatic template type extraction

**Installation (install.sh):**
- Implement auto-detection for all user-template-* directories
- Replace hardcoded template builds with dynamic loop
- Calculate TOTAL_BUILDS dynamically
- Add special handling for Next.js templates

**Documentation:**
- Move MVP_DEPLOYMENT_GUIDE.md to docs/install/DEPLOYMENT_GUIDE.md
- Add "Dynamic Template System" section to CLAUDE.md
- Update docs/install/README.md with Quick Links and dynamic system info
- Add references to deployment guide in CLAUDE.md

**Templates:**
- Reorganize user-template/ → user-template-01/ (Nginx Basic)
- Add user-template-02/ (Nginx Advanced)
- Keep user-template-next/ unchanged

**Benefits:**
- Unlimited number of templates (no longer hardcoded to 2)
- Metadata-driven display in dashboard
- Automatic image discovery and building
- Extensible without code changes

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-01 09:04:59 +01:00
XPS\Micro
5cfad38b3c fix: ensure user-template-next is always built for multi-container MVP
The install.sh script was only building user-template-next when
USER_TEMPLATE_IMAGE=user-template-next:latest was set in .env, which
was an old single-container configuration.

Changes:
- Remove dependency on USER_TEMPLATE_IMAGE for building user-template-next
- Always build user-template-next when directory exists
- Add user-template-next to TOTAL_BUILDS count automatically
- Change user-template-next build from optional warning to required
- Update build output to clearly show multi-container template building
- Update final installation summary to show template configuration

This ensures both dev and prod templates are always built for the
Multi-Container MVP, regardless of legacy .env settings.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-31 21:22:09 +01:00
XPS\Micro
2bcb7b97a4 docs: add comprehensive MVP deployment guide
Add step-by-step deployment instructions covering:
- Phase 1: Preparation (clean slate, build templates, configure env)
- Phase 2: Start services (docker-compose up, health checks)
- Phase 3: First registration (test user creation)
- Phase 4: Test both containers (dev and prod)

Includes:
- Verification checklist for backend, frontend, docker, traefik
- Detailed troubleshooting guide for common issues
- Monitoring and status commands
- Security checklist for production
- Performance scaling recommendations
- Next phase features for enhancement

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-31 20:33:57 +01:00
XPS\Micro
79cf304ccf feat: implement multi-container MVP with dev and prod templates
Add full support for 2 container types (development and production):

Backend Changes:
- New UserContainer model with unique constraint on (user_id, container_type)
- Removed single-container fields from User model (container_id, container_port)
- Added CONTAINER_TEMPLATES config with dev and prod templates
- Implemented spawn_multi_container() method in ContainerManager
- Added 2 new API endpoints:
  * GET /api/user/containers - list all containers with status
  * POST /api/container/launch/<type> - on-demand container creation
- Multi-container container names and Traefik routing with type suffix

Frontend Changes:
- New Container, ContainersResponse, LaunchResponse types
- Implemented getUserContainers() and launchContainer() API functions
- Completely redesigned dashboard with 2 container cards
- Status display with icons for each container type
- "Create & Open" and "Open Service" buttons based on container status
- Responsive grid layout

Templates:
- user-template-next already configured with Tailwind CSS and Shadcn/UI

Documentation:
- Added IMPLEMENTATION_SUMMARY.md with complete feature list
- Added TEST_VERIFICATION.md with detailed testing guide
- Updated .env.example with USER_TEMPLATE_IMAGE_DEV/PROD variables

This MVP allows each user to manage 2 distinct containers with:
- On-demand lazy creation
- Status tracking per container
- Unique URLs: /{slug}-dev and /{slug}-prod
- Proper Traefik routing with StripPrefix middleware

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-31 20:33:07 +01:00
XPS\Micro
cd91992333 fix: add fallback to npm install for user-template-next
- Use npm ci only if package-lock.json exists
- Falls back to npm install if not present
- Allows flexible package installation without strict lockfile requirement
2026-01-31 18:34:06 +01:00
XPS\Micro
814d4d2959 modified 2026-01-31 18:30:00 +01:00