//blinkenscreensbydargmuesli

blinkenscreens

Synchronized drawing-and-light show across multiple devices in real-time.

0
0
0
TypeScript

โœจ Blinkenscreens

Create synchronized drawing-and-light shows across multiple devices in real-time!

Turn any event into an interactive art experience. Everyone draws, everyone gets ready, and when you hit play โ€” all screens light up together in perfect sync. ๐ŸŽจ๐Ÿ’ก

๐ŸŽฏ What is this?

A Nuxt 4 web app that combines drawing, WebSockets, and synchronized playback to create shared visual experiences at events. Perfect for parties, workshops, or any gathering where you want people to collaborate creatively!

โœจ Features

๐Ÿ–ผ๏ธ For Participants

  • undefinedFullscreen canvas with four themed prompts (๐Ÿคฉ joy, ๐Ÿ˜ช sad, ๐Ÿ˜ž despair, ๐ŸŽ‰ party)
  • undefinedWake-lock keeps screens on during the show
  • undefinedLocal storage saves your drawings safely
  • undefinedDownload your artwork anytime

๐ŸŽ›๏ธ For Event Organizers

  • undefinedAdmin console at /admin with token auth
  • undefinedLive monitoring: see connected devices, latency, and readiness
  • undefinedTest mode for practice runs
  • undefinedOne-click launch when everyoneโ€™s ready

๐Ÿš€ Under the Hood

  • undefinedWebSocket sync with automatic latency measurement
  • undefinedClock alignment across all devices
  • undefinedSmart countdowns adapt to slowest connection (3x latency + buffer)
  • undefinedSchedule-driven playback with flashes, fades, and effects
  • undefinedSession resumption survives reconnects

๐Ÿ—๏ธ Tech Stack

  • undefinedNuxt 4 + Vue 3
  • undefinedNitro WebSocket server
  • undefinedCanvas API for drawing
  • undefinedWake Lock API for always-on screens
  • undefinedlocalStorage for persistence
  • undefinedmkcert for local HTTPS

๐Ÿš€ Quick Start

undefinedPrerequisites: Node 20+, pnpm, mkcert

# Install mkcert (if needed)
# macOS: brew install mkcert
# Linux: See https://github.com/FiloSottile/mkcert#installation

# Clone and setup
pnpm install
pnpm prepare  # Generates SSL certs

# Create .env file
echo "NUXT_ADMIN_TOKEN=changeme" > .env

# Start dev server (HTTPS on localhost:3000)
pnpm dev

๐ŸŽฎ Usage

For Participants

  1. Open https://localhost:3000 on your device
  2. Draw something for each of the four prompts
  3. Hit โ€œReadyโ€ when youโ€™re done
  4. Watch the magic happen when admin starts the show! โœจ

For Admins

  1. Open https://localhost:3000/admin
  2. Enter your admin token
  3. Monitor connected devices and their readiness
  4. Test countdown or Start Playbackundefined
  5. Watch the synchronized show across all devices ๐ŸŽ†

๐Ÿ“ฆ Scripts

pnpm dev         # Dev server with HTTPS
pnpm build       # Build for production
pnpm preview     # Preview production build
pnpm start:node  # Run production server (requires env vars)

๐ŸŽจ Customizing the Show

Edit server/data/schedule.json to customize timing and effects:

{
  "totalMs": 220000,
  "events": [
    { "label": "up", "time_ms": 12822 },
    { "label": "drop", "time_ms": 51234 }
  ]
}

undefinedEffect labels:undefined

  • up / down / ground โ€” Show themed images with fades
  • life / buildup โ€” Repeating flashes
  • drop โ€” Party mode with colorful flashes
  • silence / end โ€” Dimming effects

๐Ÿ“ Project Structure

app/
  โ”œโ”€โ”€ pages/
  โ”‚   โ”œโ”€โ”€ index.vue      # ๐ŸŽจ Participant view
  โ”‚   โ””โ”€โ”€ admin.vue      # ๐ŸŽ›๏ธ Admin console
  โ”œโ”€โ”€ composables/
  โ”‚   โ”œโ”€โ”€ usePlaybackSocket.ts      # WebSocket connection
  โ”‚   โ”œโ”€โ”€ usePlaybackScheduler.ts   # Timeline engine
  โ”‚   โ”œโ”€โ”€ useDrawingCanvas.ts       # Canvas drawing
  โ”‚   โ””โ”€โ”€ useCountdownSync.ts       # Countdown overlay
  โ””โ”€โ”€ components/         # UI components

server/
  โ”œโ”€โ”€ routes/
  โ”‚   โ””โ”€โ”€ playback.ts    # WebSocket handler
  โ”œโ”€โ”€ api/
  โ”‚   โ””โ”€โ”€ schedule.get.ts
  โ””โ”€โ”€ data/
      โ””โ”€โ”€ schedule.json  # Playback timeline

types/
  โ”œโ”€โ”€ topics.ts          # Drawing prompts
  โ””โ”€โ”€ websocket.ts       # Message schemas

๐Ÿ”ง Configuration

Set these environment variables:

# Required
NUXT_ADMIN_TOKEN=your-secret-token

# Production (optional)
HOST=0.0.0.0
NITRO_SSL_CERT=/path/to/ssl.crt
NITRO_SSL_KEY=/path/to/ssl.key

๐Ÿ› Troubleshooting

undefinedAdmin auth fails?undefined
โ†’ Check NUXT_ADMIN_TOKEN is set in your environment

undefinedHTTPS certificate errors?undefined
โ†’ Run mkcert -install and then pnpm prepare

undefinedWake lock not working?undefined
โ†’ Requires HTTPS. Make sure youโ€™re using https:// in the URL.

[beta]v0.14.0