myOJ is an Online Judge and Coding Contest organising platform. This project is an attempt to gather the features and positives from different coding platforms, like - LeetCode, CodeForces and CodeChef, in one platform.
The feature of extensive blogging and contest participation from CodeForces is merged with data intensive features of user and problem data from LeetCode including the charts from CodeChef with a three-column multicolor design for every tab.
Docker has been used for containerizing the user submission part ensuring secure running and judging of codes.
Script for judging user submissions is totally self written and no external APIs are used.
To run this project, you will need to add the following environment variables to your .env file
DATABASE_URL
- mysql database connection string (starting from mysql://
) consisting of hostname, port number, database name, username and password
NEXT_PUBLIC_MYSQL_HOST
- database hostname
NEXT_PUBLIC_MYSQL_PORT
- database port number
NEXT_PUBLIC_MYSQL_DATABASE
- database name
NEXT_PUBLIC_MYSQL_USER
- mysql username
NEXT_PUBLIC_MYSQL_PASSWORD
- mysql connection password
NEXT_PUBLIC_GITHUB_APP_CLIENT_ID
- client ID for auth through github
NEXT_PUBLIC_GITHUB_APP_SECRET_ID
- secret ID for auth through github
NEXT_PUBLIC_GOOGLE_CLIENT_ID
- client ID for auth through google
NEXT_PUBLIC_GOOGLE_CLIENT_SECRET
- secret ID for auth through google
NEXT_PUBLIC_AUTH_SECRET
- secret ID used by NextAuth
NEXT_PUBLIC_AUTH_URL
- callback url used by NextAuth
NEXT_PUBLIC_API_URL
- API url for fetch calls to backend
To run this project locally, ensure you have Docker
installed on your machine and the engine is active and started.
Clone the project
git clone https://github.com/VanshSukhija/myOJ
Go to the project directory
cd myOJ
Install dependencies
npm install
Start the server
npm run start