Skip to content

axewater/makevidz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MakeVidz - AI Video Generator

A Flask web application that generates AI videos using Google's Generative AI and image-to-video capabilities. Features user authentication, admin panel, and comprehensive video management.

Features

  • AI Video Generation: Create videos from text prompts using Google's Generative AI
  • Image-to-Video: Convert images to videos with AI enhancement
  • User Authentication: Secure login system with Flask-Login
  • Admin Panel: User management and administrative controls
  • Video Library: Browse, search, and manage generated videos
  • Real-time Progress: Live status updates during video generation
  • Docker Support: Containerized deployment ready

Tech Stack

  • Backend: Flask, SQLAlchemy, Flask-Migrate
  • AI/ML: Google Generative AI, Google AI Studio API
  • Frontend: Bootstrap, Jinja2 templates
  • Database: SQLite (configurable to PostgreSQL)
  • Authentication: Flask-Login
  • Deployment: Docker, Docker Compose

Quick Start

Prerequisites

  • Python 3.11+
  • Docker (optional)
  • Google AI Studio API key

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd makevidz
  2. Set up virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Configure environment:

    cp .env.example .env

    Edit .env with your configuration:

    SECRET_KEY=your-secret-key-here
    ADMIN_EMAIL=admin@example.com
    ADMIN_PASSWORD=admin123
    GOOGLE_API_KEY=your-google-api-key
    DATABASE_URL=sqlite:///app.db
  5. Initialize database:

    flask db upgrade
  6. Run the application:

    python src/main.py

Visit http://localhost:5000 to access the application.

Docker Deployment

docker-compose up -d

Configuration

Environment Variables

Variable Description Required
SECRET_KEY Flask secret key for sessions Yes
ADMIN_EMAIL Default admin email Yes
ADMIN_PASSWORD Default admin password Yes
GOOGLE_API_KEY Google AI Studio API key Yes
DATABASE_URL Database connection string No

Google AI Setup

  1. Get your API key from Google AI Studio
  2. Add it to your .env file as GOOGLE_API_KEY
  3. Restart the application

Usage

  1. Login with admin credentials from .env
  2. Generate Videos from text prompts or images
  3. Monitor Progress in real-time
  4. Browse Library to view and manage videos
  5. Admin Panel for user management (admin only)

Project Structure

makevidz/
├── src/
│   ├── models/           # Database models (User, Video)
│   ├── routes/           # Flask routes
│   ├── services/         # AI provider services
│   ├── templates/        # Jinja2 templates
│   ├── static/           # Static assets
│   ├── utils/            # Utility functions
│   ├── config.py         # App configuration
│   └── main.py           # Application entry point
├── migrations/           # Database migrations
├── uploads/              # Generated video storage
├── docker-compose.yml    # Docker configuration
├── Dockerfile           # Docker image
├── requirements.txt     # Python dependencies
└── .env.example         # Environment template

API Endpoints

Authentication

  • POST /auth/login - User login
  • POST /auth/logout - User logout

Video Generation

  • POST /video/api/generate - Generate new video
  • GET /video/api/status/{id} - Check generation status
  • GET /video/api/videos - List user videos
  • DELETE /video/api/videos/{id} - Delete video

Admin

  • GET /api/admin/users - List all users
  • POST /api/admin/users - Create user
  • PUT /api/admin/users/{id} - Update user
  • DELETE /api/admin/users/{id} - Delete user

Development

Database Migrations

flask db migrate -m "Description"
flask db upgrade

Adding AI Providers

  1. Create provider class in src/services/ai_providers.py
  2. Inherit from AIProviderBase
  3. Implement required methods
  4. Register in AIProviderManager

Security

  • API keys stored in environment variables
  • Session-based authentication
  • CORS protection enabled
  • Input validation and sanitization
  • Admin role-based access control

Contributing

  1. Fork the repository
  2. Create feature branch
  3. Make changes
  4. Add tests if applicable
  5. Submit pull request

License

This project is provided as-is for educational and development purposes.

Support

For issues and questions:

  1. Check existing issues in the repository
  2. Create a new issue with detailed description
  3. Include logs and error messages
  4. Verify API keys and configuration

About

AI video generator web app — Flask + Google Generative AI, text-to-video and image-to-video with user auth and admin panel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors