Skip to content

[Backend Intern] Auth System Setup - Nitesh Kumar - #4

Open
Nitesh-kumar27 wants to merge 4 commits into
koders-in:mainfrom
Nitesh-kumar27:backend
Open

[Backend Intern] Auth System Setup - Nitesh Kumar#4
Nitesh-kumar27 wants to merge 4 commits into
koders-in:mainfrom
Nitesh-kumar27:backend

Conversation

@Nitesh-kumar27

@Nitesh-kumar27 Nitesh-kumar27 commented Jun 27, 2025

Copy link
Copy Markdown

🚀 Backend Authentication System – Trading Platform

📌 Project Title

Core User Authentication System for a Trading Platform

👨‍💻 Developer

Nitesh Kumar
Role: Backend Intern


🧠 Overview

This project is a backend user authentication system built for a proprietary trading evaluation platform. It allows users to register, log in, reset their passwords, and securely access protected routes using JWT authentication.


🛠️ Tech Stack

  • Node.js
  • Express.js
  • MongoDB + Mongoose
  • JWT (JSON Web Tokens)
  • dotenv

📁 Folder Structure

backend/
├── controllers/          # Handles logic for authentication
├── routes/               # API routes (auth, user)
├── models/               # Mongoose schema for User
├── middleware/           # JWT verification middleware
├── config/               # DB connection setup
├── utils/                # Token utility functions
├── server.js             # Entry point
└── .env                  # Environment configuration

✨ Features Implemented

🔐 Authentication Endpoints

Endpoint Method Auth Required Description
/auth/register POST Register a new user
/api/auth/login POST User login and JWT generation
/auth/reset-password POST Request password reset
/auth/new-Password POST Set new password (with token)
/api/user/profile GET Get authenticated user profile
/ GET Health check route

✅ What I Have Done

  • 🏗️ Built a complete authentication system with user registration, login, reset password, and set new password flows.
  • 🔒 Implemented JWT-based authentication and route protection.
  • 🧩 Used MongoDB with a User model having fullName, email, password, and isEmailVerified fields.
  • 📂 Followed a modular project structure for controllers, routes, middleware, and config.
  • 🧪 Fully tested all endpoints using Postman. A collection file is included for reference.

🧪 API Testing

  • Used Postman to test all routes.
  • Included a full test flow:
    • Register → Login → Get Profile (JWT Protected)
    • Reset Password → Set New Password → Login Again
  • ✅ The Postman Collection file is included:
    • backend-task-User-Auth.postman_collection.json

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

Successfully merging this pull request may close these issues.

1 participant