How to add video to an app you built with Cursor A tutorial published by VideoDB instructs developers to keep video files out of app repositories and host them on VideoDB's service instead, uploading via the videodb npm package and embedding the resulting HLS stream or iframe. The guide cites GitHub's 100 MiB file limit and Vercel's conformance rule against self-hosted Next.js videos as reasons to move video to a dedicated CDN, and notes new VideoDB accounts start with $20 in free credits and no credit card. The walkthrough targets apps built with Cursor's agent, which writes and runs the upload script, with an optional VideoDB MCP server for managing videos by prompt. How to add video to an app you built with Cursor Keep video files out of your repo. Host them with VideoDB from Cursor or Claude Code, then paste in an iframe or a small HLS player. The setup, the upload script and the React code are all here. - Keep video out of the repo. GitHub blocks files over 100 MiB, and Vercel’s docs say video belongs on a video CDN. - Step 1: get a VideoDB API key and run npm install videodb . - Step 2: ask Cursor to write and run a short script. It uploads the file and prints the links. - Step 3: paste the iframe embed, or add the React player that plays the HLS stream. - Optional: add the VideoDB MCP server to Cursor and manage your videos by asking. When Andrej Karpathy named “vibe coding” in a post on X https://x.com/karpathy/status/1886192184808149383 in February 2025, the tool he mentioned was Cursor’s Composer. You describe the app, the agent writes it, and you can “forget that the code even exists.” Collins Dictionary later made it the word of the year for 2025. Video is a different kind of asset. The agent can write your landing page in a minute, and the demo video still needs a place to live. This guide gives it one. Why should video stay out of your repo? The quick route is to drop demo.mp4 into /public . It works on your laptop and causes trouble later. - Git. GitHub blocks files larger than 100 MiB https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-large-files-on-github and warns from 50 MiB. Every version of a video you commit stays in the history. - Bandwidth. Vercel ships a conformance rule https://vercel.com/docs/conformance/rules/NEXTJS NO SELF HOSTED VIDEOS that flags video files inside a Next.js app, because serving them from the app eats its bandwidth. The rule points to a dedicated video CDN. - Player code. A video host gives you a stream, a player page, an embed and a thumbnail. You write less code around the file. Step 1. Get a key and install the SDK 1. Create an account at console.videodb.io https://console.videodb.io and copy your API key. New accounts start with $20 of free credits, and no credit card is needed. 2. Put the key in .env.local at the root of your project. Keep that file out of Git. VIDEO DB API KEY=your-key 1. Install the SDK. npm install videodb The key belongs on your machine or your server. Keep it out of browser code. In Next.js, that means no NEXT PUBLIC prefix. Step 2. Ask Cursor to host the video Put your video in a folder such as media/ , then give Cursor’s agent this prompt. Create scripts/host-video.mjs. It should upload ./media/demo.mp4 to VideoDB with the videodb package, using VIDEO DB API KEY, and print the player URL, the HLS stream URL and the embed code. Add media/ to .gitignore, then run the script with Node, loading .env.local through --env-file. This is the script it should end up with. You can also paste it in yourself. js import { connect } from 'videodb'; // reads VIDEO DB API KEY from your environment const conn = connect ; const coll = await conn.getCollection ; // a file in your project, or coll.uploadURL { url: 'https://...' } const video = await coll.uploadFile { filePath: './media/demo.mp4' } ; const stream = await video.generateStream ; // HLS, ends in .m3u8 const embed = await video.getEmbedCode ; // an iframe console.log 'Player page:', video.playerUrl ; console.log 'HLS stream:', stream ; console.log 'Embed code:', embed ; What you get: three lines in the terminal. The player page is a link you can open and share. The stream and the embed go into your app in the next step. Working in Python? The same upload is on the video hosting page https://videodb.io/video-hosting code . Step 3. Put the video on the page You have two options. Start with the iframe, and move to your own player when you want control over the look. Option A: the iframe embed The embed code from the script is an iframe. In a React or Next.js component it looks like this. export function DemoVideo { return