A production-style User Management REST API built with Spring Boot, JWT Authentication, PostgreSQL, AWS EC2, AWS RDS, Docker, and GitHub Actions CI/CD.
- User Registration
- User Login with JWT Authentication
- Password Encryption using BCrypt
- User CRUD Operations
- Pagination and Sorting
- Global Exception Handling
- Swagger/OpenAPI Documentation
- PostgreSQL Database Integration
- Docker Support
- AWS EC2 Deployment
- AWS RDS PostgreSQL Database
- GitHub Actions CI/CD Pipeline
Client
│
▼
Spring Boot REST API (AWS EC2)
│
▼
PostgreSQL Database (AWS RDS)
Git Push
│
▼
GitHub Actions
│
▼
Build & Test
│
▼
Deploy to AWS EC2
│
▼
Spring Boot Application
│
▼
AWS RDS PostgreSQL
- Java 21
- Spring Boot 3
- Spring Security
- Spring Data JPA
- Hibernate
- JWT Authentication
- PostgreSQL
- AWS RDS
- Docker
- GitHub Actions
- AWS EC2
- Swagger OpenAPI
git clone https://github.com/krishna9786/springboot-user-service.git
cd springboot-user-serviceUpdate:
spring.datasource.url=
spring.datasource.username=
spring.datasource.password=./mvnw spring-boot:run- EC2 Instance
- Amazon Linux 2023
- PostgreSQL RDS
- Security Groups
- GitHub Actions CI/CD
./mvnw clean packagejava -jar target/user-service-0.0.1-SNAPSHOT.jar| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/register | Register User |
| POST | /auth/login | Login User |
| Method | Endpoint | Description |
|---|---|---|
| GET | /users | Get All Users |
| GET | /users/{id} | Get User By ID |
| PUT | /users/{id} | Update User |
| DELETE | /users/{id} | Delete User |
Swagger UI:
http://13.51.169.147:8080/swagger-ui/index.html
OpenAPI Docs:
http://13.51.169.147:8080/v3/api-docs
GitHub Actions automatically:
- Builds the application
- Runs tests
- Creates JAR artifact
- Deploys to AWS EC2
- Restarts the application
GitHub: https://github.com/krishna9786LinkedIn: www.linkedin.com/in/krishna9786