AbigaelWairimu / Developer-Learning-Paths

https://developer-learning-paths.vercel.app
MIT License
5 stars 3 forks source link

Add functionality to the sign-in and sign-up buttons #4

Open AbigaelWairimu opened 1 month ago

AbigaelWairimu commented 1 month ago

Currently, our sign-in and sign-up buttons are static and do not perform any actions when clicked. We need to add functionality to these buttons to allow users to create an account and sign in to our application.

Tasks:

  1. Frontend Form Validation: Implement client-side validation for the sign-in and sign-up forms. This includes checking if the input fields are not empty, the email is in the correct format, and the password meets your complexity requirements.

  2. Backend Authentication: When the form is submitted, send a request to your backend server with the user's input. The server should then verify these credentials against your user database. If the credentials are valid, the server should return a session token or similar method of keeping the user signed in.

  3. Error Handling: If the server returns an error (for example, if the credentials are invalid), display an appropriate error message to the user.

  4. Success Handling: If the server returns a success message, update the UI to reflect that the user is signed in. This could involve changing the sign-in button to a sign-out button, displaying the user's name, or redirecting to a different page.

Acceptance Criteria:

  1. User can enter their email and password into the sign-in form and click the sign-in button to sign in.

  2. User can enter their email, password, and password confirmation into the sign-up form and click the sign-up button to create an account.

  3. If the user enters invalid input, they should see an error message explaining what is wrong.

  4. If the user successfully signs in or signs up, the UI should update to reflect their signed-in status.

j3rryl commented 1 month ago

Good afternoon Abby, Not to force you down the frameworks path, lol, but is there a reason why you opted out for this project? Lastly, is there a backend for this project or API endpoints? I'll be glad to help regardless! Cheers!

AbigaelWairimu commented 1 month ago

Hello Jeremy, I'm not that well-versed with front-end frameworks. That's why I chose vanilla Js for this project. Also, this project has no backend, and your contribution is highly appreciated.

On Wed, May 15, 2024 at 1:25 PM Jeremy Munroe @.***> wrote:

Good afternoon Abby, Not to force you down the frameworks path, lol, but is there a reason why you opted out for this project? Lastly, is there a backend for this project or API endpoints? I'll be glad to help regardless! Cheers!

— Reply to this email directly, view it on GitHub https://github.com/AbigaelWairimu/Developer-Learning-Paths/issues/4#issuecomment-2112138988, or unsubscribe https://github.com/notifications/unsubscribe-auth/BABH42Q47M3KJFSRVPBW7NDZCMZ3LAVCNFSM6AAAAABHVSZDA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJSGEZTQOJYHA . You are receiving this because you authored the thread.Message ID: @.***>

j3rryl commented 1 month ago

This is well noted. I would recommend you look at a framework or perhaps you already are lol. I noticed this is a big awesome project. So there are some aspects such as the navigation, which have been replicated on all the pages in the repository. It kind of makes maintenance a bit hard, as imagine if you remove one item from the navbar, then you have to remove in the 20 html files or so, as well as adding new items. I am not hating in any way believe me. This is an awesome project you have, just asking you to look at it from other angles in terms of scalability, once you have to accompany user needs, even if just a pet project. Lastly are there plans to have a backend? I would love to tackle this open issue, but would still like to follow your lead, perhaps implementation ideas you had. It will be easier hence to implement the registration and login functionalities as well as tracking the state once this is established (imo 😁). If plans are in place kindly add me to that so that I may help :) . Kind regards, Jeremy.

AbigaelWairimu commented 1 month ago

I have noticed these issues and it's hectic to change every html page. When I had the idea I decided to work with what I knew (HTML, CSS, JS) but I am open to going the framework way. At the moment, I'm practicing React.

I do have plans for the back-end. I'd like to implement authentication and authorization and users should be able to register, login, and logout. I'd like to implement a search functionality where users should be able to search for courses. I'd also like to add a functionality where users should be able to track their progress.

And no, it's not a pet project. I have big plans for this project.

I'd really appreciate your contribution

On Thu, May 16, 2024 at 12:12 PM Jeremy Munroe @.***> wrote:

This is well noted. I would recommend you look at a framework or perhaps you already are lol. I noticed this is a big awesome project. So there are some aspects such as the navigation, which have been replicated on all the pages in the repository. It kind of makes maintenance a bit hard, as imagine if you remove one item from the navbar, then you have to remove in the 20 html files or so, as well as adding new items. I am not hating in any way believe me. This is an awesome project you have, just asking you to look at it from other angles in terms of scalability, once you have to accompany user needs, even if just a pet project. Lastly are there plans to have a backend? I would love to tackle this open issue, but would still like to follow your lead, perhaps implementation ideas you had. It will be easier hence to implement the registration and login functionalities as well as tracking the state once this is established (imo 😁). If plans are in place kindly add me to that so that I may help :) . Kind regards, Jeremy.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

j3rryl commented 1 month ago

This is good to hear to Abby, If you are still learning React or at least grasped some core functionalities, could I suggest Project Based Learning. I am not an expert or anything of that sort either, still learning as well. Anyway if you do not mind using React, could I ask if it would be possible to migrate this to React, probably in a separate branch, or if you wish another repo. Then once everything is stable, make it the main. Once more, I wish to follow your lead, so as to not interfere with plans you had for the project earlier, considering you also wish to learn. As for the backend, I wished to know what technology stack you wished to use and probably the workplan. Is it finishing the frontend bit first then moving to the backend or some sort of parallel development? Cheers!