MCPcopy
hub / github.com/freeman-jiang/beatsync

github.com/freeman-jiang/beatsync @main sqlite

repository ↗ · DeepWiki ↗
638 symbols 2,040 edges 206 files 81 documented · 13%
README

Beatsync

Beatsync is a high-precision web audio player built for multi-device playback. The official app is beatsync.gg.

https://github.com/user-attachments/assets/2aa385a7-2a07-4ab5-80b1-fda553efc57b

Features

  • Millisecond-accurate synchronization: Abstracts NTP-inspired time synchronization primitives to achieve a high degree of accuracy
  • Cross-platform: Works on any device with a modern browser (Chrome recommended for best performance)
  • Spatial audio: Allows controlling device volumes through a virtual listening source for interesting sonic effects
  • Polished interface: Smooth loading states, status indicators, and all UI elements come built-in
  • Self-hostable: Run your own instance with a few commands

[!NOTE] Beatsync is in early development. Mobile support is working, but experimental. Please consider creating an issue or contributing with a PR if you run into problems!

Quickstart

This project uses Turborepo.

Fill in the .env file in apps/client with the following:

NEXT_PUBLIC_API_URL=http://localhost:8080
NEXT_PUBLIC_WS_URL=ws://localhost:8080/ws

Run the following commands to start the server and client:

bun install          # installs once for all workspaces
bun dev              # starts both client (:3000) and server (:8080)
Directory Purpose
apps/server Bun HTTP + WebSocket server
apps/client Next.js frontend with Tailwind & Shadcn/ui
packages/shared Type-safe schemas and functions shared between client & server

Extension points exported contracts — how you extend this code

NewSyncerProps (Interface)
(no doc)
apps/client/src/components/NewSyncer.tsx
CachedAudioFile (Interface)
(no doc)
apps/server/src/demo.ts
TimingDisplayProps (Interface)
(no doc)
apps/client/src/components/TimingDisplay.tsx
GainParams (Interface)
(no doc)
apps/server/src/spatial.ts
JoinFormData (Interface)
(no doc)
apps/client/src/components/Join.tsx
WSData (Interface)
(no doc)
apps/server/src/utils/websocket.ts
LoadDefaultTracksButtonProps (Interface)
(no doc)
apps/client/src/components/LoadDefaultTracksButton.tsx
FileInfo (Interface)
(no doc)
apps/server/src/utils/blobStats.ts

Core symbols most depended-on inside this repo

cn
called by 134
apps/client/src/lib/utils.ts
getClients
called by 50
apps/server/src/managers/RoomManager.ts
addClient
called by 40
apps/server/src/managers/RoomManager.ts
getState
called by 36
apps/client/src/lib/audioContextManager.ts
processClientLoadedAudioSource
called by 29
apps/server/src/managers/RoomManager.ts
handleOpen
called by 28
apps/server/src/routes/websocketHandlers.ts
addAudioSource
called by 28
apps/server/src/managers/RoomManager.ts
getOrCreateRoom
called by 28
apps/server/src/managers/GlobalManager.ts

Shape

Function 431
Method 135
Interface 53
Class 18
Enum 1

Languages

TypeScript100%

Modules by API surface

apps/server/src/managers/RoomManager.ts71 symbols
apps/server/scripts/load-test-demo.ts33 symbols
apps/client/src/lib/audioContextManager.ts25 symbols
apps/client/happydom.ts24 symbols
apps/server/src/lib/r2.ts22 symbols
apps/client/src/store/global.tsx19 symbols
apps/client/src/components/ui/dropdown-menu.tsx15 symbols
apps/server/src/managers/GlobalManager.ts14 symbols
apps/server/src/__benchmarks__/ntpProtocol.bench.ts13 symbols
apps/client/src/components/ui/select.tsx10 symbols
apps/client/src/components/ui/dialog.tsx10 symbols
apps/server/src/managers/BackupManager.ts9 symbols

Dependencies from manifests, versioned

@aws-sdk/client-s33.1062.0 · 1×
@aws-sdk/s3-request-presigner3.1062.0 · 1×
@beatsync/sharedworkspace:* · 1×
@dnd-kit/core6.3.1 · 1×
@dnd-kit/modifiers9.0.0 · 1×
@dnd-kit/sortable10.0.0 · 1×
@dnd-kit/utilities3.2.2 · 1×
@eslint/js9.39.4 · 1×
@happy-dom/global-registrator20.10.1 · 1×
@radix-ui/react-accordion1.2.12 · 1×
@radix-ui/react-avatar1.1.11 · 1×
@radix-ui/react-dialog1.1.15 · 1×

For agents

$ claude mcp add beatsync \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact