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? 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. 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. 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. thank you so much I will go learn Kubernetes and Terraform and how they work What I've done is build a small API in Go, using the Kubernetes client-go module that my app server called out to. It would run the steps to deploy client session servers and manage the infra for it generally. There are a ton of ways / tech you can use in a server dedicated to this process. I would recommend separating it from your application server that talks to the main user database that tracks things. I queries the kids API or metrics server rather than storing everything in the database.