mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-11 09:36:08 +00:00
- Added billing-related fields to the User model in the database. - Implemented functions for managing billing access, including trial periods and subscription statuses. - Created new billing utility functions for Stripe integration. - Updated onboarding page to include billing overview and workspace creation eligibility. - Enhanced route access checks to require billing access for certain actions. - Implemented cleanup scripts for expired billing workspaces and associated media. - Updated header component to conditionally show app navigation based on billing access. - Added new migrations for billing-related database changes.
98 lines
4.2 KiB
Bash
98 lines
4.2 KiB
Bash
# Copy this file to .env and fill in your values
|
|
|
|
# ============================================================================
|
|
# DATABASE
|
|
# ============================================================================
|
|
# PostgreSQL connection string
|
|
DATABASE_URL="postgresql://user:password@localhost:5432/openframe?schema=public"
|
|
# Enable PostgreSQL pool connect/acquire debug logs (set to "true" only when debugging)
|
|
DB_POOL_DEBUG="false"
|
|
|
|
# ============================================================================
|
|
# AUTHENTICATION - NextAuth.js
|
|
# ============================================================================
|
|
NEXTAUTH_URL="http://localhost:3000"
|
|
NEXTAUTH_SECRET="your-secret-key-here-generate-with-openssl-rand-base64-32"
|
|
|
|
# ============================================================================
|
|
# OAUTH PROVIDERS
|
|
# ============================================================================
|
|
# Google OAuth
|
|
# Create credentials at: https://console.cloud.google.com/apis/credentials
|
|
GOOGLE_CLIENT_ID="your-google-client-id.apps.googleusercontent.com"
|
|
GOOGLE_CLIENT_SECRET="your-google-client-secret"
|
|
|
|
# GitHub OAuth
|
|
# Create credentials at: https://github.com/settings/developers
|
|
GITHUB_CLIENT_ID="your-github-client-id"
|
|
GITHUB_CLIENT_SECRET="your-github-client-secret"
|
|
|
|
# ============================================================================
|
|
# FILE STORAGE
|
|
# ============================================================================
|
|
# Cloudflare R2 (S3-compatible)
|
|
R2_ACCOUNT_ID="your-account-id"
|
|
R2_ACCESS_KEY_ID="your-access-key"
|
|
R2_SECRET_ACCESS_KEY="your-secret-key"
|
|
R2_BUCKET_NAME="openframe"
|
|
# R2 orphan cleanup configuration (script + external cron; app runtime does not schedule this)
|
|
# R2_ORPHAN_CLEANUP_CRON="*/15 * * * *"
|
|
# Scheduled delete mode:
|
|
# */15 * * * * cd /home/yusuf/Programming/OpenFrame && bun run r2:cleanup-orphans
|
|
|
|
# ============================================================================
|
|
# EMAIL & NOTIFICATIONS
|
|
# ============================================================================
|
|
|
|
# Telegram bot token from @BotFather — shared across all users
|
|
# Users only need to provide their own Chat ID in Settings
|
|
TELEGRAM_BOT_TOKEN="your-telegram-bot-token"
|
|
|
|
SMTP_HOST="smtp.gmail.com"
|
|
SMTP_PORT="587"
|
|
SMTP_USER="[email protected]"
|
|
SMTP_PASSWORD="your-app-specific-password"
|
|
SMTP_FROM="[email protected]"
|
|
|
|
# ============================================================================
|
|
# APPLICATION
|
|
# ============================================================================
|
|
NEXT_PUBLIC_APP_URL="http://localhost:3000"
|
|
# development | production | test
|
|
NODE_ENV="development"
|
|
# Disable all app-level rate limiting for local testing. Leave unset to keep rate limiting enabled.
|
|
# Accepted truthy values: "true", "1", "yes", "on"
|
|
# DISABLE_RATE_LIMIT="true"
|
|
# Admin emails for accessing the /admin panel (comma separated list)
|
|
# e.g., "[email protected],[email protected]"
|
|
ADMIN_EMAILS=""
|
|
# Invite code for internal registration (required to sign up)
|
|
# Generate a secure code for your team
|
|
INVITE_CODE="your-secret-invite-code"
|
|
# Enable debug logging
|
|
# DEBUG="openframe:*"
|
|
|
|
# ============================================================================
|
|
# VIDEO PROCESSING
|
|
# ============================================================================
|
|
|
|
# Bunny Stream for direct video uploads
|
|
BUNNY_STREAM_API_KEY="your-stream-library-api-key"
|
|
BUNNY_STREAM_LIBRARY_ID="your-library-id"
|
|
# Bunny Core API key (account-level) used to enforce KeepOriginalFiles/ExposeOriginals on the library
|
|
BUNNY_API_KEY="your-account-api-key"
|
|
# Bunny Stream CDN base URL (for HLS streaming)
|
|
BUNNY_CDN_URL="your-url-to-bunny-cdn"
|
|
NEXT_PUBLIC_BUNNY_CDN_URL="your-url-to-bunny-cdn"
|
|
# Bunny orphan cleanup configuration (script + external cron; app runtime does not schedule this)
|
|
# Grace period is fixed at 24 hours in the script.
|
|
# */15 * * * * cd /home/yusuf/Programming/OpenFrame && bun run bunny:cleanup-orphans
|
|
|
|
# ============================================================================
|
|
# BILLING
|
|
# ============================================================================
|
|
# Stripe recurring price used for paid accounts
|
|
STRIPE_SECRET_KEY="sk_test_..."
|
|
STRIPE_PRICE_ID="prod_UBWFFKZC3d80z4"
|
|
STRIPE_WEBHOOK_SECRET="whsec_..."
|