Giter Site home page Giter Site logo

namanl2001 / mern-gurujii-dev Goto Github PK

View Code? Open in Web Editor NEW
36.0 4.0 85.0 2.07 MB

⭐️ Helps! in finding Tutors.

Home Page: https://guru-jii.herokuapp.com/

License: MIT License

JavaScript 81.11% HTML 2.78% CSS 16.04% Shell 0.07%
mern-stack-development mongodb expressjs reactjs node-js

mern-gurujii-dev's People

Contributors

aakankshashah avatar abhay27chauhan avatar akshay1027 avatar ankita297 avatar chitvanramani22 avatar dsnehasish74 avatar gaurav879 avatar jain-rishabh-21 avatar kajalsinghbaghel avatar kanak22 avatar khareyash05 avatar mitalirs avatar muditxofficial avatar namanl2001 avatar navya-amarneni avatar nikitakapoor1919 avatar rohan-kulkarni-25 avatar sagar-barapatre avatar samridhi-98 avatar shikhar15606 avatar shubhamsj07 avatar sohan2410 avatar ssaksham avatar subham142 avatar swahim avatar tend2infinity avatar thebeginner86 avatar udaymittal7 avatar vaibhav-afk avatar vanshika2906 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mern-gurujii-dev's Issues

Backend Code Refactoring

Currently, the controller functions for the routes are written inside the route definitions.
Eg:

router.route("/").get((req, res) => {
  User.find()
    .then((users) => res.json(users))
    .catch((err) => res.status(400).json("Error: " + err));
});

A good practice is to have a directory named controller or handler that where these controller functions go in and the route definitions have calls to these controller functions. This is all related to code modularity.
The equivalent route definition will look like

router.route("/").get(fetchUsersController);

If approved of, I would like to work on this issue myself.

Updating README.md

The current README doesn't fully specify how to open and run the project after cloning it. Some changes are required in README to fully specify it. Let me work on it.

Removing default value on expanding Subject and class

Describe the bug
On expanding the subject selection dropdown, I think the item "Open this to select subject" should not appear.

Expected behavior
On expanding the dropdown, I expect to see only the subjects i.e Physics, Chemistry, and Maths.

Current behavior:
image

Expected behavior:
image

404 Page

When The server is down, we can create a 404 page displaying in the UI that it's internal problem and show that with a proper user interface.

Units Tests for backend

Unit testing involves testing individual components of the software program or application. The main purpose behind this is to check that all the individual parts are working as intended. A unit is known as the smallest possible component of software that can be tested.
The task would be to add unit tests for the backend, you can prefer jest to write your unit tests. This issue can be resolved using multiple PR's. And multiple people can work on this, so directly asking for assigning it to you, have a look in the backend codebase to find the component, for which you would like to add the unit test. And also verify in the comment section below to check if anyone working on it already to prevent duplicate efforts. I'll not be assigning this issue to anyone individually, if no one is working on that component feel free to take it up and make a PR, but before starting don't forget to mention it in the comments. Points will be awarded on the basis of PR(s).
Thanks.

Incorrect instructions in readme

Describe the bug
While working on a feature, I was following instructions in the readme to run the app locally. The repository's readme mentions under the note section that:

For security reasons we have made the MongoDb URI secure, by not adding a hardcoded username and password. For development purpose, you can install, MongoDB locally or use the online version.
Comment line number 6,7,22 in backend/server.js.

After PR #77, there were changes in the server.js file and line 6, 7, 22 point to incorrect locations and commenting out these three lines cause a whole lot of bugs.

Expected behavior
The documentation should be updated with the lines to be commented out.

Additional suggestion
Many repositories provide with e .env.example or .config.example file where there are placeholders or keys listed, whose values can be then be provided privately by individual contributors rather than ignoring the environment and configuration variables totally.

Header Improvement

Would like to improve the header and make it static, as its not visible when scrolling down. Please assign this to me under GSSOC'21. Thanks :)

Add filter by name

After filtering data for a particular pin-code, a filter to search profile by teacher's name could be useful, at the user end.

Auto closeable Alert

This Alert is not auto closable.
image

Can I add auto closeable feature here? Please assign be this task.

Footer

We have to change or Rebuild Footer its looks very simple.
We have to make it attractive and add some links and tags and much more.
Please have a look on it.

Home Page UI

Describe the feature you'd like to add
We can change the UI of the Home Page Banner and Make it more attractive like modern sites.

Describe how you will do it
I am talking about a design nearly like this. We can change the SVG and make this even more attractive.
Screenshot (543)

Additional context
If you like this then please assign this work to me .

Animation in cards view

I was thinking of some animation which zooms from 0% to 100%. If you have any other animation idea feel free to discuss.

SignIn page then contents

