Codefeed is a source code judge that can be used for programming competitions, recruitement, etc. It is enclosed in a Docker Ubuntu Sandbox that enables it to compile the user submitted code within itself instead of using an external API.
First clone the repository,
git clone https://github.com/saru95/codefeed
Navigate to the Setup folder. It contains Dockerfile, which consists of the Sandbox dependencies. Run the Dockerfile
as you like or just execute,
./UpdateDocker.sh
It will create a Docker image with the name virtual_machine_codefeed which should be over 1GB in size.
For the next step, navigate to config/database.js and replace the existing DB URL with your cloud hosted URL.
- MongoDB is used here .
Next, you need to install the project dependencies. Navigate to the root folder and run,
sudo npm install .
Run,
node server
to launch the website.
Words of caution,
- Make sure you have stable internet connection while setting up the Docker image.
- Make sure your
vm_namein the fileserver.jsmatches with the Docker image name. - If your code doesn't compile and return the result, there's a great chance that you have a slow internet connection. To tackle that, increase the
timeout_valueinserver.js. - For Linux distro users, replace
gtimeoutinDockerTimeout.shwithtimeout.gtimeoutis only supported for OSX platform. - Do not fiddle with the
Payloadfolder while setting up.
- Supports
Python,Ruby,C++,CandJava. - Rankings of users.
- Ability for the user to add problems.
- Detecting redundant submissions.
- Facebook login.
- View all solved problems.
- Profiles.
P.s : Still has a lot of room for improvements.
- To add more languages, play around with
compilers.jsand add its dependency toDockerfileand update the image. - To play around with the website UI, use templates in the
viewfolder. - To play around with the existing schema or FB authentication, checkout
configfolder.
We wrote this when we were in our sophomore year. This explains the scarcity of tests, style guide and modularity. This project works just fine but isn't maintained anymore. It's better to move on with other projects instead of this.