Byte Golf!
Play Byte Golf - https://byte.golf/
Byte Golf is a code solving problem that rewards players for solving code problems in the shortest amount of code! Some questions require parsing of Stdin while others have to do with printing a simple output. Byte Golf is completely open sourced here as well!
The rules for Byte Golf are surprisingly simple, just write the least code using the standard library of a language of your choice.
ex. “Print ‘Hello, World!’ to console” could be solved with python3 in just 22 bytes!
print('Hello, World!')
A few years ago, my roommates and I decided that it would be cool to have a game where code problems could be solved in interesting and short ways. I wanted to open source the entire solution as a way to show my full stack development skills. The frontend was designed using Adobe XD, and the logos and pages were created in Adobe Illustrator (I am by no means a graphic designer). The entire stack is hosted using serverless technologies on Google Cloud Platform, and will be described in more detail in the next section.
The stack consists of a Go backend, Typescript React frontend, while leveraging Google Cloud Platform’s Cloud Run serverless runtime for cheap hosting. I am using Google Cloud Firestore as my database in Native mode. This gives me scalability without increasing my bill to the moon. The backend is stateless and containerized so it can run basically anywhere, having secrets injected via Google Cloud Secrets.
Currently, I am using the Jdoodle API to compile code remotely, but there is a custom remote compiler in the works ;)
Earlier I mentioned that all of the logos, loading icon, and pages were all designed and created by me as well. Here are some examples of those!
This was animated in Adobe After Effects!
This section walks through generally how this is deployed today without any real pipelines in
place to pick up building.
Assumes Terraform has already been run
cd frontend/
npm run build
docker build -t us-central1-docker.pkg.dev/squid-cloud/bytegolf/backend:XX .
Push container
docker push us-central1-docker.pkg.dev/squid-cloud/bytegolf/backend:XX
Update terraform to point to new container and re-run.