Skip to content

Secure Spring Boot REST API using JWT authentication with RSA keys, built with Clean Architecture, JPA, Flyway, and Spring Security.

Notifications You must be signed in to change notification settings

pietroBragaAquinoJunior/spring-boot-security-jwt-rsa-clean-arch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Security Clean Architecture API

REST API built with Spring Boot, focused on JWT-based authentication and RSA security, following Clean Architecture (Ports and Adapters) principles, with strong emphasis on security, maintainability, and scalability.


🧱 Architecture

  • Clean Architecture (Ports and Adapters / Hexagonal)
  • Business rules isolated from frameworks and security infrastructure
  • Clear separation between domain, application and adapters
  • Security implemented as an external concern

⚙️ Tech Stack

  • Java
  • Spring Boot
  • Spring Security
  • JWT
  • RSA (Asymmetric Cryptography)
  • JPA (Hibernate)
  • Flyway
  • MapStruct
  • Spring Validation

🚀 Key Highlights

  • JWT authentication with RSA key pair signing and verification
  • Stateless security configuration using Spring Security
  • Clean Architecture implementation
  • Global exception handling with @RestControllerAdvice
  • Request validation using Spring Validation
  • Database versioning with Flyway

▶️ Running locally

git clone https://github.com/pietroBragaAquinoJunior/spring-boot-security-clean-architecture
cd spring-boot-security-clean-architecture
./mvnw spring-boot:run

About

Secure Spring Boot REST API using JWT authentication with RSA keys, built with Clean Architecture, JPA, Flyway, and Spring Security.

Topics

Resources

Stars

Watchers

Forks

Languages