Context: Live Coding & Strudel
Live coding is a practice where code is written and modified in real time to generate output (often music or visuals) while it’s running. It’s commonly used in algorithmic music, performances, and creative exploration.
Strudel is a live coding environment for algorithmic music, inspired by TidalCycles, where users write concise code patterns to generate rhythmic and melodic sound in real time. It’s powerful, expressive, and well-suited for improvisation making it a perfect candidate for collaboration.
Inspiration
We were inspired by pair programming and by how music artists collaborate live, building off each other’s ideas in real time. Live coding and creative coding tools are often very individual experiences, even though creativity thrives on collaboration. We wanted to explore what it would look like to make live coding social, playful, and shared.
What it does
strudel-w-friends adds real-time collaboration to Strudel. Currently, two users can join the same live coding session and edit together simultaneously, seeing each other’s changes instantly. This transforms Strudel from a solo environment into a shared creative space for experimentation, learning, and co-creation.
How we built it
We implemented real-time collaboration using WebSockets combined with Yjs, a CRDT-based framework for shared state. We worked with Y.Doc, shared text structures, and awareness to track connected users and synchronize edits across clients.
Rather than building a separate app, we integrated directly into Strudel’s existing codebase, adapting our feature to fit its architecture.
For deployment, we used the Vercel CLI, even though the repository is hosted on Codeberg, which required additional configuration and manual setup.
Challenges we ran into
- Real-time synchronization between users
- Understanding Yjs concepts like Y.Doc, shared types, and awareness
- WebSocket reliability and connection management
- Navigating and extending an existing codebase
- Deploying a project hosted outside GitHub using Vercel
Accomplishments that we’re proud of
- Enabled live collaborative coding in a real-world music tool
- Successfully integrated Yjs into Strudel
- Built reliable real-time synchronization with WebSockets
- Deployed a non-trivial feature on top of a mature codebase
- Turned a creative idea into a working collaborative experience
What we learned
- How CRDT-based collaboration works in practice
- Why real-time systems are complex and full of edge cases
- How to understand and extend an existing codebase
- How collaboration can enhance live coding workflows
- Deployment workflows beyond GitHub-only projects
What’s next for strudel-w-friends
- Increase the number of concurrent users
- Export created music as MP3
- Tagging users inside sessions
- Emoji reactions for lightweight interaction
- Projects with multiple soundtracks/files (album-style workflows)
- IntelliSense for Strudel to improve usability
- Session-ending recap or animation
- Version control for live coding sessions
Built With
- codeberg
- codemirror
- javascript
- react
- supabase
- vercel
- y-js

Log in or sign up for Devpost to join the conversation.