Shorts is an automatic video generator for TikTok/YouTube Shorts/Instagram. It streamlines the process of creating engaging short-form videos by automating content generation, script writing, and video rendering.
- Automated Video Generation: Convert text content into engaging short-form videos
- Multi-Platform Support: Generate videos optimized for TikTok, YouTube Shorts, and Instagram
- AI-Powered Script Generation: Utilizes Google's Gemini API for creative script writing
- High-Quality Text-to-Speech: Microsoft Edge TTS integration for natural-sounding voiceovers
- Microservices Architecture: Scalable and maintainable system design
- Message Queue System: Efficient task processing with RabbitMQ
- Modern UI: Responsive and intuitive interface built with React and shadcn/ui
Currently, the app supports two types of video generation:
-
Crackbot Reaction (
CRACKBOT_REACTION
)- Creates reaction-style videos with AI commentary
- Features background video with synchronized subtitles
- Supports custom voice selection
- Automatically generates engaging reactions
-
Crackbot Story (
CRACKBOT_STORY
)- Generates storytelling-format videos
- AI-powered narrative generation
- Custom voice narration
- Synchronized visual elements
The project follows a microservices architecture with the following components:
- Frontend Web (
/apps/frontend-web
): React-based user interface - Gateway (
/apps/gateway
): API gateway service handling client requests - Renderer (
/apps/renderer
): Video rendering service using Remotion - Script Generator (
/apps/script-gen
): AI-powered content generation service
Frontend:
- React with TypeScript
- shadcn/ui for UI components
- Modern development tools (ESLint, Prettier)
Backend:
- Bun runtime for high performance
- Hono as the web framework
- SQLite for data persistence
- RabbitMQ for message queuing
- Docker for containerization
- Gemini API for AI content generation
- Microsoft Edge TTS for voice synthesis
- Docker and Docker Compose
- Bun runtime (latest version)
- Node.js 18+ (for development)
- Google Cloud API key (for Gemini API)
-
Clone the repository:
git clone https://github.com/yourusername/shorts.git cd shorts
-
Copy the example environment file and configure your settings:
cp .env.example .env
-
Configure the following environment variables in
.env
:GOOGLE_API_KEY
: Your Google Cloud API key- Other necessary environment variables (refer to
.env.example
)
-
Install dependencies:
bun install
Start the development server:
bun run dev
This will start all services in development mode with hot reloading.
-
Build the Docker containers:
docker-compose build
-
Start the services:
docker-compose up -d
shorts/
├── apps/
│ ├── frontend-web/ # React frontend application
│ ├── gateway/ # API Gateway service
│ ├── renderer/ # Video rendering service
│ └── script-gen/ # Script generation service
├── packages/ # Shared packages and utilities
├── compose.yaml # Docker Compose configuration
└── package.json # Project configuration and scripts
bun run dev
: Start development serverbun run format
: Format code with Prettierbun run lint
: Run ESLintbun run test
: Run all testsbun run test:apps
: Run tests for appsbun run test:packages
: Run tests for shared packages
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Schema synchronization between Frontend and Backend
- Additional video template types
- Framework upgrades (NestJS, Remix)
- Enhanced AI capabilities
- Performance optimizations
RabbitMQ handles asynchronous communication between services:
- Video rendering requests
- Script generation tasks
- Status updates
SQLite database stores:
- User data
- Video metadata
- Generation history
- System configurations
The gateway service:
- Routes client requests
- Handles authentication
- Manages service discovery
- Implements rate limiting
Remotion handles:
- Frame-by-frame rendering
- Audio synchronization
- Video composition
- Export in multiple formats
-
Docker Containers Not Starting
- Check Docker logs:
docker-compose logs
- Verify environment variables
- Ensure ports are not in use
- Check Docker logs:
-
Video Generation Failures
- Check RabbitMQ queue status
- Verify Remotion configuration
- Check system resources
-
API Key Issues
- Verify Google Cloud API key is valid
- Check API quota limits
- Ensure proper environment variable setup
This project is licensed under the Mozilla Public License Version 2.0 - see the LICENSE file for details.