From a6264271420a23a0346095486a1fd40fa201d341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Wed, 19 Nov 2025 10:25:06 +0100 Subject: [PATCH] feat: implement Phase 12.3 - Project Export/Import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added full export/import functionality for projects: Export Features: - Export button for each project in Projects dialog - Downloads project as JSON file with all data - Includes tracks, audio buffers, effects, automation, settings - Filename format: {project_name}_{timestamp}.json Import Features: - Import button in Projects dialog header - File picker for .json files - Automatically generates new project ID to avoid conflicts - Appends "(Imported)" to project name - Preserves all project data This enables: - Backup of projects outside the browser - Sharing projects with collaborators - Migration between computers/browsers - Version snapshots at different stages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- components/dialogs/ProjectsDialog.tsx | 22 ++++++++- components/editor/AudioEditor.tsx | 68 +++++++++++++++++++++++++++ lib/storage/projects.ts | 61 ++++++++++++++++++++++++ 3 files changed, 150 insertions(+), 1 deletion(-) diff --git a/components/dialogs/ProjectsDialog.tsx b/components/dialogs/ProjectsDialog.tsx index b8cd5bd..94ac591 100644 --- a/components/dialogs/ProjectsDialog.tsx +++ b/components/dialogs/ProjectsDialog.tsx @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { X, Plus, Trash2, Copy, FolderOpen } from 'lucide-react'; +import { X, Plus, Trash2, Copy, FolderOpen, Download, Upload } from 'lucide-react'; import { Button } from '@/components/ui/Button'; import type { ProjectMetadata } from '@/lib/storage/db'; import { formatDuration } from '@/lib/audio/decoder'; @@ -14,6 +14,8 @@ export interface ProjectsDialogProps { onLoadProject: (projectId: string) => void; onDeleteProject: (projectId: string) => void; onDuplicateProject: (projectId: string) => void; + onExportProject: (projectId: string) => void; + onImportProject: () => void; } export function ProjectsDialog({ @@ -24,6 +26,8 @@ export function ProjectsDialog({ onLoadProject, onDeleteProject, onDuplicateProject, + onExportProject, + onImportProject, }: ProjectsDialogProps) { if (!open) return null; @@ -44,6 +48,15 @@ export function ProjectsDialog({

Projects

+ +