Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A unified repository for the code-sharing platform Bytecrowds
Bytecrowds is a self-hostable, serverless code sharing platform built on a Next.js frontend, y.js real-time collaboration, and Cloudflare Workers analytics, designed to let programmers share code snippets with peers in seconds.
Bytecrowds is an open-source project that runs a minimalist, real-time collaborative code sharing platform. The unified repository bundles the Next.js frontend and the analytics worker source; you clone it, set environment variables, and deploy the platform on Vercel and Cloudflare. Data is stored in Upstash serverless Redis as hashes and sorted sets, and the editor is powered by react-codemirror synchronized through y.js and an Ably provider. The project took 1st place at InfoEducatie 2022 in the web section.
Bytecrowds is for developers who want to run their own lightweight code sharing service instead of relying on a closed platform. It is also a useful reference for teams building real-time CRDT-based editors or serverless applications, since it demonstrates the full integration of y.js, Ably, Cloudflare Workers, and Upstash. Open-source contributors can help with the open issue about dependency upgrades that currently keeps the public site unavailable.
The editor is react-codemirror wrapped with y.js-codemirror bindings, and the document is stored in a SyncedStore object. An Ably provider propagates updates between clients, so every keystroke is synced in real time. Separately, the analytics worker receives the page path on the first render and updates Redis hashes for daily stats and sorted sets for general stats, while temporarily holding SHA-256 IP hashes to count unique visitors.
No. The public deployment is temporarily unavailable because errors occurred while upgrading dependencies, and the maintainers are asking for help to fix it.
The frontend uses Next.js, Chakra UI, SyncedStore, y.js, and react-codemirror. The backend relies on Vercel serverless functions, Cloudflare Workers, Ably for realtime sync, Upstash for serverless Redis, and LogRocket for monitoring.
Clone the frontend and analytics repositories, create the .env files with the required variables, and optionally install wrangler to run a local version of the analytics worker.
You can set a list of authorized emails for any bytecrowd. Authentication is handled by auth.js, and once the list is saved, it can only be changed by editing the database directly.