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

Proposal: Migrating Backend from Go to Node.js with Complete Authentication Implementation #6

Open
Hamza1821 opened this issue Dec 10, 2024 · 1 comment

Comments

@Hamza1821
Copy link

Proposal: Migrating Backend from Go to Node.js with Complete Authentication Implementation

Dear Maintainers,

I propose migrating the backend of Debate AI from Go to Node.js to enhance seamless integration with the React-based frontend, leverage ecosystem synergy, and simplify development workflows.


Why Migrate to Node.js?

  1. Frontend-Backend Synergy

    • Both React and Node.js use JavaScript, promoting consistency and reducing context-switching for developers.
  2. Improved Development Velocity

    • Node.js offers extensive libraries and frameworks like Express, making backend development faster and more efficient.
  3. Community and Ecosystem

    • Node.js has a vast ecosystem of modules, active community support, and frequent updates, ensuring long-term sustainability.
  4. Scalability

    • With non-blocking, event-driven architecture, Node.js is highly suited for real-time and high-concurrency applications like Debate AI.

Proposed Scope of Work

  1. Backend Migration to Node.js

    • Set up a Node.js backend using Express.js or Nest.js for a robust and scalable server architecture.
    • Port existing backend structure, preserving functionality while simplifying code for maintainability.
  2. Authentication Completion

    • Implement email-based authentication using JWT for session management.
    • Add features for secure password storage (e.g., bcrypt) and email verification.
    • Database integration for user storage (e.g., MongoDB, PostgreSQL, or database as per maintainer's choice).
  3. API Design Alignment

    • Ensure APIs follow RESTful principles and are aligned with frontend requirements.
    • Document the API endpoints for easy integration and future development.
  4. Enhancements for Future Expandability

    • Include middlewares for logging, error handling, and input validation.
    • Set up a scalable folder structure, making the codebase modular and extendable.

Technical Stack

  • Backend Framework: Node.js (Express.js or Nest.js).
  • Database: Based on maintainer's choice (e.g., MongoDB, PostgreSQL, MySQL).
  • Authentication: JWT-based with bcrypt for password hashing.
  • Email Integration: Nodemailer or similar for email verification.
  • Development Tools: ESLint, Prettier, and PM2 for code quality and runtime monitoring.

Benefits of This Migration

  • Unified Tech Stack: Simplifies hiring, onboarding, and collaboration for developers.
  • Enhanced Developer Experience: Easier debugging and faster iteration due to shared JavaScript ecosystem.
  • Future-Proofing: Positions Debate AI for easier feature expansion and maintenance.

If assigned this issue, I will:

  1. Migrate the backend structure to Node.js, ensuring feature parity with the current Go implementation.
  2. Complete email-based authentication and database integration with best practices.
  3. Collaborate closely with the team to ensure alignment with project goals.

I am confident in delivering a robust, scalable, and developer-friendly backend to support Debate AI's mission.

Looking forward to your feedback!

Best regards,
@Hamza1821

@psidh
Copy link

psidh commented Dec 10, 2024

btw, GoLang is more performant than Node.js.

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

No branches or pull requests

2 participants