✨ Inspiration ✨

The motivation behind this project was that I wanted to know about how online judges on different coding platforms work and run the source codes in the browser. So for that reason, I started researching how can I built something like that in Node JS, and then I created the REST API for the same with express and node.

So this project will enable anyone who has access to the internet and any web browser to compile and run source codes of various languages like C, C++, Java, Python, Javascript (Node JS), Golang, Rust, Ruby, Elixir, etc. without any environment set up on their local machine.

📋 Features 📋

  • REST API created from scratch with Express JS and Node JS
  • Can compile and run 9 different programming languages
  • Uses docker container for smooth development flow
  • Fast and robust Client application created with React JS
  • Use of styled-components for styling react components
  • Easily give user inputs to source code through Input Modal
  • Testing of react components with JEST testing framework
  • Use of storybook to test UI components in isolation

👷‍♂️ How I built it 👷‍♂️

I have used the Typescript and React to build my client application while
the Typescript, Node, Express, and Docker for building my REST API. I have also used other famous tools related to React Ecosystem such as JEST, Storybook, Styled Components, etc.

💪 Challenges I ran into 💪

The most challenging part of this project came when I started building the backend REST API to run various programming languages. Then as usual I went on the internet and searched for the same.

And then I came across a wonderful book named 'Node Beyond Basic' written by Samer Buna. From this book's 'Node's Child Processes' module I learned how can I create child process in Node, how I can communicate between them, and also access Operating System functionalities.

Now after this next challenge was that, now how should set up all of these compilers on my machine and also on the deployed server.

Then I came to know about Docker and with help of it, I installed programs to compile and run various languages inside a container with help of Node's official docker image. This also made it really easy for me during the deployment of my API to Heroku.

🚸 What I learned 🚸

During the span of this project, I get to learn so many new things such as Docker which helps to package applications into containers, Storybook which allows us, to create and test UI components in isolation, JEST for testing our UI components, child_process module in Node which enables us to access Operating System functionalities by running any system command inside a child process.

😲 What's next for COMPILATEUR 😲

In the future, we plan to

  • Add more programming languages to this app so that users can use it for any language they want
  • Add database services so that users can save their code snippets in the applications and will also be able to share them with other users

Built With

Share this project:

Updates