"Just describe what you want. AI does the rest."
PromptFlow AI is a full-stack AI video editor that turns plain English prompts into professional edits. No timelines. No keyframes. Just type what you want.
- Features
- Tech Stack
- Folder Structure
- Prerequisites
- Installation
- Usage
- Common Issues & Fixes
- Contributing
| Feature | Description |
|---|---|
| π¬ AI VFX Mode | Text-to-Video generation via Replicate (Minimax). Generates effects like fire, petals, snow, and overlays them onto your footage. |
| ποΈ General Edits Mode | Trim, cut, speed up/slow down, apply black & white, fade in/out, rotate, add text overlays β all via natural language. |
| π΅ Mood-Based Music | Jamendo API integration auto-selects background music based on the mood of your prompt. |
| π Auto Subtitles | Whisper-powered automatic subtitle generation and burn-in. |
| π Prompt History | Full edit history synced in real time via Supabase. Revert or compare at any time. |
| π Glassmorphic UI | Beautiful React dashboard with Framer Motion animations. |
| Layer | Technology |
|---|---|
| Frontend | React, Vite, Framer Motion, Supabase JS Client |
| Orchestration | n8n (local workflow engine) |
| AI Routing | Gemini 2.5 Flash (prompt classification) |
| AI VFX | Replicate β Minimax Video Model |
| Standard Edits | MoviePy + FFmpeg |
| Auto Subtitles | OpenAI Whisper |
| Music | Jamendo API |
| Database & Storage | Supabase (PostgreSQL + Storage Buckets) |
| Bridge Server | Python Flask (port 5000) |
β οΈ Critical: You must create two separate folders directly in your user home directory (C:\Users\YOURNAME\). Do NOT nest them inside a single parent folder. n8n and Python scripts have hardcoded paths that expect this exact layout.
C:\Users\YOURNAME\
β
βββ VideoEditorProject\ β AI VFX, frontend, Replicate generation
β βββ frontend\ β React + Vite app
β β βββ src\
β β βββ public\
β β βββ .env β API keys (Replicate, Jamendo)
β β βββ package.json
β β βββ vite.config.js
β βββ Prompt\ β Incoming prompt files from n8n
β βββ Final\ β Final merged video outputs
β βββ Output\ β raw.mp4 lives here (your source video)
β βββ Gen\ β Replicate-generated VFX clips
β βββ generate.py β Calls Replicate API
β βββ merge.py β Overlays AI VFX onto original video
β βββ bridge.py β Flask server (receives n8n webhooks)
β βββ .env β Root-level env (if not using frontend/.env)
β
βββ Video\ β Standard edits + subtitle engine
βββ standard_edits.py β Main dispatcher (trim, speed, BW, etc.)
βββ auto_subtitle.py β Whisper subtitle generation + burn-in
βββ basic_editing.py β Trim, cut, rotate helpers
βββ effects.py β Visual effects (fade, BW, etc.)
βββ music_addition.py β Jamendo music fetch + mix
βββ history_maintain.py β Writes edit history to Supabase
βββ input_folder\ β Drop source videos here
βββ temp\ β Intermediate processing files
βββ history\ β Local edit history backups
Install and configure all of the following before proceeding:
- OS: Windows 10 or Windows 11
- Python 3.13 β Download (recommended for most scripts)
- Python 3.10 β Some n8n Code nodes reference this version specifically
- Node.js 20+ β Download
- Git β Download
FFmpeg must be installed and available in your system PATH.
- Download from https://ffmpeg.org/download.html
- Extract to
C:\ffmpeg\ - Add
C:\ffmpeg\binto your system PATH:- Open Start β Search "Environment Variables"
- Under System Variables, select
Pathβ Edit - Click New β paste
C:\ffmpeg\bin - Click OK, restart terminal
Verify: ffmpeg -version
Required for MoviePy's TextClip (text overlays).
- Download from https://imagemagick.org/script/download.php
- During installation, check "Add to system PATH" and "Install legacy utilities (convert)"
- Verify:
magick --version
npm install -g n8nStart with: n8n start
Then open: http://localhost:5678
Install in each folder:
# For VideoEditorProject
cd C:\Users\YOURNAME\VideoEditorProject
pip install -r requirements.txt
# For Video
cd C:\Users\YOURNAME\Video
pip install -r requirements.txtπ‘ If you have multiple Python versions, use
py -3.13 -m pip install -r requirements.txtto target the correct version.
cd C:\Users\YOURNAME\VideoEditorProject\frontend
npm install
npm run devThe app will be available at: http://localhost:5173
Supabase is used for storing projects, edit iterations, and video files.
- Go to https://supabase.com and sign in (or create a free account).
- Click "New Project".
- Fill in:
- Name:
PromptFlowAI(or anything you like) - Database Password: Choose a strong password and save it
- Region: Select the one closest to you
- Name:
- Click "Create new project" and wait ~2 minutes for provisioning.
From your project dashboard, go to Settings β API. You'll need:
| Credential | Where to find it |
|---|---|
| Project URL | https://<your-ref>.supabase.co |
| Anon (public) key | Under "Project API Keys" β anon public |
| Service Role key | Under "Project API Keys" β service_role (keep this secret!) |
Go to SQL Editor in your Supabase dashboard and run the following:
-- Projects table
CREATE TABLE projects (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
name TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Edit iterations / prompt history table
CREATE TABLE iterations (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
project_id UUID REFERENCES projects(id) ON DELETE CASCADE,
prompt TEXT NOT NULL,
status TEXT DEFAULT 'pending',
output_url TEXT,
edit_type TEXT,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Enable Row Level Security (optional but recommended)
ALTER TABLE projects ENABLE ROW LEVEL SECURITY;
ALTER TABLE iterations ENABLE ROW LEVEL SECURITY;
-- Allow all operations (adjust for production)
CREATE POLICY "Allow all" ON projects FOR ALL USING (true);
CREATE POLICY "Allow all" ON iterations FOR ALL USING (true);Go to Storage in your dashboard:
- Click "New bucket"
- Create a bucket named
videosβ set it to Public - Create a bucket named
outputsβ set it to Public
Your project ref is the unique ID in your Supabase URL:
https://xyzxyzxyz.supabase.co β ref is xyzxyzxyz
You'll need to replace the hardcoded refs in the n8n workflow (see Step 4).
n8n is the brain of PromptFlow AI. It receives prompts from the frontend, routes them with Gemini, calls Python scripts, and writes results back to Supabase.
n8n startOpen http://localhost:5678 and create an account if prompted.
- In n8n, click the hamburger menu (β°) β Workflows
- Click "Import from file"
- Select
PromptFlow AI Workflow.jsonfrom your project files - The workflow will open β do not activate it yet
In the workflow, click on nodes that show a credential warning (usually highlighted in orange/red). Set up the following:
Google Gemini (PaLM) API:
- Go to https://aistudio.google.com/app/apikey
- Create an API key
- In n8n, when prompted for a Gemini credential, paste the key
- The workflow uses Gemini 2.5 Flash β ensure the credential is named exactly
Google Gemini (PaLM) Api account 7or8(check the node settings)
Supabase:
- In n8n, go to Settings β Credentials β Add Credential
- Search for "Supabase" and add:
- Host: your Supabase project URL (e.g.,
https://xyzxyzxyz.supabase.co) - Service Role Key: from Step 3b
- Host: your Supabase project URL (e.g.,
The imported workflow contains references to the original developer's Supabase project. You must replace them with your own.
- In n8n, open each HTTP Request node that calls Supabase (look for nodes with URLs containing
.supabase.co) - Search for the old project refs:
ijvvydbswryfjrkivjzsandgiciwxijnptancfehwhb - Replace every occurrence with your project ref (from Step 3e)
You can also do a bulk find using n8n's workflow JSON:
- Go to Workflow β Download to get the JSON
- Open in a text editor
- Find-and-replace the old refs with yours
- Re-import the updated JSON
The workflow runs Python scripts using hardcoded paths. Update any Code node that contains a Python call:
Find references like:
C:\Program Files\Python313\python.exe
Replace with the actual path to your Python 3.13 installation. To find it:
where python
# or
py -3.13 -c "import sys; print(sys.executable)"Once all credentials and paths are updated:
- Click the toggle switch in the top-right of the workflow editor
- Status should change to "Active"
- The webhook endpoint is now live at:
http://localhost:5678/webhook/...(check your Webhook node for the exact path)
Create a .env file at C:\Users\YOURNAME\VideoEditorProject\frontend\.env:
# Replicate β for AI VFX generation (Minimax model)
REPLICATE_API_TOKEN=r8_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# Jamendo β for mood-based background music
JAMENDO_CLIENT_ID=XXXXXXXXXXXXXXXXGetting your Replicate API token:
- Sign up at https://replicate.com
- Go to Account β API Tokens
- Create a new token and paste it above
Getting your Jamendo Client ID:
- Register at https://devportal.jamendo.com
- Create an app to receive a Client ID
Note: Gemini and Supabase keys go into n8n credentials only β not in
.env.
Open three separate terminals and run:
# Terminal 1 β Flask Bridge Server (handles standard edits from n8n)
cd C:\Users\YOURNAME\Video
python bridge.py
# Should print: Running on http://127.0.0.1:5000
# Terminal 2 β n8n (if not already running)
n8n start
# Open http://localhost:5678 and confirm workflow is Active
# Terminal 3 β Frontend
cd C:\Users\YOURNAME\VideoEditorProject\frontend
npm run dev
# Open http://localhost:5173All three must be running simultaneously for the app to work.
- Open http://localhost:5173 in your browser
- Click "New Project" and give it a name
- Drop your source video into
C:\Users\YOURNAME\VideoEditorProject\Output\asraw.mp4 - Type a natural language prompt, for example:
"trim from 2 seconds to 8 seconds and add a fade in""make it black and white and slow it down to 0.5x speed""add fire effect overlay""generate subtitles and add lofi background music"
- Click Generate Edit
- Monitor the real-time status and view the output when complete
- Browse your full Prompt History in the sidebar β click any entry to re-apply or branch from it
| Issue | Cause | Fix |
|---|---|---|
no_audio() got unexpected keyword 'input' |
MoviePy version mismatch | Update the function calls in basic_editing.py and music_addition.py to remove the input argument |
Python not found in n8n |
Incorrect Python path in Code nodes | Update all Code nodes in n8n to use your actual Python path (e.g., C:\Python313\python.exe) |
TextClip fails / OSError: no such file |
ImageMagick not in PATH | Install ImageMagick and ensure convert.exe is on the system PATH |
Video not found error |
Missing raw.mp4 |
Copy your source video to VideoEditorProject\Output\raw.mp4 |
| n8n webhook returns 404 | Flask bridge not running | Start python bridge.py in the Video\ folder |
| Supabase 401 Unauthorized | Wrong or missing API key in n8n | Re-check the Supabase credential in n8n Settings β Credentials |
| Replicate job fails | Invalid or expired API token | Regenerate your token at replicate.com and update .env |
| Frontend shows blank / fails to load | Vite env vars not loaded | Ensure .env is in the frontend\ folder (not root), and restart npm run dev |
| n8n workflow inactive | Workflow not toggled on | Click the Active toggle in the top-right of the workflow editor |
| Whisper takes too long | CPU-only machine | Use the tiny or base Whisper model in auto_subtitle.py for faster processing |
Pull requests are welcome! To contribute:
- Fork the repository
- Create your feature branch:
git checkout -b feature/my-feature - Commit your changes:
git commit -m 'Add my feature' - Push to the branch:
git push origin feature/my-feature - Open a Pull Request
For major changes, please open an issue first to discuss what you'd like to change.
This project is licensed under the MIT License. See LICENSE for details.
Made with β€οΈ for creators who want to edit with prompts, not timelines.