$ show CszYihen/Yihen-Drama
This repository contains a full-stack application for AI-powered short drama generation. The system enables users to create drama projects, extract characters and scenes from text using AI models, generate consistent character and scene images, create storyboards, and produce final videos. It manages the entire lifecycle from text input to multimedia output, with real-time task tracking and asset management. The backend is built with Spring Boot (Java 17) and follows a layered architecture with controllers, services, decorators (for Redis caching), facades (for asynchronous persistence), and mappers (using MyBatis-Plus). The frontend is a Vue 3 + Vite application using the Composition API for state management and communicating with the backend via REST APIs and WebSocket for real-time updates. The system integrates multiple technologies: MySQL for primary data storage, Redis for caching, RabbitMQ for asynchronous task processing, MinIO for object storage, Elasticsearch for full-text search, and Qdrant for vector-based context retrieval in storyboard generation. Key architectural patterns include the Strategy pattern for swapping AI model providers, the Decorator pattern for adding cross-cutting concerns like caching, and the Facade pattern for decoupling asynchronous operations. Reusable components include utility classes for Redis, MinIO, and Qdrant operations, as well as Vue 3 composables for global loading state and model configuration. The application demonstrates strong engineering practices in handling complex AI workflows while maintaining modularity and extensibility.
The LLM identified 3 files worth highlighting for reuse:
Encapsulates Redis operations (strings, hashes, lists, sets) into a reusable utility, reducing boilerplate and providing a consistent API for caching in Spring applications. Isolates Redis template usage and handles serialization/deserialization transparently.
Wraps the MinIO client to provide simple methods for uploading, downloading, and deleting objects, making it easy to integrate object storage into any Java project. Handles bucket creation, error handling, and URL generation for accessed objects.
Implements the factory pattern to create AI model strategies (e.g., for image generation) based on configuration, enabling runtime switching between different AI providers (like Volcano Engine) without modifying client code. Decouples strategy selection from usage and supports extensible provider integration.