kamandprompt / codemaniacs Goto Github PK
View Code? Open in Web Editor NEWIIT Mandi Online Judge
License: MIT License
IIT Mandi Online Judge
License: MIT License
Add constraints to the password security level eg. minimum 8 characters, include special characters etc. with a bar displaying the realtime security level of the current setup password.
Make the footer section stick to the bottom of the webpage.
URL: http://localhost:3000/ http://localhost:3000/user/login http://localhost:3000/user/signup http://localhost:3000/contribution
The database should be hosted on Google firebase and should contain a proper schema of the database, like the problem id, statement, difficulty level, problem setter, the contest it was a part of, no. of people who have solved it, no. of peoople who have tried it etc., One should be able to push questions to the realtime database and fetch at the same time.
Create a simple login (./views/login.ejs) and signup form (./views/signup.ejs). The login form should have fields: name, username, email, password and signup form should have: username, password.
In the folder ./models
create a model for problems in a file named problems.js
and export it as Problems
. Following is the structure:
qID: Integer
name: String
description: String
inputFormat: String
outputFormat: String
constraints: String
sampleInput: String
sampleOutput: String
explanation: String
difficulty: Integer
problemSetter: String
timeLimit: Integer
memoryLimit: Integer
tags: String
editorial: String
Similarly create a model for testcases in a file named testcases.js
and export it as Testcases
. Here's the structure:
qID: Integer
timeLimit: Integer
memoryLimit: Integer
cases: [{stdin: String, stdout: String}]
Create a page for displaying all the submissions by a user. The page should contain a table having columns: Submission ID, Problem Name, Language, Verdict, Time, Memory.
Route: http://localhost:3000/user/submissions
ejs file: ./views/submissions.ejs
You can have a look at https://codeforces.com/submissions/lane for reference.
You need to create a login/signup page and call the functions from the Firebase API that has already been implemented by @vsvipul , the HTML , CSS should be done from scratch, no templates are allowed, the page should look good.
Add a link below [ My submissions history ]
and a webpage to update the user's details except for the username. Separate update buttons for {name, email} and {password}.
The admin login system can be implemented and integrated later. As of now, the problem description can be submitted through http://localhost:3000/question/submit. We need a platform for modifying the already created problems (editing prob desc, uploading/ modifying the test cases).
Create a page http://localhost:3000/admin to list all the existing problems. Eg. Codechef panel:
Clicking on any problem link should open a page http://localhost:3000/admin/edit? to modify the data. First section should contain all the fields that were there in while submitting the new question. Eg. Codeforces panel:
Second section for uploading and modifying the test cases. Eg. Hackerearth panel:
The code submitted by user should be added to a JSON object along with details metioned here , and should be sent to the API, so design an interface to do this task, the JS scripts, should be able to extract data regarding the question from firebase and should be able to handle the API response as well. It is a Judge0 API which is currently hosted on IIT Mandi SNTC Server, the authentication token will be provided to you once you start working on this issue.
Add a property 'solved' to show how many people have solved that particular problem.
You need to create the homepage with design similar to codechef, create the best possible design using expressJS ejs middleware. Add files as you please
Add hardcoded sample code like the one present for cpp for each language so that whenever user changes the language the sample code should get updated accordingly.
Anyone can create a contest, with a separate contest id assigned to it, the host can invite multiple people to contribute in the contest, with minimum 5 questions required per question, they can have questions from existing questions repository or can create new ones, with the questions not visible in the practice section until the contest is over. More features will be added later, but this should suffice for a basic app.
Route: http://localhost:3000/admin/add
The app is connected to the database: ./config/database.js
. Add the problems to the database. The schema is in ./models/problems.js
and ./models/testcases.js
.
Currently, the data is being sent to the server: look at your terminal after submitting a problem. Basically, you'll have to implement the function: submitQuestion()
in the file ./controls/functions.js
. You can add other helping functions there.
Add a snackbar like the one shown below, to show success/failure notifications on login/signup/form submission etc.
Restrict any logged in user (non-admin)/ logged out guest from opening URL of the problem page and submit page with qID which is not present in db or which isVisible: false
.
Restrict the admin from opening URL of the problem page and submit page with qID which is not present in db.
In case of restriction pass the client to the 404 page.
The signin and signup webpage seems to be distorted a bit. Fix their CSS. Also, in the signup webpage remove the I Agree To The Terms & Conditions.
URL: http://localhost:3000/user/login http://localhost:3000/user/signup
Currently it's only checking for @
which is not good as the email can be fake as [email protected]
(was able to signup using this), so add proper checks for this in the Signup form.
Display the current logged in user's submission history in the submission table in descending order of submission time.
URL: http://localhost:3000/user/submissions
ejs: ./views/submissions.ejs
Implement user authentication using passport js. Potential files:
Signu form: ./views/signup.ejs
Login form: ./views/login.ejs
./config/passport.js
./routes/users.js
Schema: ./models/users.js
Implement any helper other helper functions in ./controls/functions.js
Currently the input/output box is in right of the code editor, shift them to the bottom, including the submit button like https://codechef.com/ide , it'll look better.
The submission schema should look like:
username: String,
qID: Number,
subID: Number,
code: String,
language: String,
verdict: String,
time: Number,
memory: Number,
isVisible: Boolean,
timeStamp: Date,
tc: [{ status: String, time: Number, memory: Number }]
The subID will be 1 + total no of submissions till now. URL: http://localhost:3000/submit/:qID
Change the existing navbar with the materializedcss navbar, so that it looks good.
Add Google firebase JS integration and make a login/signup API with a proper database of users on firebase itself, it should be able to do google and facebook signup as well.
Add a check to match the text of Password
and Confirm Password
field. Display the error if the match fails.
Add the social media signups support using passport.js
The login/signup page should be connected to the firebase API so that the signup/login form should be sent to the API for the credential verification. After login/signup the login status should should change and should redirect to the homepage.
Currently, there is just the layout ready for displaying any particular problem details. Fetch the problem's data from the database and display on that page.
URL: http://localhost:3000/problem/:qID
ejs: problem_display.ejs
A global ranklist should sort the users based on a few parameters like, how much questions he/she has solved, his/her accuracy, no. of submissions in each question. This can only be resolved after creation of a question database as user can only submit after that.
In the folder ./models
create a file named users.js
and export it as Users
. Here's the structure:
name: String
username: String
email: String
password: String
isAdmin: boolean
The homepage should provide a login/signup button (if not logged in) and a dashboard/profile button if logged in. The login status should be checked in with the Google firebase API, which is already implemented.
Create a page where the user can paste the code and submit it. As of now create this as an independent page. Afterward, this page will be linked to the specific problem by passing the problem code through the URL. It should have a code editor interface, dropdown to select the Lang/ Compiler and a submit button to submit the code finally. For reference, you can look at the CodeChef or Codeforces submit page.
Route: http://localhost:3000/admin/edit/:qID
The app is connected to the database: ./config/database.js
. Edit the problems to the database. The schema is in ./models/problems.js
and ./models/testcases.js
.
Basically, you'll have to implement the function: editQuestion()
in the file ./controls/admin.js
. You can add other helping functions there.
Scrape the running and upcoming contests from Codechef and Codeforces into the webpage at the route: http://localhost:3000/contests
The app signs out automatically after updating the password which shouldn't have been the case, the nav bar chages to signin/sign up instead of profile/signout.
Attach a link to the user's profile with their username on the rankings page.
Instead of custom CSS, use Materialized CSS as frontend framework for CSS elements, so that the app looks good.
Currently, there is no good information on the homepage. Make it more informative and look more attractive. Feel free to show your creativity ๐
URL: http://localhost:3000/
Create a user profile page layout. It should at least contain the following fields to show the user information: Name, Username, Email, Total soln submitted, Total AC, Total WA, Total TLE, a link to MySubmission page: http://localhost:3000/user/submissions (#41 ).
route: http://localhost:3000/user/profile
ejs file: ./views/profile.ejs
You can look at https://www.codechef.com/users/vishal_nnd0 for reference. Feel free to show your creativity ๐
Implement routing guards to prevent from accessing the following routes:
Currently, the table data is hard-coded. Display all the problems whose isVisible
is true in descending order of the qID.
URL: http://localhost:3000/problems/all
ejs: ./views/problem_set.ejs
route: ./routes/index.js
You can create js file in: ./public/js/problem_set.ejs
if necessary.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.