feat: Improvement of Login and Sign-Up Page #101#185
feat: Improvement of Login and Sign-Up Page #101#185arnab9957 wants to merge 1 commit intoHarshYadav152:mainfrom
Conversation
|
@arnab9957 is attempting to deploy a commit to the Harsh Yadav's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
🎉 Thank you @arnab9957 for your first PR to SaveBook!
We really appreciate your contribution 🙌
What happens next:
- 🔍 Maintainers will review your PR
- 🧪 Automated checks will run
- ✨ Feedback may be shared if needed
Please confirm your PR includes:
- ✔️ Clear summary of changes
- ✔️ Linked issue (e.g., Fixes #123)
- ✔️ Steps to test
- ✔️ Screenshots (for UI changes)
📘 Contribution Standards:
👉 https://github.com/HarshYadav152/SaveBook/blob/main/CONTRIBUTING.md
💬 Stay Connected with Our Community
🎯 Discord (Official Communication)
For formal discussions, code reviews, and project updates:
👉 https://discord.gg/eMTePUK3gJ
💚 WhatsApp (Friendly Community)
For informal chats, quick help, and building friendships with contributors:
👉 https://chat.whatsapp.com/I8GYXd3mHlDCC2iXhNGeqV
🌟 Our Philosophy: We value both professional collaboration (Discord) and personal connections (WhatsApp). Join both to get the complete SS-Capture community experience!
Thanks for helping improve SaveBook 🚀
Let's build something amazing together! 💪
HarshYadav152
left a comment
There was a problem hiding this comment.
Under which open source program you came?
and want to get reviewd
Description
This PR revamps the Login and Sign-Up functionality to improve user experience and data completeness.
Enhanced Sign-Up Form: Added fields for Email, Full Name, Education, Course, Phone Number, and Subjects of Interest to capture comprehensive user profiles.
Robust Validation:
Implemented strict validation for:
Email: formatting (regex) and uniqueness.
Password: minimum length (6 characters) and complexity.
Username: type checking and uniqueness.
Improved Error Handling: specific error messages are now returned for different failure scenarios (e.g., "Username or Email already exists", "Invalid email format") to guide the user.
Backend Updates: Updated the User model schema and the /api/auth/register route to support the new fields and validation logic.
Fixes #101
Type of change
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected) -
Note: New fields like Email are now required.
How Has This Been Tested?
I rigorously tested the registration flow with various scenarios:
Valid Registration: Successfully created a new account with all fields filled (Email, Phone, Education, etc.). verified data persistence in MongoDB.
Duplicate User: Attempted to register with an existing username and email; verified that the system correctly rejected the request with a "Username or Email already exists" error.
Invalid Email: Tried registering with a malformed email address; confirmed it was rejected.
Weak Password: Attempted to use a password shorter than 6 characters; verified the validation error.
Missing Fields: Tried submitting without the now-mandatory email field; verified the request failed as expected.