Strip Songs2VID to a payment-free self-hosted OSS core.

Remove Stripe/billing/pricing/marketing, simplify schema and entitlements for unlimited self-host use, and keep auth, encode, and YouTube upload.
This commit is contained in:
Atakan Doğan Özban
2026-08-03 06:52:00 +02:00
parent 7d7043b150
commit d9cdaff521
108 changed files with 397 additions and 8061 deletions
+9 -41
View File
@@ -1,51 +1,19 @@
DATABASE_URL="postgresql://s2yt:s2yt@localhost:5433/s2yt"
# Songs2VID OSS is always self-hosted and has no billing configuration.
DATABASE_URL="postgresql://songs2vid:songs2vid@localhost:5433/songs2vid"
REDIS_URL="redis://localhost:6380"
NEXTAUTH_URL="http://localhost:3000"
# Generate with: openssl rand -base64 32
NEXTAUTH_SECRET="replace-with-a-long-random-secret"
# Used to encrypt YouTube OAuth tokens at rest (falls back to NEXTAUTH_SECRET if unset)
# Optional; falls back to NEXTAUTH_SECRET.
# TOKEN_ENCRYPTION_KEY="replace-with-another-long-random-secret"
# Server-side Google OAuth 2.0 credentials from Google Cloud Console
GOOGLE_CLIENT_ID="your-google-client-id.apps.googleusercontent.com"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
UPLOAD_DIR="./uploads"
# Open-source / self-hosted: unlimited video quota, API, and Pro features
# S2VID_EDITION="selfhosted"
# Admin API key for approving/rejecting quota extension requests (Bearer token)
# ADMIN_API_KEY="your-secret-admin-key"
# Admin UI: /admin (footer badges) — unlock with the same Bearer key
# Admin reset: POST /api/admin/reset-credits Authorization: Bearer $ADMIN_API_KEY
# Admin badges: GET/POST /api/admin/badges, PATCH/DELETE /api/admin/badges/:id
# Public badges: GET /api/badges
# Pro users generate API keys in Dashboard → Settings (stored hashed; shown once)
# Optional: override bundled ffmpeg-static binary (leave unset to use npm package)
# FFMPEG_PATH="C:/path/to/ffmpeg.exe"
# Public Gitea issues URL for community support links
NEXT_PUBLIC_DOCS_URL="https://docs.songs2vid.com"
NEXT_PUBLIC_GITEA_ISSUES_URL="https://git.atakanozban.com/Songs2VID/songs2vid/issues"
NEXT_PUBLIC_GITEA_URL="https://git.atakanozban.com/Songs2VID"
NEXT_PUBLIC_DOCKER_HUB_URL="https://hub.docker.com/r/atakanozban/songs2vid"
# Docusaurus docs — local: npm run docs:dev → http://localhost:3001
# NEXT_PUBLIC_DOCS_URL="http://localhost:3001"
# Production: NEXT_PUBLIC_DOCS_URL="https://docs.songs2vid.com"
# Stripe billing (Pro €5/mo + Free 115 credit top-ups @ €0.25)
# STRIPE_SECRET_KEY="sk_test_..."
# Prefer a restricted key (rk_...) with Checkout + Customers + Billing Portal + Webhooks only
# STRIPE_WEBHOOK_SECRET="whsec_..."
# Optional Dashboard Price ID for Pro (otherwise inline price_data €5/mo is used)
# STRIPE_PRO_PRICE_ID="price_..."
# Collect VAT/GST via Stripe Tax AFTER adding Tax registrations in Dashboard:
# STRIPE_AUTOMATIC_TAX="true"
# Force local mock upgrades/grants without Stripe: BILLING_DEV_MOCK=true
# Disable auto-mock when Stripe key missing: BILLING_DEV_MOCK=false
# Point Stripe webhook to: POST /api/stripe/webhook
# Events (required):
# checkout.session.completed
# invoice.payment_succeeded
# invoice.payment_failed
# customer.subscription.updated
# customer.subscription.deleted
# Dashboard: enable Customer portal (Settings → Billing → Customer portal)
# Optional: Managed Payments (MoR) enable in Dashboard + set managed_payments on Checkout if you use it
# Dev helpers: POST /api/dev/grant-credits { "action": "set-pro" | "free-top-up" | "grant-credits" }
# Admin reset: POST /api/admin/reset-credits Authorization: Bearer $ADMIN_API_KEY
# See also /admin for footer badge management
# Optional: override the bundled ffmpeg-static binary.
# FFMPEG_PATH="C:/path/to/ffmpeg.exe"