GithubHelp home page GithubHelp logo

alexstedev / onlinejudge Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 881 KB

πŸŽ“ Online Judge written in Angular

License: MIT License

Dockerfile 0.19% Procfile 0.01% TypeScript 33.52% Shell 0.96% JavaScript 34.58% Java 12.06% Python 2.89% C 0.02% C++ 0.06% HTML 15.13% CSS 0.58%

onlinejudge's Introduction

Online Judge

A web application for online judge(algorithm questions), built with MEAN stack (MongoDB, Express, Angular and Node.js).

image

image

Function

This application is used to solve algorithm questions. You can submit the solution to see if it passes all test cases. Below are the available features.

  • Token Based Authentication - Register, Login, Auto Login, User Profile, Reset Password, etc.
  • User Management - Create, Update, Delete user.
  • Question Management - Create, Update, Delete question.
  • Database Management - Import and Export data with csv files for users, questions and submissions.
  • Judging System - Judging Engine, Solution Template, Submission History, Multi-programming language support.
  • Programming Languages - Three languages are currently supported, including Java, Javascript and Python.
  • UI - RichTextEditor, Code Editor, Progress Bar, Loading Image are applied.

The following functions are under development.

  • Contest - Generate contest by randomly selecting four questions from the question library.
  • Collaborative code editor - Different users can work on the same solution simultaneously.

Technology

The Server is built with Express and MongoDB. The used libraries for server are listed as follows.

  • RESTful API: express, express router, mongoose, cors
  • Logging: morgan, winston
  • User Authentication: jsonwebtoken, passport, cookie-parser, express-jwt
  • Import/Export Data: multer, csv-express, fast-csv

The Client is built with Angular and 3rd-party libraries, see below.

  • CSS and Icon: bootstrap, font-awesome
  • Rich Text Editor: ngx-quill
  • Code Editor: ngx-monaco-editor
  • Progress Bar: ngx-progressbar

Setup Locally

1. Source Files

git clone https://github.com/alexstedev/OnlineJudge
cd OnlineJudge
npm install
npm run dev

Access http://localhost:9020/ in web browser, enjoy!

npm install -g win-node-env

2. Configuration

Notice, four different environments are configured for this app. Edit './server/config/server-config.js' to setup your site, especially the MongoDB connection url.

Environment Command Description
local npm run local Development environment using local MongoDB.
dev npm run dev Development environment using remote MongoDB hosted on mLab.
stage npm run stage Testing environment using remote MongoDB hosted on mLab.
prod npm run prod Production environment for deployment.

3. Master Date

When the server is initially started, use admin user 'alexserrano' and password '111111' to login. Go to 'Database' to import data for 'users' and 'questions'. The data files are located in 'backup_csv' folder.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.