Skip to content

Saadnadeemch/buckty-backend-springboot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Buckety Auth Service

A clean and modern Spring Boot authentication API with email verification, password resets, and JWT-based login — built to integrate easily into any application.

Java Spring Boot MongoDB JWT


📘 Overview

This project is a lightweight authentication service designed to plug into any modern application.
It follows a clean structure, takes advantage of Spring Boot’s latest features, and ships with email-based verification and password recovery built right into the flow.

The API exposes core auth operations in a simple, predictable way.
It also includes username/email availability checks so your frontend can give users instant validation.


🚀 Endpoints Overview

1. Register User

POST /api/auth/register
Creates a new user and sends an email verification link.


2. Login

POST /api/auth/login
Authenticates with email/username + password and returns JWT access + refresh tokens.


3. Verify Account

GET /api/auth/verify?token=...
Verifies email through a secure token.


4. Forgot Password

POST /api/auth/forgot-password
Sends a password reset link.


5. Reset Password

POST /api/auth/reset-password
Updates password using a valid reset token.


6. Resend Verification Email

POST /api/auth/resend-verification
Sends a new verification email for unverified users.


7. Check Username Availability

GET /api/auth/check-username?username=...
Returns true/false if the username exists.


8. Check Email Availability

GET /api/auth/check-email?email=...
Returns true/false if the email exists.


🧱 Tech Stack

  • Spring Boot (latest version)
  • Spring Security
  • JWT Authentication
  • MongoDB
  • Spring Mail (Gmail SMTP)
  • Spring Validation
  • Lombok

📦 Project Features

  • Email verification workflow
  • Password reset flow
  • Secure JWT access + refresh tokens
  • Clean controller/service/repository architecture
  • Validation using @Valid
  • Minimal, readable, maintainable code
  • Easy to connect with any frontend or mobile app
  • Straightforward config via application.yml

🔧 Setup

  1. Update your application.yml with:
    • MongoDB connection
    • SMTP credentials
    • JWT secrets
  2. Start MongoDB
  3. Run the Spring Boot application
  4. Test the API using Postman, Thunder Client, or any API tool

🏷️ Suggested GitHub Topics

Languages