flok  by munshkr

Web-based P2P collaborative editor for live coding music and graphics

Created 6 years ago
350 stars

Top 79.5% on SourcePulse

GitHubView on GitHub
Project Summary

Flok is a web-based, peer-to-peer collaborative editor designed for live coding music and graphics. It targets musicians, visual artists, and developers interested in real-time, shared creative coding experiences, offering a flexible environment for experimenting with various audio and visual synthesis languages.

How It Works

Flok utilizes a modular, monorepo architecture with CodeMirror 6 for its editor and Yjs for real-time collaborative editing. It supports multiple "slots" for different programming languages and tools, allowing users to mix and match environments like TidalCycles, SuperCollider, Hydra, and p5.js within a single session. Code execution is handled via a separate flok-repl process that connects to the web client, enabling evaluation of code against local interpreters or browser-based environments.

Quick Start & Requirements

  • Install and run locally: npx flok-web@latest
  • Connect REPLs: npx flok-repl@latest -H wss://next.flok.cc -s <session> -t <target> -T user:<name>
  • Dependencies: Node.js, npm. Specific targets may require their respective interpreters (e.g., SuperCollider, TidalCycles).
  • Setup time: Minimal for web server; REPL setup depends on target interpreter installation.
  • Documentation: https://github.com/munshkr/flok

Highlighted Details

  • Peer-to-peer collaboration via web sockets.
  • Support for numerous audio/visual live coding languages (TidalCycles, SuperCollider, Hydra, p5.js, FoxDot, Mercury, etc.).
  • Extensible architecture with modular packages for editor, REPL, and server components.
  • Dynamic import of external JS libraries and URL-based session configuration.
  • Parent window messaging for embedding Flok into other web applications.

Maintenance & Community

  • Active development indicated by monorepo structure and detailed package breakdown.
  • Community engagement encouraged via GitHub issues for bug reports and contributions.
  • Adheres to the Contributor Covenant code of conduct.

Licensing & Compatibility

  • Licensed under GPL 3+.
  • GPL 3+ license may impose copyleft restrictions on derivative works, potentially requiring source code sharing if linked or distributed.

Limitations & Caveats

  • Public servers carry security risks, as users can execute code on others' machines.
  • SuperCollider's sclang target has known issues on Windows; remote_sclang is recommended.
  • Some features, like FFT data from Strudel, require manual re-evaluation after code changes.
Health Check
Last Commit

3 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 30 days

Explore Similar Projects

Starred by Boris Cherny Boris Cherny(Creator of Claude Code; MTS at Anthropic), Nat Friedman Nat Friedman(Former CEO of GitHub), and
39 more.

aider by Aider-AI

0.4%
37k
AI pair programming in your terminal
Created 2 years ago
Updated 1 week ago
Feedback? Help us improve.