Eurus Studio - Creative AI Workflow Platform
A cutting-edge Next.js application featuring Eurus Studio landing page design, built for creative AI workflows, collaborative content creation, and professional video editing with advanced Remotion integration and worker thread optimization.
✨ Features
🎯 Core Functionality
Interactive 3D Canvas: Drag-and-drop nodes with real-time 3D model rendering
AI-Powered Workflows: Integrated text, image, and video AI models
Real-time Collaboration: Multi-user editing with cursor presence
Unified Asset Management: Single source of truth with Azure-exclusive storage
Credit System: Usage tracking and billing integration
Visual node-based workflow editor with React Flow
AI-powered content generation: Images, videos, and text
Advanced image analysis with Azure OpenAI 4o mini integration
Context-aware generation - Intelligent content creation based on connected nodes
Optimistic UI updates - Instant deletion and real-time collaboration
Azure Blob Storage integration for scalable asset management
Auto-detection - Dynamic port and base URL recognition
Discovery and sharing platform
🎬 Enhanced Video Editor
Remotion Integration: Professional video rendering with React components
Worker Thread Architecture: Non-blocking video processing with dedicated workers
Performance Monitoring: Real-time FPS, memory, and render time tracking
Adaptive Quality System: Dynamic quality adjustment based on system performance
Multi-format Support: Video, audio, image, and text track editing
Background Processing: Frame extraction, thumbnail generation, waveform analysis
Intelligent Caching: Frame caching with automatic memory management
Timeline Optimization: Advanced timeline calculations and track arrangements
🎪 Eurus Studio Design
Immersive Hero Section: "Irreplacably Creative" with interactive draggable nodes
3D Model Integration: Real-time GLB model rendering with Three.js
Scroll-triggered Animations: Smooth transitions and dynamic content
Professional Tools Showcase: Video backgrounds and interactive elements
Ideas Scroll Section: Animated node interactions and creative prompts
🛠️ Technical Features
Next.js 15: Latest React framework with App Router
TypeScript: Full type safety and developer experience
Tailwind CSS: Utility-first styling with custom animations
Three.js Integration: 3D graphics and WebGL rendering
Firebase Integration: Authentication and real-time database
Azure Blob Storage: Cloud asset management
Responsive Design: Mobile-first approach with smooth interactions
Worker Thread Management: Dedicated workers for video, audio, image, and timeline processing
Remotion Rendering: React-based video composition and rendering
Recent Updates (October 2025)
🗂️ Unified Asset Management System (ENHANCED)
Complete asset management overhaul providing seamless integration across all application modes:
Azure-Exclusive Storage: Complete elimination of IndexedDB and local storage fallbacks
Single Source of Truth: All asset operations consolidated into
/src/lib/unifiedAssetManager.tsCross-Mode Integration: Seamless asset sharing between Project, Canvas, and Edit modes
Intelligent Storage Strategy: Context-aware storage with dual persistence for canvas assets
Comprehensive Hook System: Full React integration with
useUnifiedAssets.tsType-Safe Architecture: Complete TypeScript integration with proper interfaces
Performance Optimized: Efficient queries, caching, and background processing
🏗️ Unified Asset Management Architecture
The Eurus platform features a completely unified asset management system that provides seamless asset operations across Project, Canvas, and Edit modes with intelligent context-aware storage.
🎯 Cross-Mode Asset Flow
📂 Storage Architecture
🔧 Core Components
1. UnifiedAssetManager (/src/lib/unifiedAssetManager.ts)
/src/lib/unifiedAssetManager.ts)Central orchestrator managing all asset operations across modes:
Azure Integration: Direct blob storage with CDN delivery
Firestore Metadata: Efficient queries and real-time updates
Context-Aware Storage: Intelligent routing based on upload context
Type-Safe Operations: Full TypeScript integration throughout
2. React Hooks Ecosystem (/src/hooks/useUnifiedAssets.ts)
/src/hooks/useUnifiedAssets.ts)Complete React integration for all asset operations:
useAssetUpload: Universal file upload with progress tracking across all modesuseProjectAssets: Project-level asset management with filtering and searchuseMediaLibrary: Complete media browser with cross-mode asset aggregationuseNodeAssets: Canvas-specific operations with node context integration
3. Mode-Specific Integration
Project Mode (/src/modules/project/):
Asset gallery with bulk operations
Team sharing and collaboration features
Advanced filtering and categorization
Export and download capabilities
Canvas Mode (/src/modules/canvas/):
Node-specific upload via
useNodeUploadReal-time canvas asset updates
Drag-and-drop integration
Context-aware asset suggestions
Edit Mode (/src/modules/studio-editor/):
Timeline asset integration
Video/audio track management
Asset compatibility validation
Render-ready optimization
4. API Architecture (/src/app/api/assets/)
/src/app/api/assets/)Unified REST endpoints supporting all modes:
POST /api/assets- Universal upload with context detectionGET /api/assets/list- Cross-mode asset fetching with filtersDELETE /api/assets/delete- Safe deletion with metadata cleanupPOST /api/upload-media- Canvas legacy compatibility endpoint
🎯 Key Features
Cross-Mode Asset Integration
Unified Access: All modes can access and utilize the same asset pool
Context Intelligence: Assets uploaded in Canvas mode are available in Project and Edit modes
Smart Organization: Automatic categorization based on upload context and content type
Real-Time Sync: Instant asset availability across all open modes and collaborators
Intelligent Storage Strategy
Azure Primary: All files stored in Azure Blob Storage with global CDN
Firestore Metadata: Rich metadata for search, filtering, and organization
Dual Persistence: Canvas uploads stored in both collection and node data for performance
Automatic Cleanup: Orphaned assets and metadata automatically cleaned up
Performance & Scalability
Lazy Loading: Assets loaded on-demand with intelligent prefetching
Caching Strategy: Multi-level caching for instant repeated access
Progress Tracking: Real-time upload progress with pause/resume capabilities
Batch Operations: Efficient bulk upload and management operations
Type-Safe Architecture
🚀 Usage Examples Across Modes
Project Mode: Asset Gallery Management
Canvas Mode: Node-Specific Upload
Edit Mode: Timeline Asset Integration
Cross-Mode Asset Sharing
🔄 Migration Benefits & Cross-Mode Advantages
Before: Fragmented systems with separate upload logic per mode, IndexedDB inconsistencies After: Unified system with seamless cross-mode integration and intelligent context awareness
Performance Gains
Faster Cross-Mode Access: Assets uploaded in any mode instantly available elsewhere
Intelligent Caching: Smart prefetching based on usage patterns across modes
Reduced Network Overhead: Single CDN with optimized delivery paths
Background Processing: Non-blocking uploads with progress across all contexts
User Experience Improvements
Seamless Workflow: Upload in Canvas, access in Project, use in Edit timeline
Consistent Interface: Same upload experience regardless of current mode
Smart Suggestions: Context-aware asset recommendations based on current work
Real-Time Collaboration: Asset changes propagate instantly to all team members
Developer Benefits
Single API Surface: One set of hooks and functions for all asset operations
Type Safety: Comprehensive TypeScript interfaces across all modes
Maintainability: Zero code duplication, single source of truth
Testing: Unified test suite covering all asset operation scenarios
🎬 Enhanced Video Editor Integration
Remotion & Worker Threads: Fully integrated professional video editing capabilities
Performance Architecture: Worker pools for video, audio, image, timeline, and Remotion processing
EditorOrchestrator: Central service coordinator managing all video editor services
Adaptive Rendering: Dynamic quality adjustment based on system performance
Background Processing: Non-blocking video operations with progress tracking
Enhanced Video Player: Dual rendering modes (Canvas/Remotion) with fallback support
🎯 Context-Based Image Analysis
Smart node behavior: Nodes with existing media create NEW analysis nodes when describing images
Base state optimization: Empty nodes with image context update directly with descriptions
Azure OpenAI 4o mini: Fixed parameter compatibility (
max_completion_tokens,temperature: 1,top_p: 1)Intelligent routing: Text generation automatically detects image-to-text requests
🗑️ Optimistic Deletion System
Instant UI updates: Nodes and edges delete immediately without waiting for server confirmation
Smart edge cleanup: Connected edges automatically removed when nodes are deleted
Multiple delete keys: Support for both
DeleteandBackspacekeysCollaborative broadcasting: Real-time deletion sync across all users
🌐 Auto-Detection & Reliability
Dynamic port detection: Automatically detects server port (3000, 3001, 3002, etc.)
Request-based URL resolution: Uses request headers to determine correct base URL
Development flexibility: No more manual port updates when Next.js switches ports
Robust error handling: Graceful fallbacks for all network operations
🔧 Technical Improvements
Enhanced logging: Comprehensive debug information for troubleshooting
Performance optimization: Reduced API call latency and improved response times
Context data processing: Better handling of image URLs and metadata
Edge case handling: Improved stability for various content types
Modular architecture: Clean separation of concerns with service-oriented design
🚀 Tech Stack
Frontend
Framework: Next.js 15 with App Router
Language: TypeScript
Styling: Tailwind CSS
3D Graphics: Three.js, @react-three/fiber, @react-three/drei
Icons: React Icons, Lucide React
Animations: Framer Motion, CSS Animations
Video Editing: Remotion, Enhanced Video Player
Worker Threads: Web Workers for background processing
Backend & Services
Authentication: Firebase Auth
Database: Firestore (project-assets collection)
Storage: Azure Blob Storage (exclusive, no fallbacks)
Asset Management: Unified system with zero redundancy
API Routes: Next.js API Routes with unified endpoints
AI Models: OpenAI, Gemini, Flux, Stable Diffusion
Video Processing: FFmpeg.wasm, Remotion rendering
Performance Monitoring: Custom performance tracking system
Video Editor Architecture
Worker Pools: Video, Audio, Image, Timeline, Remotion processing
Service Layer: EditorOrchestrator, RemotionService, PerformanceMonitor
Rendering Engine: Dual-mode Canvas/Remotion rendering
Caching System: Intelligent frame caching with memory management
Health Monitoring: Automatic service restart and failure recovery
Development
Package Manager: pnpm
Linting: ESLint
Code Formatting: Prettier
Version Control: Git
🚀 Getting Started
Quick Setup
📋 Setup Documentation
Core Setup
See SETUP_GUIDE.md for detailed configuration of:
Azure AI Foundry (GPT-4o + SORA)
Multi-image composition pipeline
Troubleshooting and team collaboration
Remotion Lambda Setup
See src/remotion/README.md for complete serverless video rendering setup:
AWS IAM policy and role configuration
Lambda function deployment (with optimized settings)
Environment variables setup
Testing and troubleshooting
Cost optimization and monitoring
🎯 New: Multi-Image Composition
Upload multiple images and ask the system to "combine" or "merge" them:
GPT-4o analyzes all images simultaneously
SORA creates video compositions (Azure AI Foundry)
Enhanced FLUX fallback with intelligent prompts
🎤 Enhanced Audio Recording
Ultra-smooth voice-to-text functionality with Azure Whisper:
Instant visual feedback with pulsing recording animations
Optimized audio settings for clear speech recognition
Smart error handling with user-friendly messages
Real-time transcription with immediate prompt population
🎬 Enhanced Video Editor
🏗️ Architecture Overview
The enhanced video editor is built with a modular architecture that separates concerns and enables efficient background processing:
🎯 Video Editor Features
Worker Thread Management
WorkerPool: Manages multiple worker instances with automatic scaling
WorkerManager: Central coordinator for all worker pools
Task Prioritization: Intelligent task queuing and priority management
Health Monitoring: Automatic worker restart and failure recovery
Remotion Integration
Background Rendering: Non-blocking video frame generation
Caching System: Intelligent frame caching for smooth playback
Adaptive Quality: Dynamic quality adjustment based on performance
Preview Optimization: Fast preview rendering with lower quality
Performance Monitoring
Real-time Metrics: CPU, memory, and rendering performance tracking
Health Reports: Comprehensive system health analysis
Automatic Optimization: Performance-based feature adjustments
Developer Tools: Development-time performance overlays
🛠️ Worker Types
Video Processing Worker
Frame Extraction: Extract frames from video files
Thumbnail Generation: Generate video thumbnails
Video Analysis: Analyze video properties and metadata
Compression: Video compression with quality settings
Audio Processing Worker
Waveform Extraction: Generate audio waveform data
Peak Analysis: Extract audio peak information
Audio Normalization: Normalize audio levels
Format Conversion: Convert between audio formats
Remotion Rendering Worker
Frame Rendering: Render individual Remotion frames
Sequence Rendering: Render frame sequences
Video Export: Export complete videos
Preview Generation: Fast preview rendering
Image Processing Worker
Image Resizing: Resize images with quality options
Filter Application: Apply various image filters
Color Extraction: Extract dominant colors
Optimization: Optimize images for web
Timeline Calculator Worker
Layout Calculation: Calculate timeline layouts
Track Optimization: Optimize track arrangements
Keyframe Generation: Generate animation keyframes
Validation: Validate timeline integrity
🎮 Enhanced Video Player
The EnhancedVideoPlayer provides advanced features:
Features
Dual Rendering Modes: Canvas and Remotion rendering
Performance Monitoring: Real-time FPS and render time display
Adaptive Streaming: Quality adjustment based on performance
Background Preloading: Smooth playbook with predictive loading
Usage
Usage**
🗂️ Unified Asset Management
The application features a completely unified asset management system that eliminates all redundancy and provides a single source of truth for all media operations.
🏗️ Architecture Overview
🎯 Cross-Mode Asset Flow
Project Mode: Asset Library Management
Upload Flow: Gallery Upload → Azure Blob → Firestore Collection → Real-time Sync
Organization: Tag-based categorization, bulk operations, team sharing
Cross-Mode Availability: Instantly accessible in Canvas and Edit modes
Use Cases: Brand assets, stock images, project resources, team libraries
Canvas Mode: Node-Specific Asset Integration
Context Upload: Node Upload → Azure Blob → Firestore Collection + Node Data
Dual Persistence: Asset stored in collection for cross-mode access + node for performance
Real-Time Canvas: Immediate node visual update with asset preview
Use Cases: AI-generated content, workflow outputs, iterative creations
Edit Mode: Timeline Asset Integration
Asset Access: Aggregated view of Project assets + Canvas node outputs
Smart Filtering: Content-type filtering for timeline compatibility
Performance Optimization: Lazy loading with intelligent prefetching
Use Cases: Video editing, audio tracks, image sequences, final compositions
Universal Cross-Mode Benefits
Asset Discoverability: Upload anywhere, find everywhere
Context Preservation: Metadata tracks origin mode and usage context
Collaborative Workflow: Team members see assets regardless of their current mode
Version Control: Full audit trail of asset usage across different modes
🛠️ Cross-Mode Component Integration
Unified UI Components
Mode-Aware Hook System
🛠️ Core Components
Single Source of Truth
React Hook System
UI Components
📁 Storage Architecture
Azure Blob Storage Structure
Firestore Collection Structure
🚀 Cross-Mode API Architecture
Universal Upload Endpoint
Cross-Mode Asset Retrieval
Mode-Specific Endpoints
🎯 Cross-Mode Integration Benefits
Seamless Workflow: Upload in any mode, access everywhere instantly
Zero Context Switching: Assets available regardless of current working mode
Intelligent Organization: Context-aware categorization with cross-mode discoverability
Performance Optimized: Smart caching and prefetching across all modes
Real-Time Collaboration: Asset changes propagate instantly to all team modes
Type-Safe Operations: Full TypeScript integration with mode-aware interfaces
Unified Developer Experience: Single API surface for all asset operations
Scalable Architecture: Cloud-native with automatic cross-mode synchronization
🔧 Service Management
EditorOrchestrator
Central service coordinator that manages:
Service initialization and shutdown
Cross-service communication
Health monitoring and reporting
Event coordination
Key Methods
🚨 Error Handling & Fallbacks
Graceful Degradation
Service Failures: Automatic fallback to basic functionality
Worker Crashes: Automatic worker restart and task retry
Memory Pressure: Reduced quality modes to free memory
Network Issues: Offline mode with cached resources
Error Recovery
Azure Integration
This project uses Azure Blob Storage and Azure OpenAI for comprehensive AI workflows:
Storage Configuration
Storage Account:
eurusworkflowsContainers:
discover-assets,node-autosaveAssets: Images, videos, and generated content
Management: See
AZURE_ASSET_MANAGEMENT.mdfor detailed instructions
AI Services
Azure OpenAI 4o mini: Image analysis and description
Azure OpenAI 4.1 nano: Intent processing and context understanding
Azure Whisper: Ultra-smooth speech-to-text transcription
Optimized parameters: Configured for maximum compatibility and performance
🎮 Usage
Landing Page
Hero Section: Experience the interactive "Irreplacably Creative" canvas
Drag & Drop: Move nodes around the canvas to see real-time interactions
3D Models: Click on 3D nodes to see GLB models rendered in real-time
Scroll Experience: Smooth scroll through different sections
Authentication
Click "Get Started" to open the authentication modal
Sign in with email/password or social providers
Access the full creative workspace after authentication
Creative Workflows
Node-based Interface: Drag and drop AI tools
Real-time Preview: See results as you work
Collaboration: Work with team members in real-time
Asset Management: Upload and organize your creative assets
Video Editor Workflows
Professional Video Editing: Timeline-based editing with multiple tracks
Remotion Compositions: React-based video component creation
Background Processing: Non-blocking video operations with worker threads
Performance Optimization: Automatic quality adjustment and resource management
Real-time Collaboration: Multi-user video editing with live cursors
Export Options: Multiple format support with quality presets
📁 Project Structure
🎨 Key Components
Landing Page Features
InfiniteCanvasBackground: Animated particle background
DraggableNodesLayer: Interactive node system
ProductsScrollSection: AI model showcase with videos
IdeasScrollNodesSection: Creative inspiration section
Model3D: 3D model rendering with error boundaries
3D Model Integration
Error Boundaries: Graceful fallback for 3D model failures
Auto-rotation: Smooth 3D model animations
Optimized Loading: Preloaded GLB models for performance
Video Editor Components
Editor: Main video editor orchestrator with service management
EnhancedVideoPlayer: Advanced video player with dual rendering modes
Timeline: Professional timeline with multi-track support
WorkerManager: Centralized worker thread coordination
PerformanceMonitor: Real-time performance tracking and optimization
RemotionService: High-performance React-based video rendering
🚀 Deployment
Vercel (Recommended)
Docker
🔧 Configuration
Environment Variables
🎯 Performance Optimizations
Code Splitting: Dynamic imports for heavy components
Image Optimization: Next.js Image component with lazy loading
3D Model Caching: GLB model preloading and caching
Bundle Analysis: Optimized bundle sizes
SSR/SSG: Server-side rendering for better SEO
🐛 Troubleshooting
Common Issues
3D Models Not Loading
Check GLB file paths in
/public/images/Ensure files are not corrupted
Check browser WebGL support
Firebase Auth Issues
Verify environment variables
Check Firebase console configuration
Ensure auth domain is whitelisted
Video Editor Performance Issues
Check worker thread support in browser
Ensure sufficient system memory (4GB+ recommended)
Verify Remotion dependencies are properly installed
Monitor performance overlay in development mode
Try fallback canvas rendering if Remotion fails
Worker Thread Issues
Ensure worker scripts are accessible in
/public/workers/Check browser console for worker initialization errors
Verify CORS settings for worker script loading
Monitor worker pool status via EditorOrchestrator health reports
Performance Issues
Reduce 3D model complexity
Optimize image sizes
Check network requests in DevTools
Monitor memory usage with performance overlay
Use adaptive quality settings in video editor
🤝 Contributing
We welcome contributions! Please follow these steps:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Development Guidelines
Follow TypeScript best practices
Use Tailwind CSS for styling
Write meaningful commit messages
Add JSDoc comments for complex functions
Test your changes thoroughly
� Performance Best Practices
1. Worker Pool Sizing
2. Memory Management
Monitor memory usage with
performance.memoryImplement automatic cache cleanup
Use object pools for frequently created objects
3. Frame Rate Optimization
Target 30 FPS for smooth playback
Drop frames when performance is poor
Preload frames during idle time
4. Quality Scaling
Start with medium quality, adjust based on performance
Use lower quality for previews
Scale resolution for better performance on low-end devices
🎨 Customization
Adding New Worker Types
Create worker script in
/public/workers/Add task types to
workers/types.tsRegister with WorkerManager
Implement task handlers
Custom Effects and Filters
Extend the Remotion composition
Add effect types to the schema
Implement rendering logic
Register with the effects system
Performance Metrics
Extend the PerformanceMonitor
Add custom metric collection
Implement analysis functions
Create visualization components
🧪 Development Tools
Performance Overlay
Development mode shows real-time performance metrics:
FPS counter
Render time
Memory usage
System health status
Debug Controls
Service restart (Ctrl+R)
Performance logging
Worker pool status
Cache statistics
Health Monitoring
Comprehensive health reports include:
Service status
Performance metrics
Recommendations
System capabilities
🚀 Production Considerations
Build Optimization
Bundle workers separately for better caching
Minimize worker script sizes
Use efficient data transfer formats
Monitoring
Implement error reporting
Track performance metrics
Monitor user behavior patterns
Scaling
Adjust worker pools based on device capabilities
Implement progressive enhancement
Use feature detection for advanced capabilities
📝 API Reference
Core Services
editorOrchestrator- Central service coordinatorworkerManager- Worker pool managementremotionService- Remotion rendering serviceperformanceMonitor- Performance tracking
Components
Editor- Main editor componentEnhancedVideoPlayer- Advanced video playerTimeline- Timeline componentVarious panels and controls
Types
EditorState- Complete editor stateWorkerTask- Worker task definitionClip- Video/audio/text clipTrack- Timeline track
�📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
Eurus Studio for the incredible landing page design
Three.js community for 3D graphics support
Next.js team for the amazing framework
Tailwind CSS for the utility-first approach
Remotion for React-based video rendering
Web Workers API for background processing capabilities
� Troubleshooting
Asset Management Issues
Cross-Mode Asset Visibility
Assets uploaded in Canvas not showing in Project: Check
includeNodeAssets: trueinuseProjectAssetsCanvas assets missing from Edit mode: Ensure
useMediaLibrary(canvasNodes)includes current nodesMode-specific filtering issues: Verify
isNodeAssetfield is correctly set in FirestoreReal-time sync delays: Check Firestore listeners are active across all open modes
Upload Context Issues
Canvas uploads not persisting to node: Verify
nodeIdparameter in upload optionsProject uploads appearing as node assets: Remove
nodeIdfrom upload calls in project modeMissing cross-mode metadata: Ensure
modeparameter is correctly passed to upload API
Core System Issues
"Firestore is not initialized" Error: Ensure operations run client-side with proper Firebase config
Upload fails with "userId required": Add
userIdto all upload calls:uploadAsset(file, { projectId, userId })Assets not appearing: Verify
currentProject.idis valid and Firestore permissions allow readsAzure Storage connection: Check
AZURE_STORAGE_CONNECTION_STRINGand container permissions
Performance Issues
Slow cross-mode asset loading: Enable asset prefetching and check network tab for bottlenecks
Memory usage in media library: Implement virtual scrolling for large asset collections
Canvas performance with many assets: Use lazy loading and thumbnail optimization
Migration from Legacy System
All
asset.urlreferences should be changed toasset.azureUrlRemove any IndexedDB or localStorage asset code
Update import paths to use unified system only
�📞 Support
For support, please:
Create an issue in the repository
Check the troubleshooting section above
Review the unified asset system documentation
Check the video editor architecture docs
📚 Further Reading
Built with ❤️ using Next.js, Remotion, Three.js, and modern web technologies.
This enhanced creative platform provides a robust, scalable foundation for professional AI workflows and video editing applications with seamless Remotion integration and efficient worker thread utilization.
Studio WIP Deployment (stripe-integration)
This branch is connected to an Azure Static Web App (studio-wip) created solely for validating the new Stripe billing flows (subscriptions + pay-as-you-go). Every push to stripe-integration triggers the GitHub Action in .github/workflows/azure-static-web-apps-*.yml and automatically deploys the latest build.
NOTE: This environment points to the Stripe sandbox backend and Firebase staging project. Do not use real production keys.
trigger
Last updated