Giter VIP home page Giter VIP logo

samplek / alcoding-web-portal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pes-alcoding-club/alcoding-web-portal

0.0 2.0 0.0 16.22 MB

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.

License: MIT License

JavaScript 97.96% CSS 0.33% HTML 0.22% Python 1.44% Shell 0.05%

alcoding-web-portal's Introduction

Data Analysis Project

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.

Requirements

npm install

Instructions

Production mode:

npm start

Development (Webpack dev server) mode:

npm run start:dev

Note

  1. Make sure to add a config.js file in the config folder. See the config.example.js under config/ directory for more details.
  2. Generate and add ssl files in the server/ directory under a folder named sslcert. To genrate certificates, navigate to the server/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.

Steps to create the first user (an admin user)

  1. Replace line 14 in server/routes/api/admin.js by the following
    app.post('/api/admin/signup', function (req, res) {
  1. Make a POST request using any REST API client to http://localhost:8080/api/admin/signup with the body as { "usn": "admin", "firstName": "YourName" }

  2. Using Mongo Compass, change the role of the created user to admin.

  3. Undo changes to server/routes/api/admin.js.

  4. Run the server.

  5. Log in using admin credentials. ( username = "ADMIN", password = "ADMIN" )

Steps to add new users

  1. Using an admin account, access localhost:8080/admin page. Upload a csv file containing new users in the format "firstName, email, usn".
  2. Default password is USN (in uppercase) for all users.

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.