aman246149 / Online-judge

Open source online judge based on MERN stack and Docker.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Online-Judge

An Online-judge system based on Node and React (MERN Stack).

Features

  • Authentication and Authorization (includes Email verification)
  • Submit your code
  • Test your code
  • Results shows Time (Sec) and Memory (MB)
  • Verdicts
    • Time Limit Exceeded (TLE)
    • Memory Limit Exceeded (MLE)
    • Compilation Error (CE)
    • Runtime Error (RTE)
    • Wrong Answer (WA)
    • Accepted (AC)
  • See your submissions
  • Filter problems based on tags
  • Search problems by name
  • Create Coding Problems
  • Dashboard for Statistics
  • Forgot password
  • Contest
  • Leaderboard
  • Download Submissions
  • Two-factor authentication
  • OAuth login with Google, Facebook, and Github
  • Problem upvotes and downvotes
  • Specific blogs for posts and tutorials

Supported Languages

  • C
  • C++ 11/14/17 (GCC)
  • Java 8
  • Python 3

Prerequisite

  • Docker Desktop
  • Node.js

Env Variables

Create a .env file in then root and add the following

Make Sure to connect to gmail api at google developer console

PORT = 5000
MONGO_URI = your mongo url
JWT_PRIVATE_KEY = your JWT token
EMAIL_ID = your email Id 
PASSWORD = password for email Id
EMAIL_SECRET = your email secret
CLIENT_ID = your client Id
CLIENT_SECRET = your client secret
REDIRECT_URI = https://developers.google.com/oauthplayground
REFRESH_TOKEN = your refresh token

Setup Locally

Make sure to install docker in your machine.

Start Docker Desktop

git clone https://github.com/jojozhuang/online-judge-mean.git
cd online-judge

Client

Change BACK_SERVER_URL="http://localhost:5000" in client/src/config/config.js

cd client
npm install
npm start

Server

Change PATH_INIT={{Path to Server Directory}} in server/judge/judge.js

cd server
mkdir submissions
npm install
cd docker
docker build -t <Image_Name> .
cd ..
npm start

Make sure to start Docker Desktop before the command npm start.

🎉 And that's it! You will now be able to visit http://localhost:3000/ URL and see your application up and running.

Snapshots

SignIn

SignIn

SignUp

SignUp

Problem Page

Problem

Results

Results

User Submissions

My Submission

User Submission Modal

Modal

Dashboard Charts

Dashboard

Dashboard Charts

Dashboard

Seachbox, Tags and Filter

Tags

Thanks

  • I'd appreciate a star if you find this helpful.

License

MIT

About

Open source online judge based on MERN stack and Docker.

License:MIT License


Languages

Language:JavaScript 88.0%Language:CSS 8.6%Language:HTML 2.1%Language:Shell 1.4%