oxiton-foundation / click-metrics

Click Matrics is a powerful URL shortening and analytics platform designed to streamline the process of generating short URLs, creating QR codes, and tracking detailed analytics for each link.
https://click-metrics.vercel.app
MIT License
30 stars 42 forks source link

Feature:Implemented User Model and Authentication Routes (Login & Register) with Zod Validation #189

Open ManpreetSingh18 opened 5 months ago

ManpreetSingh18 commented 5 months ago

Related Issue(s)

Description

This pull request aims to implement user authentication for our backend project, including user register and LogIn functionalities. The implementation includes creating a User model, setting up authentication routes, and using Zod for input validation.

Key Features:

Changes Made

Screenshots (if applicable)

https://github.com/oxiton-foundation/click-metrics/assets/72294811/57b1b0ee-9d75-4a2e-8f26-bbf24eaae1ae

When user with same email already exist Screenshot 2024-06-22 130624

N/A

Checklist

github-actions[bot] commented 5 months ago

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our #24. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

ManpreetSingh18 commented 5 months ago

@Swarnendu0123 can you please review this PR?

Swarnendu0123 commented 5 months ago

I have mentioned it multiple times that we are going to use firebase for authentication. We don't need this.

ManpreetSingh18 commented 5 months ago

@Swarnendu0123 I mentioned it before getting it assigned and you assigned it after my message stating the same Mongo db is mentioned in issue and also in the issue itself mongo db is mentioned . Additionally, the documentation includes MongoDB as well. Screenshot 2024-06-27 184105

Swarnendu0123 commented 5 months ago

We will be using mongodb but not for the authentication. We will be using mongodb to store generated links and qrs. We will not store mongodb to store users.

ManpreetSingh18 commented 5 months ago

@Swarnendu0123 ok, I will use Firebase. Now I am supposed to do everything mentioned in issue but in Firebase please check the video. You want that type of work in Firebase. Please confirm same?

Swarnendu0123 commented 5 months ago

I am planning to use the authentication service provided by firebase in this.

ManpreetSingh18 commented 5 months ago

@Swarnendu0123 Here is the updated version of the code

https://github.com/oxiton-foundation/click-metrics/assets/72294811/848bd419-bd70-4cd0-95ee-c31101ffa4ac

ManpreetSingh18 commented 5 months ago

Please review and label this PR @Swarnendu0123 .

ManpreetSingh18 commented 4 months ago

@Swarnendu0123 any update???

Swarnendu0123 commented 4 months ago

Btw you are trying to implement server side firebase authentication. But firebase is actually designed such a way, that we can use it directly on the client. So we are trying to implement it on the client side.

ManpreetSingh18 commented 4 months ago

I agree with you but according to #189 opened there, it is mentioned explicitly to use it this way. So I have done it according to the issue. @Swarnendu0123

Swarnendu0123 commented 4 months ago

Unfortunately, our development process doesn't allow us to have firebase on the server side.

ManpreetSingh18 commented 4 months ago

@Swarnendu0123 Could you please clarify the details of issue #189? Multiple changes have been made due to a communication gap, and a clear and in depth description would help resolve it effectively for frontend am I supposed to use tailwind CSS?

Swarnendu0123 commented 4 months ago

@Swarnendu0123 Could you please clarify the details of issue #189? Multiple changes have been made due to a communication gap

I have clearly mentioned to use firebase for authentication. But I don't want to see a large change in a single PR. If you want to integrate firebase in click matrics, first implement the auth. Then the database using mongodb. Now the firebase is made for the client side not the server side. So use it in the client side. Use MongoDB in server side.

for frontend am I supposed to use tailwind CSS?

We are already using tailwind, you should continue with that only!

Swarnendu0123 commented 4 months ago

Also don't tag maintainers multiple times. We understand and respect your contribution in our community, but you don't need to mention any maintainers. We will see and respond by ourselves.