May be we can first authenticate the user by either signup/ signin then and then only we'll show the contents of our website.
Screenshot 2021-02-06 at 11 13 18 PM

Here we are asking to sign in through google and the anonymous user can see the complete website without sign-in .
So what I think we can do is in the homepage we will directly prompt the user to first signup/signin, then and then only we'll authenticate them to see the contents of the website.

Let me know if you find this interesting.

Add contributing.md

We we'll need to create a contributing.md file in project directory where we can give all the details about how to create an issue with a particular template as well as while creating a PR.

Teachers page

Maybe what i am thinking is if we can build a page in the website (button will be besides the google sign in button) where we can call the teachers who are willing to teach.
for example User is already signed-in, then If the user wants to teach instead of studying then we'll open a portal for them as in where they can register themselves for teaching for that particular pincode where he wants to teach. So that many teachers will be able to join that community and learning a fun process.

Again let me know if you find this interesting..

Add home tutor and external tutor options

Add home tutor and external tutor options
Tutions may be at home also and outside also.So there should be two options: one for home tutor and one for tution at another space.
I would like to work on this as a part of GSSOC'21.Please /assign this to me

Navbar

We have to make the navbar more attractive. its looks very old.
Like we have to use bootstrap and CSS and javascript more on that.

Remove warnings

In Javascript '===' is used to compare values as well as data type. In our project when we start the server there are various warnings that needed to be removed.

./src/components/form.jsx
[1]   Line 51:29:  Expected '===' and instead saw '=='  eqeqeq
[1]
[1] ./src/components/update.jsx
[1]   Line 51:29:  Expected '===' and instead saw '=='  eqeqeq
[1]
[1] ./src/store/reducer/user.js
[1]   Line 60:61:   Expected '===' and instead saw '=='  eqeqeq
[1]   Line 121:23:  Expected '===' and instead saw '=='  eqeqeq
[1]   Line 122:23:  Expected '===' and instead saw '=='  eqeqeq
[1]   Line 123:23:  Expected '===' and instead saw '=='  eqeqeq
[1]   Line 124:23:  Expected '===' and instead saw '=='  eqeqeq
[1]   Line 136:23:  Expected '===' and instead saw '=='  eqeqeq
[1]   Line 137:23:  Expected '===' and instead saw '=='  eqeqeq
[1]   Line 138:23:  Expected '===' and instead saw '=='  eqeqeq
[1]   Line 139:23:  Expected '===' and instead saw '=='  eqeqeq
[1]   Line 151:23:  Expected '===' and instead saw '=='  eqeqeq
[1]   Line 152:23:  Expected '===' and instead saw '=='  eqeqeq
[1]   Line 153:23:  Expected '===' and instead saw '=='  eqeqeq
[1]   Line 154:23:  Expected '===' and instead saw '=='  eqeqeq
[1]   Line 166:23:  Expected '===' and instead saw '=='  eqeqeq
[1]   Line 167:23:  Expected '===' and instead saw '=='  eqeqeq
[1]   Line 168:23:  Expected '===' and instead saw '=='  eqeqeq
[1]   Line 169:23:  Expected '===' and instead saw '=='  eqeqeq

Adding various security features

Setting various HTTP headers using helmet
Data sanitization against no SQL injection and XSS
Rate limiter so the server won't get overload

If you find it relevant, please assign me.

Dark Mode

It's not required now but in future we can implement the feature of dark mode on our website. So that user to toggle the button to switch to different themes.

Delete Backend README.md

The Backend README looks very unclean and is not organized. I have added the features that made it look polished and professional.
Kindly have a look at my PR and assign this issue to me. I have made the changes, please suggest any changes to my PR.
Previous:
image

Modified:

image

working with mongoose means working with promises

Proposal

if you are working with mongoose, means you are working with promises. So, you need to handle promise. This is an easy fix but good for long term.

I suggest instead of this:

  • mongoose.connect(url, {
    useNewUrlParser: true,
    useCreateIndex: true,
    useUnifiedTopology: true,
    });

You should do this:

`
const connectDB = async () => {

try{

        const conn = await mongoose.connect(URL, {useNewUrlParser: true, useUnifiedTopology: true});
        console.log(`MongoDB Connected: ${conn.connection.host}`)
}catch(err){

        console.log(err)
        process.exit(1)
}

}

connectDB();
`

It is good practice :)

Validation of create profile form

Describe the bug
Create profile form has no validation, also it needs a little UI enhancement like proper spacing between fields.

Expected behavior
A form should have proper validation, important fields need to be filled before submission.

Screenshots
form

adding a chotbot

Hello! I am a GSSOC'21 participant.

I observed that there is no chatbot in the website which needs to be there as there are lots of benefits of having chatbots like-
client engagement will be increased
service will also be increased
Its trending

