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

Admin backend #435

Merged
merged 5 commits into from
Nov 10, 2024
Merged

Admin backend #435

merged 5 commits into from
Nov 10, 2024

Conversation

ShivanshPlays
Copy link
Contributor

@ShivanshPlays ShivanshPlays commented Nov 10, 2024

#430

PR Justification for Level 3

Summary

This PR enhances the admin infrastructure by introducing a dedicated table for admin data, backend API routes for streamlined authentication, and comprehensive error handling. These updates focus on improving the admin authentication flow, ensuring a reliable and secure experience. Additionally, minor backend issues were resolved to further stabilize the application.


Key Enhancements

1. Added Table for Admin Infrastructure

  • Objective: Establish a separate database table for storing and managing admin-specific data, supporting a structured approach to admin functionalities.
  • Implementation:
    • Created a dedicated table for admin data, enabling secure and organized storage of information unique to admins.
    • Ensured unique constraints and data integrity measures are in place, safeguarding against duplicate entries and unauthorized access.

2. Backend API Routes for Admin Authentication

  • Objective: Provide a smooth and secure experience for admin users during login and account creation.
  • Implementation:
    • Introduced dedicated backend API routes specifically for admin login and account creation, separating them from regular user authentication routes.
    • Integrated logic to handle authentication for admins with added security checks, ensuring that only authorized personnel can access admin functions.
    • Verified that admin-specific sessions and permissions are securely managed, maintaining the integrity of restricted areas in the application.

3. Comprehensive Error Handling

  • Objective: Improve the robustness of the admin authentication process by adding detailed error handling for various scenarios.
  • Implementation:
    • Incorporated full error handling across all new admin routes, providing specific and actionable feedback for common issues (e.g., invalid credentials, duplicate entries).
    • Used structured error messages to simplify troubleshooting for admins and provide clarity on authentication issues.
    • Logged errors systematically to aid in future debugging and to maintain transparency in the admin authentication process.

4. Resolution of Minor Backend Issues

  • Objective: Ensure backend stability by addressing minor issues that were affecting overall functionality.
  • Implementation:
    • Reviewed and fixed minor bugs and inconsistencies in the backend, improving the reliability and performance of existing features.
    • Conducted tests to confirm that the backend operates smoothly after implementing these changes, further reinforcing the application’s stability.

Points Justification

This PR meets the 40-45 points level due to the following contributions:

  • Enhanced Admin Infrastructure: Established a structured database and API foundation for admin functionalities, laying the groundwork for future expansions.
  • Improved Admin Authentication Flow: Introduced secure and dedicated backend routes for admin login and account creation, enabling a smooth experience.
  • Comprehensive Error Handling: Integrated detailed error handling, ensuring clear and actionable feedback for admins.
  • Increased Backend Stability: Resolved minor backend issues, strengthening the application’s performance and reliability.

Conclusion

This PR provides substantial improvements to the admin experience by adding structured infrastructure, secure authentication routes, and robust error handling. These updates contribute to a more stable and secure application, enhancing both the functionality and maintainability of the backend.


Screenshots/Video (mandatory)

Untitled.video.-.Made.with.Clipchamp.3.mp4

Checklist:

  • I have mentioned the issue number in my Pull Request.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have created a helpful and easy-to-understand README.md if it's a new page/tech stack.
  • I have gone through the contributing.md file before contributing.

Additional context (Mandatory):

Are you contributing under any Open-source programme?

  • I'm a GSSOC-EXT contributor
  • I'm a HACKTOBERFEST contributor

Copy link

netlify bot commented Nov 10, 2024

👷 Deploy request for bitbox-in accepted.

Name Link
🔨 Latest commit f0fb36b
🔍 Latest deploy log https://app.netlify.com/sites/bitbox-in/deploys/67308abadb51260008bf7eee

Copy link

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 chaotic CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@Anuj3553
Copy link
Collaborator

Here are some conflicts can you check @ShivanshPlays

Screenshot_2024_1110_112351

@ShivanshPlays
Copy link
Contributor Author

resolved confilcts...

@ShivanshPlays ShivanshPlays reopened this Nov 10, 2024
@ShivanshPlays
Copy link
Contributor Author

@Anuj3553 all conficts has resolved

@Anuj3553 Anuj3553 merged commit 84bdc78 into Bitbox-Connect:main Nov 10, 2024
@Anuj3553
Copy link
Collaborator

Well done @ShivanshPlays

Copy link

🎉🎉 Thank you for your contribution! Your PR #435 has been merged! 🎉🎉

@Anuj3553 Anuj3553 self-requested a review November 10, 2024 10:38
@Anuj3553 Anuj3553 added gssoc-ext Extended contribution for GSSoC hacktoberfest-accepted Eligible contribution for Hacktoberfest rewards level3 Advanced or complex contribution/task hacktoberfest Open-source contribution during October for GSSoC labels Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc-ext Extended contribution for GSSoC hacktoberfest Open-source contribution during October for GSSoC hacktoberfest-accepted Eligible contribution for Hacktoberfest rewards level3 Advanced or complex contribution/task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants