Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
# Copy this file to .env and configure for your environment

# Database Configuration
# Required: PostgreSQL database URL for Drizzle ORM
# Optional: PostgreSQL (Neon) database URL for Drizzle ORM. Leave unset to run
# with in-memory caches only (fully functional; caches just don't persist).
# Must be a postgres:// URL - any other scheme is ignored.
# Format: postgresql://username:password@hostname:port/database
DATABASE_URL=postgresql://user:password@localhost:5432/staticbuffet
# DATABASE_URL=postgresql://user:password@host:5432/staticbuffet

# Server Configuration
# Optional: Port for the development/production server (default: 5000)
Expand Down
50 changes: 0 additions & 50 deletions .replit

This file was deleted.

42 changes: 0 additions & 42 deletions Dockerfile

This file was deleted.

18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,29 @@ A VJ-focused web application for instantly searching, previewing, and queuing fr
### 📋 Version 1.0 Status
This is the first stable release of Static Buffet. All previous versions (0.1.0-alpha through 0.7.2) were pre-release development versions with inconsistent numbering. Version 1.0.0 represents a fully functional, production-ready VJ application.

### Production Build
### Production Build (self-hosted)

Runs the full Express server, including the disk-backed video cache and transcoding:

```bash
npm run build
npm start
```

## \ud83d\ude80 Deploying to Vercel

The app deploys to Vercel as a static frontend plus a serverless function:

- **Frontend**: `npm run build:vercel` (`vite build`) outputs to `dist/`, served by Vercel's CDN.
- **API**: the Express app is mounted as a single serverless function at [`api/index.ts`](api/index.ts); `vercel.json` rewrites `/api/*` to it.

Configure environment variables (e.g. `DATABASE_URL`) in the Vercel dashboard rather than `.env`. Import the repo into Vercel and it builds with no extra settings.

**Serverless limitations** \u2014 because Vercel functions are stateless and short-lived:

- **Search and video proxying work.** Video plays through `/api/video/...`, which streams directly from Archive.org without touching disk. Very long videos may hit the function's max duration; short-to-medium clips are fine.
- **The disk video cache, transcoding, and HLS routes do not work** (no persistent filesystem). They are opt-in extras, not on the default playback path. For those features, self-host the server instead (`npm run build && npm start`).

## \ud83c\udfb5 Audio-Reactive Features

Static Buffet includes Web Audio API integration for beat-detected mixing:
Expand Down
12 changes: 12 additions & 0 deletions api/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { VercelRequest, VercelResponse } from "@vercel/node";
import { createApp } from "../server/app";

// Vercel serverless entry. The whole Express app is mounted as a single
// function; vercel.json rewrites /api/* here. Build the app once and reuse it
// across warm invocations.
const appPromise = createApp();

export default async function handler(req: VercelRequest, res: VercelResponse) {
const app = await appPromise;
return (app as unknown as (req: VercelRequest, res: VercelResponse) => void)(req, res);
}
Comment on lines +9 to +12

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Update the handler to destructure app from the resolved appPromise since createApp() now returns { app, server }.

Suggested change
export default async function handler(req: VercelRequest, res: VercelResponse) {
const app = await appPromise;
return (app as unknown as (req: VercelRequest, res: VercelResponse) => void)(req, res);
}
export default async function handler(req: VercelRequest, res: VercelResponse) {
const { app } = await appPromise;
return (app as unknown as (req: VercelRequest, res: VercelResponse) => void)(req, res);
}

11 changes: 0 additions & 11 deletions api/videos.ts

This file was deleted.

137 changes: 0 additions & 137 deletions deployment-guide.md

This file was deleted.

29 changes: 0 additions & 29 deletions docker-compose.cache.yml

This file was deleted.

Loading
Loading