A collaborative code editor, runner and REPL you can install on your own hardware
Try it out at codeconnected.dev.
Codeconnected is a collaborative web platform designed for:
- Coding schools and their students looking to practice coding problems online collaboratively.
- Organizations seeking an online whiteboard interviewing tool they can customize.
- Developers looking for a quick online sandbox to try out ideas.
Largely written in Go, it is designed to be fast and to work on very modest hardware.
Users can code in Ruby, JavaScript (Node.js) and PostgreSQL.
More languages are planned for the future.
The collaborative editor uses Yjs to sync user changes in real time. Changes are relayed between the users through a built-in WebSocket server.
Code execution happens in a REPL, which means that users have access to top-level functions and classes after each code run. This can be very useful for debugging. See it in action.
The back-end runs on one server and user-submitted code runs on another. This:
- ensures the main application will run smoothly regardless of the load on the REPL server caused by user-submitted code.
- provides an extra layer of security, since user-submitted code runs in a physically separate environment.
- lets you scale up seamlessly to meet demand, simply by provisioning more resources to the REPL server or moving it to a better-specced home. A single environment variable tells the main application where it is.
In addition to the security-minded separation of servers, each Docker container where user code runs is hardened using gVisor, a resource-efficient isolation layer.
- Fast Go back-end.
- One Docker container is created per session, allowing users to quickly switch between languages in the coding environment without creating the overhead of multiple containers.
- User coding sessions are saved as text files instead of stopped Docker containers, saving storage space.
Sign-in and sign-up functionality is provided, using Amazon SES for email verification. If needed, another email service can easily be swapped in.