Readit News logoReadit News
Posted by u/songzme 4 years ago
Ask HN: How to build something like Repl.it?
I want to build something like repl.it but I don't know what I need to know. How do I go about learning how to build something like repl.it where I could create server instances for every user and allow them to code on the browser?
verdverm · 4 years ago
Start with a full stack app with user accounts, deploy it to the cloud, then add websockets. After that come back and ask again for next steps.
songzme · 4 years ago
sorry I should clarify the parts I don't know. I know how to build a full stack app with user accounts, deploy it to the cloud, then add websockets. I own https://www.c0d3.com

I don't know how to create server instances on the fly.

verdverm · 4 years ago
Ah ok, there are many options here. You essentially need to do some programmatic devops. You can do this with Kubernetes, Terraform, or the cloud provider APIs directly. You'll need to maintain parity between what they want running and what is running, quotas / limits so they don't run up your bill, and cleanup of resources.

You'll want to be cautious of, and thoughtful in, your security because you are allowing users to run untrusted code. It's not just about protecting yourself from them, but also protecting users from each other.