Free tools (no login), linked from nav and footer via /tools: - /youtube-transcript-generator: reads the captions a video already has on YouTube (free_tools.py, yt-dlp over the flat-rate static proxies only, never the per-GB proxy, never the GPU). Per-IP limits, global daily cap, 24 h cache, honest "no captions" answer with a CTA to the clip generator. Copy / TXT / SRT export in the browser. - /youtube-tag-generator: tags, 10 titles or a description from a brief, one Gemini text call, rules taken from YouTube's own docs (sourced on the page). - /video-aspect-ratio-converter: 16:9 to 9:16 in the browser with mediabunny and WebCodecs (blur / crop / bars), nothing uploaded. Tool pages keep the form in the static HTML; the behaviour is a Vite entry (dashboard/tools) that vite-plugin-seo resolves by name. New pages /auto-clip and /youtube-automation with real, blurred screenshots of the Autopilot tab and the connect-an-agent card, Autopilot rules from cloud/autopilot.py, plan prices from the billing API and aggregate usage from the ledger (dated). SEO fixes: titles/metas for /how-openshorts-works, /podcast-to-shorts, /mcp and /free-ai-clip-generator (brand queries at pos 1-2 with <1% CTR); a free AI clipper / free clipping website section and FAQ, and contextual "free AI clip generator" anchors from sibling pages and the homepage. Attribution: static pages now write the same first-touch os_attrib key the app writes, so the signup is credited to the page the visit started on (7,481 of 7,481 signups in 30 days said "/"). Signup, CheckoutStarted and Subscribed carry landing_path / referrer_host / utm props in OpenPanel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
45 lines
1.7 KiB
JavaScript
45 lines
1.7 KiB
JavaScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import seo from './vite-plugin-seo'
|
|
|
|
// Backend target for the dev proxy. Defaults to the docker-compose service
|
|
// name; set VITE_PROXY_TARGET=http://localhost:8000 to run the dev server on
|
|
// the host against a backend reachable at localhost (no CORS, same-origin).
|
|
const backend = process.env.VITE_PROXY_TARGET || 'http://backend:8000'
|
|
const renderer = process.env.VITE_RENDER_TARGET || 'http://renderer:3100'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
// seo() runs on build only. It injects the crawler-visible homepage content
|
|
// into #root and emits the static /alternatives pages, sitemap.xml and
|
|
// llms.txt. See vite-plugin-seo.js.
|
|
plugins: [react(), seo()],
|
|
// The free tools (/youtube-transcript-generator and friends) are static
|
|
// pages emitted by seo(); their behaviour ships as small standalone entries
|
|
// with no React in them. vite-plugin-seo.js finds each entry's hashed file
|
|
// name in the bundle and adds the <script> to its page.
|
|
build: {
|
|
rollupOptions: {
|
|
input: {
|
|
main: 'index.html',
|
|
'tool-transcript': 'tools/transcript.js',
|
|
'tool-metadata': 'tools/metadata.js',
|
|
'tool-vertical': 'tools/vertical.js',
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
allowedHosts: [
|
|
'openshorts.app',
|
|
'www.openshorts.app'
|
|
],
|
|
proxy: {
|
|
'/api': { target: backend, changeOrigin: true },
|
|
'/videos': { target: backend, changeOrigin: true },
|
|
'/thumbnails': { target: backend, changeOrigin: true },
|
|
'/gallery': { target: backend, changeOrigin: true },
|
|
'/video': { target: backend, changeOrigin: true },
|
|
'/render': { target: renderer, changeOrigin: true },
|
|
}
|
|
}
|
|
})
|