Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kitarp29 added registration system and backend #13

Merged
merged 1 commit into from
Dec 13, 2020
Merged

kitarp29 added registration system and backend #13

merged 1 commit into from
Dec 13, 2020

Conversation

kitarp29
Copy link
Contributor

issue #5
Hey, @shrinish123 I implemented an email register and login system in the repo.
I made the system in Mongo DB, though the DB, for now, is an offline one.
You can create a Mongo DB with your Id and easily connect it with the app.
For testing purposes, you can clone the repo and start MongoDB offline. Here .
If you want to make a MongoDB online and connect it Here, Create the cluster and replace this mongodb://localhost:27017/userDB with your URL.
The UI/UX is not that great but still fulfills the purpose.
Things I implemented-

  • Installed Mongoose and created the userschema for the DB
  • Added ejs as it is an easier and faster way to transfer variables among pages via server.
  • Made three pages home, register, and log in.

More things to work on -

  • Better UI/UX that some Frontend can handle (add CSS file in the /public folder)
  • The user Passwords are not encrypted in the DB right now. If needed I can work on it as well
  • OAuth by various modes can be applied, I can work on it but that's an issue of privates keys

ScreenShots-
image
image
image

@shrinish123
Copy link
Owner

Great, your work is indeed awesome, thanks a lot for your contribution, I am merging your PR.

@shrinish123 shrinish123 merged commit 024bef6 into shrinish123:main Dec 13, 2020
@shrinish123
Copy link
Owner

I tested your work and I see there is no validation like the same user can register more than 1 time and also if the user has not registered and tries to login it does not show errors neither it consoles it to the log. The screen just keeps loading and most important after registering and joining the room the chat app doesn't work, mostly because you out the socket code in the app.get('/index.js) which is the wrong place to put it up .

So for now I am reverting back your pull request and hoping that you improve all the errors

@kitarp29
Copy link
Contributor Author

Hey @shrinish123
I am pretty sure that the user cannot register with the same email id multiple times.
The mongoose driver takes care of it. Yes , I might have to add console mssgs or some error mssg pop up for user.
I will include that.
Yes the index.js can be accessed even without registering, I will take of it in the next PR.
I have one Question though where to put the socket code ? if not in the index.js
As soon as you clear out my this query I will work on the rest of the stuff and generate a new PR

@shrinish123
Copy link
Owner

database error

This is an image from my database login which clearly shows that multiple registrations form the same user are possible,
Also, there is some problem with the login part. like it's not that you have not added console messages to log the error but even after you have the error message o log it does not do so and the screen just keeps on loading.

And about where to put the socket code, I will research this and get back to you. All the Best

@kitarp29
Copy link
Contributor Author

kitarp29 commented Dec 16, 2020

Ok, I can take care of that. In the userschema I will set email as unique.
Please let me know about the socket code placement though.
I will work on these issues.
This is a similar Project of mine So I will make sure this thing works (PS: the project is still in development so ignore the comments)
https://intense-beach-81824.herokuapp.com/
Since I am focusing on this project can you take care of my id evaluations n Kwoc?
@shrinish123

@shrinish123
Copy link
Owner

I will tell you about the socket code by tonight
And about the comments on your project, bingo even I use the same comments for my testing :)
I didn't understand by taking care of id evaluations of GSoC and what you mean to say, but if you are worried about the mid evals, you need to only have 1 pull request, so for that just make a login page and register page nonfunctional only the frontend( HTML CSS) and make a pull request and I will merge it so that for the next part you can work on the backend peacefully but please take time and do it with proper care

@kitarp29 kitarp29 mentioned this pull request Dec 17, 2020
@kitarp29
Copy link
Contributor Author

Hey, @shrinish123 Sorry I got occupied with college exams.
What about the Socket code??
Where to keep them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants