Public
Like
veo-feed
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v166View latest version
A web application that converts URLs into TikTok-style videos using AI-generated summaries and screenshots.
- Convert any URL into a video using Veo AI
- Fetch markdown content and screenshots from URLs
- Generate AI summaries using Gemini API
- TikTok-style scrolling feed with scroll-snap
- Customizable video generation prompts
βββ backend/
β βββ index.ts # Main Hono server
β βββ routes/
β β βββ videos.ts # Video generation endpoints
β β βββ static.ts # Static file serving
β βββ database/
β βββ migrations.ts # SQLite schema
β βββ queries.ts # Database operations
βββ frontend/
β βββ index.html # Main HTML template
β βββ index.tsx # React app entry point
β βββ components/
β β βββ App.tsx # Main app component
β β βββ VideoFeed.tsx # TikTok-style feed
β β βββ VideoCard.tsx # Individual video component
β β βββ URLInput.tsx # URL input form
β βββ style.css # Custom styles
βββ shared/
βββ types.ts # Shared TypeScript types
βββ utils.ts # Shared utility functions
POST /api/videos/generate- Generate video from URLGET /api/videos- Get all generated videosGET /api/videos/:id- Get specific videoDELETE /api/videos/:id- Delete video
GEMINI_API_KEY- Google Gemini API key for summaries (required)VEO_API_KEY- Veo API key for video generation (required for production)
The application includes a comprehensive polling system to check the status of video generation:
- Automatically polls processing videos every 5 seconds
- Starts polling when videos are in "processing" state
- Stops polling when no videos are processing
- Updates video status in real-time
- Stores VEO operation IDs for tracking video generation
GET /api/videos/:id- Automatically checks VEO status for processing videosPOST /api/videos/poll- Bulk status check for all processing videos- Updates database when videos complete or fail
Currently uses placeholder implementation. To integrate with real VEO API:
- Replace the
generateVideoWithVeofunction with actual VEO API calls - Replace the
checkVeoOperationStatusfunction with real VEO operation status checks - Use the pattern from your example:
// Poll the operation status until the video is ready.
while (!operation.done) {
console.log("Waiting for video generation to complete...")
await new Promise((resolve) => setTimeout(resolve, 10000));
operation = await ai.operations.getVideosOperation({
operation: operation,
});
}
- Enter URLs in the input form
- Videos are generated automatically using:
- Markdown content from the URL
- Screenshot of the page
- AI-generated summary
- Custom video generation prompt
- Scroll through the TikTok-style feed
- Customize video prompts in the settings