A web application built using MERN (MongoDB, Express.js, React.js, Node.js) full-stack framework. This project is developed for the students and professors of the CS&E department, PES University and is developed by the members of The Alcoding Club, PES University. The web app enables student to view their ranking among other students in global competitive coding competitions, helps them build a public profile, submit course related assignments and view their submissions.
npm installProduction mode:
npm startDevelopment (Webpack dev server) mode:
npm run start:dev- Make sure to add a
config.jsfile in theconfigfolder. See theconfig.example.jsunderconfig/directory for more details. - Generate and add ssl files in the
server/directory under a folder namedsslcert. To genrate certificates, navigate to theserver/sslcert/directory and execute the following command.
openssl req -x509 -out server.crt -keyout server.key \
-newkey rsa:2048 -nodes -sha256 \
-subj '/CN=localhost' -extensions EXT -config <( \
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")This should generate two files, server.key and server.crt.
- Replace line 14 in
server/routes/api/admin.jsby the following
app.post('/api/admin/signup', function (req, res) {
-
Make a
POSTrequest using any REST API client tohttp://localhost:8080/api/admin/signupwith the body as{ "usn": "admin", "firstName": "YourName" } -
Using Mongo Compass, change the role of the created user to
admin. -
Undo changes to
server/routes/api/admin.js. -
Run the server.
-
Log in using admin credentials. ( username = "ADMIN", password = "ADMIN" )
- Using an
adminaccount, accesslocalhost:8080/adminpage. Upload a csv file containing new users in the format "firstName, email, usn". - Default password is USN (in uppercase) for all users.