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_name
in the fileserver.js
matches 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_value
inserver.js
. - For Linux distro users, replace
gtimeout
inDockerTimeout.sh
withtimeout
.gtimeout
is only supported for OSX platform. - Do not fiddle with the
Payload
folder while setting up.
- Supports
Python
,Ruby
,C++
,C
andJava
. - 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.js
and add its dependency toDockerfile
and update the image. - To play around with the website UI, use templates in the
view
folder. - To play around with the existing schema or FB authentication, checkout
config
folder.
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.