https://github.com/redraskal/clips
Self-hosted video game clips website using Bun & bun:sqlite.
https://github.com/redraskal/clips
bun clips ffmpeg sqlite typescript
Last synced: 10 months ago
JSON representation
Self-hosted video game clips website using Bun & bun:sqlite.
- Host: GitHub
- URL: https://github.com/redraskal/clips
- Owner: redraskal
- Created: 2023-11-04T02:47:09.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-10T23:56:33.000Z (about 1 year ago)
- Last Synced: 2025-03-25T01:51:13.244Z (10 months ago)
- Topics: bun, clips, ffmpeg, sqlite, typescript
- Language: TypeScript
- Homepage:
- Size: 1.34 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Clips
Self-hosted video game clips website using Bun, bun:sqlite, & FFmpeg.
**Work-in-progress, especially the UI design**

## Production Quick start:
1. Build a Docker image with the provided Dockerfile
2. Setup a Discord OAuth app at https://discord.com/developers/applications
3. Include the following env variables when deploying your Docker app: DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRET, DISCORD_REDIRECT_URI
4. Pull your Discord User ID by enabling Developer Mode on Discord and right clicking your profile picture
5. Supply your Discord User ID in the DISCORD_ADMINS & DISCORD_WHITELIST env variables
6. Modify STORAGE_PATH and DATABASE env variables for platform storage in Docker volumes
7. Expose the container server port (default: 3000) to a reverse proxy
## Environmental variables:
| Name | Description | Default |
| --------------------- | ------------------------------------------------------ | ----------------------------------------- |
| DISCORD_CLIENT_ID | Discord OAuth client id | |
| DISCORD_CLIENT_SECRET | Discord OAuth client secret | |
| DISCORD_REDIRECT_URI | Discord OAuth redirect uri | |
| DISCORD_WHITELIST | Comma-separated list of Discord user id's for signups | |
| DISCORD_ADMINS | Comma-separated list of site admins by Discord user id | |
| STORAGE_PATH | Storage path for uploads | ./storage |
| DATABASE | SQLite storage path | clips.sqlite |
| GATEWAY_HOSTNAME | HTTP server hostname | 0.0.0.0 |
| GATEWAY_PORT | HTTP server port | 3000 |
| GATEWAY_ENV | Environment | prod with `bun start`, dev with `bun dev` |
| GATEWAY_DEBUG | console.debug output | false |
| GATEWAY_CACHE_TTL | Cache-Control max age | 3600 |
| GATEWAY_JSON_ERRORS | Whether to output errors in JSON responses | true |
## To install dependencies:
```bash
bun i
```
## To generate a route:
```bash
bun gen {name}
bun gen test
# or
bun gen test.ts
# 📝 pages/test.ts created.
```
The new route will automatically open in Visual Studio Code.
## To run a development server:
```bash
bun dev
```
## To run a production server:
```bash
bun start
```
This project was created with [Bun](https://bun.sh), a fast all-in-one JavaScript runtime.