9001. Online Judge - Building Web App with MEAN StackMEAN, Angular, Express, and MongoDB
Build online judge application with MEAN stack(MongoDB, Express, Angular and Node.js).
1. Online Judge
This online judge application is used to practice programming to solve algorithm questions. It can compile and execute code, and test them with pre-constructed data. The output of the code will be captured by the system, and compared with the standard output. The system will then return the result.
The implemented functions are listed as follows.
- User Authentication - Based Token, 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.
- 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.
The Server is built with Express and MongoDB.
- 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.
- CSS and Icon: bootstrap, font-awesome
- Rich Text Editor: ngx-editor
- Code Editor: ngx-monaco-editor
- Progress Bar: ngx-progressbar
2. Judging System
This is the core component of this online judge application.
2.1 Master Data for Solutions
2.2 Judging Engine
Judging engine contains several ‘runner’s for different languages. It automatically detects what language of the solution submitted by user, and call specific runner to execute the solution against the pre-defined test cases.
- JDK (jdk 7 or above)
- Node.Js (node 6 or above)
- Python(2 or 3)
Use express as web server to host the RESTful API.
Most of the data are stored in MongoDB. The database URL is configurable. You can either use local MongoDB or remote MongoDB hosted on cloud service.
Use Angular as the front end stack to build the UI web pages.
Progress Bar, Loading icon, WYSIWYG editor, code editor, etc.
5. More Tutorials
Read the following tutorials to learn more details about this online judge application.
- Online Judge - Backend RESTful API Server
- Online Judge - Frontend with Angular
- Online Judge - Judging System
- Online Judge - User Authentication
- Online Judge - Remember Me