Code Monkey home page Code Monkey logo

plexus-17's Introduction

Description

Plexus aims to be a one stop solution for all kinds of digital events like Quizes. It specially targets the yearly online events happening in our college. This platform will allow other societies to host their events without any friction or technical know-how.

styled with prettier

To Setup the Project for Development -

A. Setting Up the server -

  1. Install heroku-cli with npm i -g heroku-cli.
  2. Install nodemon with npm i -g nodemon.
  3. Run npm i to install the server-side dependencies.
  4. Run cp .env.example .env to create .env file, open it and fill the credentials.

B. Setting Up the client -

  1. Run cd client in separate terminal to change into client directory.
  2. In client directory run npm i to install client-side dependencies.
  3. In client directory run touch .env.

To Start Local Server -

  1. Run npm start to start backend server.
  2. Run npm run client to start frontend server.
  3. Run npm run test:watch to start the test watchers to test if something breaks.
  4. Navigate to http://localhost:3000 in the browser.

Guidelines

  1. First make an issue and then start working on it.
  2. Always make a separate branch in following format name-patch-#issueNo. Eg: aditya-patch-#62. (Words are separated by -).
  3. In the commit message do mention the issue no. Eg: fixes #1.
  4. Use proper code formatting. Run npm run format to make prettier format everything automagically.
  5. Run npm test to check if nothing has broken.
  6. Do mention if npm install is needed after merging the commit.

Note -

  1. Heroku Cli is used for handling environment variables and deploys.
  2. To get googleClientID and googleClientSecret make a new project at here and enable the Google+ api.
  3. To get facebookAppId and facebookAppSecret make a new app at here and add the facebook login product.
  4. If you don't have mongodb locally, then create a remote db here or you can download it from here
  5. Whenever you commit the code. Prettier runs and it formats the code. If any changes are made then do stage again and commit.

Technology Stack

  • Create-React-App (CRA)
  • Webpack
  • React
  • Redux
  • Node
  • Express
  • Mongodb / Mongoose
  • Tape
  • Prettier
  • Heroku

Project Maintainers

Other Contributors

plexus-17's People

Contributors

ankitjain28may avatar itaditya avatar kunalvishnoi avatar shubhmisaki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

kanup4m

plexus-17's Issues

Make middlewares usable as independent if-else functions

Many middlewares can be used inside if statements.
For eg - Take isAdmin

router.get('/users', isAdmin, () => {
})

Good but sometimes we need the isAdmin functionality inside the route controller. Thus reusing the middleware seems a good enhancement

Abstract the db calls to separate services

Make stand-alone services to interact with mongodb.
This is because most entities are interconnected, so it's very unlikely that only a single document will be accessed or modified.

Instead, changing one document of one collection would lead to change in one or more documents of other collections.

That is why abstracting away these mutliple queries into one single function, may lead to maintainable codebase

Remove identation inconsistency

The indentation value is set improperly. In many parts of the frontend, there are indentation of 2's and somewhere of 4's.

We would like to have indentation set to 2 everywhere.
Keep in mind about the fact that majority of code is jsx so if using a formatter configure it accordingly.

The frontend code is in client/ dir and hopefully most of the inconsistency also. However do check the whole project for it.
This could be a good way to understand the project structure and all the moving parts.

Add REST api to Create event

The create and manage functionality has many complicated conditions like who can create and who can edit.

But we can start it by first allowing the feature to admin only after that we'll work our ways to the other type of roles who can do this

Properly manage joi schema for different user roles

  • A user can't edit his role, verified etc.
  • Admin can change any user's role.

To properly remedy this, joi scheme should not allow the role key in case of user but definitely allow it in case of admin.

It should be taken care properly.

Pass param on which document is queried in get service

Currently, in the user.service get method, we use the _id attribute to fetch that user. However in many cases we will not be having that id, because recieved API call from client may not expose it (id in address bar will look ugly). So other attributes should be accepted also

Avoid husky from commiting

The current workflow is -

  • Make changes in code and stage them.
  • Create a commit
  • Now a precommit script runs which formats the code.
  • Then that unformatted code gets committed.
  • The formatted code has to be staged and committed again
  • Precommit script runs again, no changes in code occurs.
  • The formatted files then gets committed.
  • Now we can push the commits.

Add HMR to react

HMR i.e. Hot Module Replacement allows to only change one module which has changed without complete browser reload. Thus if state of one module is not changes if source code of another module changes.

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.