Align preview typography with FFmpeg output, add video/song title split, and ship OSS updates.

Separate YouTube video titles from on-video song/artist fields with Pro gating, serve curated fonts and watermark assets for 1:1 preview parity, and include billing/API/docs/deploy stack for self-hosted release.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Atakan Doğan Özban
2026-07-27 16:26:19 +02:00
co-authored by Cursor
parent 682020ff5a
commit c8015937f9
206 changed files with 37078 additions and 638 deletions
+76 -20
View File
@@ -1,4 +1,4 @@
# s2yt
# Songs2VID
Create YouTube videos from an image and audio files.
@@ -7,11 +7,38 @@ Create YouTube videos from an image and audio files.
- Next.js 15 (App Router, TypeScript, Tailwind)
- PostgreSQL + Prisma
- Redis + BullMQ
- NextAuth (Google OAuth with YouTube scopes)
- NextAuth (Google OAuth 2.0 with YouTube scopes)
- FFmpeg for video encoding
- YouTube Data API v3
## Setup
## Editions
| Edition | How | Limits |
|---------|-----|--------|
| **Hosted** (default) | Leave `S2VID_EDITION` unset | Free / Pro quotas and API gates |
| **Self-hosted / OSS** | `S2VID_EDITION=selfhosted` | No video quota, no API rate caps; playlists + API unlocked |
Docker Compose sets `S2VID_EDITION=selfhosted` automatically.
## Quick start (Docker)
1. Copy env and set Google OAuth + secrets:
```bash
cp .env.example .env
```
2. Build and run the full stack (web, worker, Postgres, Redis):
```bash
docker compose up -d --build
```
Open [http://localhost:3000](http://localhost:3000).
Add Google OAuth redirect URI: `http://localhost:3000/api/auth/callback/google` (or your public URL).
## Local development
1. Copy environment variables:
@@ -19,13 +46,13 @@ Create YouTube videos from an image and audio files.
cp .env.example .env
```
2. Start PostgreSQL and Redis:
2. Start Postgres and Redis only:
```bash
docker compose up -d
docker compose -f docker-compose.dev.yml up -d
```
3. Install dependencies and run migrations:
3. Install dependencies and push the schema:
```bash
npm install
@@ -38,26 +65,55 @@ npm run db:push
- Add redirect URI: `http://localhost:3000/api/auth/callback/google`
- Set `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET` in `.env`
5. Install FFmpeg on your system (required for the worker).
5. Optional for unlimited local use: `S2VID_EDITION=selfhosted` in `.env`
6. Start the web app and worker in separate terminals:
6. Start the app, worker, and docs:
```bash
npm run dev
npm run worker
npm run dev:all
```
## Free Plan
- App: http://localhost:3000
- Docs: http://localhost:3001
- 14 videos/month (each audio = 1 video)
- Max 720p resolution
- 30 MB max per file
- Watermark required
- Per-video metadata (title auto-filled from audio filename)
Or run them separately with `npm run dev`, `npm run worker`, and `npm run docs:dev`.
## Authentication
Users sign in with Google via OAuth 2.0. The app handles YouTube channel connection automatically end users never enter API keys for YouTube.
## Self-hosted edition
Set `S2VID_EDITION=selfhosted` (Docker Compose does this by default):
- Unlimited video allowance
- API access and playlists
- Art-track layouts with blur backgrounds and fine-tuning (padding, gaps, text offsets)
- Custom watermarks (text/logo), curated or uploaded fonts
Composition details: see `website/docs/video-editing.md` (or open Video editing in the docs site after `npm run docs:dev`).
## Scripts
- `npm run dev` Next.js dev server
- `npm run worker` Background job processor
- `npm run db:push` — Push Prisma schema to database
- `npm run build` — Production build
- `npm run dev` - Next.js dev server
- `npm run worker` - Background job processor
- `npm run dev:all` - App (3000) + worker + docs (3001) together
- `npm run db:push` - Push Prisma schema to database
- `npm run build` - Production build
- `npm run docs:dev` - Documentation site only (Docusaurus on port 3001)
## Documentation
Docs live in `website/` (Docusaurus). API reference:
```bash
npm run docs:dev
```
Open [http://localhost:3001/docs/api/overview](http://localhost:3001/docs/api/overview).
The app “Full API docs” link and `/dashboard/api-docs` redirect use local docs when `NEXTAUTH_URL` is localhost (or set `NEXT_PUBLIC_DOCS_URL`).
## Source
- Gitea: https://git.atakanozban.com/Songs2VID
- Docker Hub: https://hub.docker.com/r/atakanozban/songs2vid