Skip to content

fuiz/website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

529 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fuiz

Host live quizzes freely

Fuiz icon

License

Dependencies

This is the code for the website (developed in Svelte). It relies on two other components to function properly:

  • Backend game server: Code is under fuiz/game-backend (game/ directory). The urls to it are defined by PUBLIC_BACKEND_URL and PUBLIC_WS_URL.
  • Backend image server: Code is under fuiz/game-backend (corkboard/ directory). The url to it is defined by PUBLIC_CORKBOARD_URL.

Both have standalone server and Cloudflare Worker implementations. In production, the Cloudflare Workers are hosted at api.fuiz.org and corkboard.fuiz.org.

Self-Hosting

The website can be built with either the Cloudflare or Node adapter (controlled by the ADAPTER environment variable, defaults to cloudflare). When running outside of Cloudflare, the following services fall back to local alternatives:

Service Cloudflare Self-Hosted
Database D1 SQLite
Blob Storage R2 Filesystem
Key-Value Store KV SQLite
AI (tag derivation) Cloudflare AI Any OpenAI-compatible API

See fuiz/self-hosted for a ready-to-use Docker Compose setup.

Developing

After installing dependencies with bun install, start a development server:

bun run dev

While we use bun ourselves, npm should work just as fine.

You might need the following environment variables (.env.local):

# the link to the current hosted version, production: fuiz.org
PUBLIC_DISPLAY_PLAY_URL="localhost:5173"
# same as above but with the actual protocol, production: https://fuiz.org
PUBLIC_PLAY_URL="http://localhost:5173"
# the game backend, production: https://api.fuiz.org
PUBLIC_BACKEND_URL="http://localhost:8787"
# same as above but a websocket url, production: wss://api.fuiz.org
PUBLIC_WS_URL="ws://localhost:8787"
# image server url, production: https://corkboard.fuiz.org
PUBLIC_CORKBOARD_URL="http://localhost:43907"

If you would like to setup backing up to gDrive then you need to create a Google application and set:

# Google Auth Client Id and Secret Key
AUTH_GOOGLE_ID=
AUTH_GOOGLE_SECRET=
# usually is your domain + /api/gdrive/callback
AUTH_GOOGLE_REDIRECT_URI=

Library Publishing System

Fuiz uses a GitLab-based publishing system where users authenticate with GitLab OAuth, submit fuizzes via pull requests, and maintainers review before merging. Once merged, a webhook automatically syncs the fuiz to the live library.

See GITLAB_PUBLISHING_SETUP.md for complete setup instructions and environment variables.

Status

The live components' status can be accessed on status.fuiz.org.

Contributors