A secure and scalable authentication backend built with Java Spring Boot, featuring JWT-based authentication, BCrypt password hashing, PostgreSQL integration, and custom exception handling. Ideal for modern web and mobile applications.
- ✅ User registration and login via RESTful APIs
- 🔐 Secure password hashing using BCrypt
- 🛡️ JWT token generation & validation
- 🧪 Unit-tested authentication flow
- 📂 Layered architecture (Controller → Service → Repository)
⚠️ Custom exception classes for clear error handling- 🕐 Brute force protection with account timeout
src/
├── main/
│ ├── java/
│ │ └── com.expenses.expensetracker/
│ │ ├── controller/
│ │ ├── service/
│ │ ├── repository/
│ │ ├── filters/
│ │ └── exceptions/
│ └── resources/
│ └── pages/
│ ├── Categories.py
│ └──Transactions.py
│ ├── Homepage.py │
│ └── application.properties
└── test/
-
Clone the repo
git clone https://github.com/your-username/expenseTracker.git
-
Configure database in
application.properties
- set all necessary environment variables -
Create a Spring service Java class to configure your API Key for JWT Authentication.
-
Run the app
mvn spring-boot:run
or run from your IDE -
Test API endpoints
Use Postman or curl to test/api/users/register
and/api/users/login