There could be some person who would be replying the messages or some bot for faqs.
@Namanl2001

Unit tests for frontend

Unit testing involves testing individual components of the software program or application. The main purpose behind this is to check that all the individual parts are working as intended. A unit is known as the smallest possible component of software that can be tested.
The task would be to add unit tests for the frontend, you can prefer jest to write your unit tests. This issue can be resolved using multiple PR's. And multiple people can work on this, so directly asking for assigning it to you, have a look in the frontend codebase to find the component, for which you would like to add the unit test. And also verify in the comment section below to check if anyone working on it already to prevent duplicate efforts. I'll not be assigning this issue to anyone individually, if no one is working on that component, feel free to take it up and make a PR, but before starting don't forget to mention it in the comments. Points will be awarded on the basis of PR(s).
Thanks.

Missing rate limiting

HTTP request handlers should not perform expensive operations such as accessing the file system, executing an operating system command or interacting with a database without limiting the rate at which requests are accepted. Otherwise, the application becomes vulnerable to denial-of-service attacks where an attacker can cause the application to crash or become unresponsive by issuing a large number of requests at the same time.
A rate-limiting middleware should be used to prevent such attacks.

Example

The following example shows an Express application that serves static files without rate limiting:

var express = require('express');
var app = express();

 app.get('/:path', function(req, res) {
  let path = req.params.path;
  if (isValidPath(path))
    res.sendFile(path);
});

To prevent denial-of-service attacks, the express-rate-limit package can be used:

var express = require('express');
var app = express();

// set up rate limiter: maximum of 25 requests per minute
var RateLimit = require('express-rate-limit');
var limiter = new RateLimit({
  windowMs: 1*60*1000, // 1 minute
  max: 25
});

// apply rate limiter to all requests
app.use(limiter);

app.get('/:path', function(req, res) {
  let path = req.params.path;
  if (isValidPath(path))
    res.sendFile(path);
});

Changes to be done in backend/routes/users.js

Add a Pull request template

I would like to add a pull request template to this project. Kindly assign it to me as a part of GSSOC'21.

No need to use body-parser when using express version 4.16+

##Proposal

Express version 4.16+, their own body-parser implementation is now included in the default Express package so there is no need for you to download another dependency.

You have added a line to your code that looks like the following:

  • app.use(bodyparser.json());

If you are using Express 4.16+ you can now replace that line with:

  • app.use(express.json());

You also have the following code in your environment:

  • app.use(bodyParser.urlencoded({extended: true}));

You can replace that with:

  • app.use(express.urlencoded());

Randomization in profiles

Problem

Currently, the profiles of teachers who registered recently, are shown at the last.

Proposal

It would be nice to have some randomization in the data fetched from the backend, and then show it on frontend.

Improve README.md

We can improve the UI of the README.md so that setting up the project can be much more easy and will get more details about the project with a better UI

Add Mr. & Mrs. option.

I found one problem, that Mr is appearing before the name of the person, teacher can be female also. So we can make a selection dropdown with two options male/female before the name input field. If its fine could you assign this to me.

Using Docker to simplify the dev setup

Describe the feature you'd like to add
Using docker to set up the dev setup to simplify setting the dev env for the future users!

Describe how you will do it
Set up Docker

Additional context
NA

Removing arrows and adding lower limit for Filter PIN code input

Hey, I am Saksham Sharma, a GSSOC'21 participant. I am passionate about Data Structures and a full stack developer.
I think it would make more sense to remove arrows from the Filter Pin code input as it would be difficult for anyone to look for a 6 digit PIN code just by using the arrows.
Also, the lower limit of the input is not added, I want to fix that too.

Please assign this task to me.

@Namanl2001

New UI for the Cards

I would like to give a new UI for the Cards with some background, some animation and an attractive card
Please assign this to me under GSSoC 21'

Logo design

There is no logo for this project. If anyone has interest in logo designing could take this up.

Add Linting

Add linting and correct the present errors in the repo as suggested by eslint.
I am working on this issue

Change favicon

I want to add a different favicon for the website.
Please /assgn this to me as a part of GSSOC'21

Double column form

Problem

At present we have a single-column form for creating and editing users' profiles but it is quite small to contain all the input fields uniformly.

Proposal

It would be nice to have a double-column form to take the user inputs.

Add Pointer Cursor Property.

Hey, I am Saksham Sharma, a GSSOC'21 participant. I am passionate about Data Structures and a full stack developer.

My issues are:

  1. When the cursor hovers over the Dropdown button on the navbar, the cursor should be visible as a pointer.
  2. To remove the disabled button from the navbar.

Please assign these tasks to me.
@Namanl2001 @ChitvanRamani22

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.