_ ___ ______ __
| | / (_)__ _ __/_ __/_ __/ /_ ___
| | / / / _ \ | /| / // / / / / / __ \/ _ \
| |/ / / __/ |/ |/ // / / /_/ / /_/ / __/
|___/_/\___/|__/|__//_/ \__,_/_.___/\___/
A modern video streaming platform built with the T3 Stack, designed to run on Docker Swarm.
-
Frontend:
- Next.js 15 - React framework for production
- React 19 - UI library with latest features
- Tailwind CSS 4 - Utility-first CSS framework
- tRPC 11 - End-to-end typesafe APIs
- Vidstack - Media player components
-
Backend:
- Drizzle ORM - TypeScript ORM
- Clerk - User Authentication
- tRPC 11 - End-to-end typesafe APIs
- Trigger.dev - Task Runner
- UploadThing - File Uploads
- PostHog - Web Analytics
-
Infrastructure:
- Traefik - Edge Router & Load Balancer
- PostHog - Web Analytics
- Docker Swarm - Container Orchestration
- Node.js 22.x or later
- Bun 1.2.5 or later
- GNU Make
-
Clone the repository
git clone https://github.com/viewtubeapp/viewtube.git cd viewtube -
Install dependencies
bun install
-
Set up environment variables
cp .env.example .env
Edit
.envwith your configuration (see Environment Variables section below) -
Start development environment
bun run dev
-
Access the application
- Web UI: http://localhost:3000
| Variable | Description | Required | Default |
|---|---|---|---|
NEXT_PUBLIC_URL |
Public URL of the web application | Yes | - |
NEXT_PUBLIC_BRAND |
Brand name for the application | Yes | - |
NEXT_PUBLIC_NODE_ENV |
Next.js environment | No | - |
NEXT_PUBLIC_GIT_COMMIT_HASH |
Git commit hash | No | - |
| Variable | Description | Required | Default |
|---|---|---|---|
ANALYZE |
Enable bundle analysis | No | - |
NODE_ENV |
Node environment | No | - |
GIT_COMMIT_HASH |
Git commit hash | No | - |
| Variable | Description | Required | Default |
|---|---|---|---|
TRIGGER_SECRET_KEY |
Trigger.dev API key | Yes | - |
TRIGGER_ACCESS_TOKEN |
Trigger.dev access token (used in GitHub Actions) | Yes | - |
| Variable | Description | Required | Default |
|---|---|---|---|
NEXT_PUBLIC_POSTHOG_KEY |
PostHog key for analytics | Yes | - |
NEXT_PUBLIC_POSTHOG_HOST |
PostHog host for analytics | Yes | - |
| Variable | Description | Required | Default |
|---|---|---|---|
UPLOADTHING_TOKEN |
UploadThing token | Yes | - |
NEXT_PUBLIC_UPLOADTHING_APP_ID |
UploadThing app ID | Yes | - |
| Variable | Description | Required | Default |
|---|---|---|---|
CLERK_SECRET_KEY |
Secret key for Clerk | Yes | - |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY |
Publishable key for Clerk | Yes | - |
| Variable | Description | Required | Default |
|---|---|---|---|
DATABASE_HOST |
Database host | Yes | - |
DATABASE_URL |
Database URL | No | - |
DATABASE_USERNAME |
Database username | Yes | - |
DATABASE_PASSWORD |
Database password | Yes | - |
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- T3 Stack for the amazing foundation
- All contributors who have helped this project grow