Thanks to visit codestin.com
Credit goes to github.com

Skip to content

r-hisamoto/DirectorX

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DirectorX v1.0 🎬

Self-Contained Video Production OS

GitHub TypeScript React Node.js

Status: βœ… Successfully deployed to GitHub - Ready for production use

Repository: https://github.com/r-hisamoto/DirectorX.git

🌟 Overview

DirectorX v1.0 is a comprehensive video production operating system that handles the complete workflow from assets to final video distribution within a single application. Built with Japanese language support and advanced video processing capabilities.

🎯 Core Workflow

Assets β†’ Scripts β†’ SRT β†’ TTS β†’ Video β†’ Thumbnails β†’ Distribution Checks

⚑️ Key Features

🎬 Complete Video Production Pipeline

  • 8-Step Recipe Engine: Dependency-managed production workflow
  • Asset Ingestion: Multi-source import (URL, files, X/Twitter, 5ch, YouTube)
  • Script Generation: AI-assisted scriptwriting with templates
  • SRT Processing: Japanese formatting with kinsoku rules (禁則処理)
  • TTS Integration: Web Speech API with Japanese voice support
  • Video Rendering: Canvas API + MediaRecorder browser-native generation
  • Thumbnail Creation: Automated thumbnail generation
  • Distribution: Multi-platform export preparation

🌏 Japanese Language Excellence

  • Kinsoku Rules (禁則処理): Proper Japanese text line breaking
  • SRT Formatting: 20-character full-width text wrapping
  • Native TTS: Japanese speech synthesis integration
  • UI Localization: Complete Japanese interface support

🎨 Modern Architecture

  • Frontend: React 18 + TypeScript + Vite + Zustand
  • Backend: Node.js + Express + TypeScript
  • Monorepo: pnpm workspaces for organized development
  • State Management: Zustand with TypeScript integration
  • Command Palette: Quick access to all functions
  • Three-Column Layout: Optimized workflow interface

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm
  • Modern browser with Canvas and MediaRecorder support

Installation

# Clone the repository
git clone https://github.com/r-hisamoto/DirectorX.git
cd DirectorX

# Install dependencies
pnpm install

# Start development servers
pnpm dev        # Both frontend and backend
pnpm dev:web    # Frontend only (port 5173)
pnpm dev:api    # Backend only (port 3001)

Access the Application

πŸ—οΈ Architecture

Project Structure

DirectorX/
β”œβ”€β”€ web/                    # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # React components
β”‚   β”‚   β”œβ”€β”€ lib/           # Core services
β”‚   β”‚   β”‚   β”œβ”€β”€ recipeEngine.ts    # 8-step pipeline
β”‚   β”‚   β”‚   β”œβ”€β”€ renderService.ts   # Video rendering
β”‚   β”‚   β”‚   β”œβ”€β”€ ttsService.ts      # TTS integration
β”‚   β”‚   β”‚   └── srtProcessor.ts    # Japanese SRT handling
β”‚   β”‚   └── store/         # Zustand state management
β”œβ”€β”€ api/                   # Node.js backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controllers/   # API endpoints
β”‚   β”‚   β”œβ”€β”€ services/      # Business logic
β”‚   β”‚   └── models/        # Data models
β”œβ”€β”€ shared/                # Common TypeScript types
└── docs/                  # Documentation

Core Services

Recipe Engine

export class RecipeEngine {
  async executeRecipe(recipe: VideoRecipe, options: RenderOptions): Promise<void>
  private sortStepsByDependencies(steps: RecipeStep[]): RecipeStep[]
}

TTS Service

export class TTSService {
  async generateFromScript(scriptContent: string, options: TTSOptions = {}): Promise<TTSResult>
  async generateFromSRT(srtContent: string, options: TTSOptions = {}): Promise<TTSResult>
}

Render Service

export class RenderService {
  async renderJob(jobId: string): Promise<void>
  private async generateFrame(job: RenderJob, timestamp: number): Promise<VideoFrame>
}

πŸ§ͺ Testing

Run Tests

pnpm test              # All tests
pnpm test:web         # Frontend tests
pnpm test:api         # Backend tests
pnpm test:e2e         # End-to-end tests

Coverage

pnpm test:coverage    # Generate coverage report

🌐 Production Deployment

Build for Production

pnpm build            # Build all packages
pnpm build:web        # Build frontend
pnpm build:api        # Build backend

GCP Deployment

DirectorX v1.0 includes complete Google Cloud Platform deployment configuration:

# Deploy to Firebase Hosting + Cloud Run
pnpm deploy

# Individual deployments
pnpm deploy:web       # Frontend to Firebase Hosting
pnpm deploy:api       # Backend to Cloud Run

Infrastructure Components:

  • Frontend: Firebase Hosting with global CDN
  • API: Cloud Run with auto-scaling
  • Database: Firestore with security rules
  • Storage: Cloud Storage with IAM policies
  • Monitoring: Cloud Logging and Error Reporting

See DEPLOYMENT.md for complete deployment instructions.

πŸ“‹ Available Scripts

Development

pnpm dev              # Start both servers in development mode
pnpm dev:web          # Start frontend development server
pnpm dev:api          # Start backend development server

Building

pnpm build            # Build all packages for production
pnpm build:web        # Build frontend bundle
pnpm build:api        # Build backend for deployment

Testing

pnpm test             # Run all tests
pnpm test:watch       # Run tests in watch mode
pnpm lint             # Run ESLint on all packages
pnpm type-check       # Run TypeScript type checking

Deployment

pnpm deploy           # Deploy to production (GCP)
pnpm deploy:web       # Deploy frontend to Firebase Hosting
pnpm deploy:api       # Deploy backend to Cloud Run

πŸŽ›οΈ Configuration

Environment Variables

Frontend (.env.local)

VITE_API_URL=http://localhost:3001
VITE_APP_NAME=DirectorX
VITE_ENABLE_DEBUG=true

Backend (.env)

PORT=3001
NODE_ENV=development
CORS_ORIGIN=http://localhost:5173

Production Configuration

Production environment variables are managed through:

  • Firebase configuration for hosting
  • Cloud Run environment variables for the API
  • Firestore security rules for database access
  • Cloud Storage IAM policies for file storage

πŸ”§ Advanced Features

Japanese Text Processing

  • Kinsoku Rules: Automatic line breaking for proper Japanese typography
  • Character Width: Full-width character support for SRT formatting
  • Voice Selection: Native Japanese TTS voice detection and selection

Video Processing

  • Canvas Rendering: High-performance browser-based video generation
  • MediaRecorder: Efficient video encoding and export
  • Frame Composition: Layer-based video composition system

Command Palette

  • Quick access to all application functions
  • Keyboard shortcuts for power users
  • Context-aware command suggestions

πŸ“š Documentation

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a pull request

Development Guidelines

  • Follow TypeScript best practices
  • Write tests for new features
  • Use conventional commit messages
  • Ensure Japanese language support for new features

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Built with modern web technologies and best practices
  • Japanese language processing with kinsoku rule implementation
  • Browser-native video processing for maximum compatibility
  • Production-ready GCP deployment configuration

DirectorX v1.0 - Complete video production OS ready for production use.

Repository: https://github.com/r-hisamoto/DirectorX.git

About

AI video agents framework for next-gen video interactions and workflows.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 55.1%
  • Python 31.6%
  • JavaScript 10.8%
  • Shell 1.5%
  • Makefile 0.4%
  • Vue 0.2%
  • Other 0.4%