Empower your applications with unmatched security solutions.
A secure, production-ready authentication module for Spring Boot + React apps.
- 🔐 JWT-based Authentication & Authorization
- ✅ Secure registration & login endpoints
- 📁 Role-based access control (Admin/User)
- ⚙️ Configurable via
application.yml
- 🧪 Unit & integration tests with JUnit + MockMvc
- 🚀 Ready for CI/CD and containerization
jwt-auth/
├── backend/
│ ├── src/main/java/com/example/jwt/
│ └── src/main/resources/application.yml
├── frontend/
│ ├── src/
│ └── public/
└── README.md
- Java 17+
- Node.js & npm
- MySQL
- Maven
cd backend
mvn clean install
mvn spring-boot:run
cd frontend
npm install
npm start
Make sure your backend runs at
http://localhost:8080
and frontend athttp://localhost:3000
.
mvn test
Includes:
- Controller tests (MockMvc)
- Service layer tests
- Auth validation tests
Method | Endpoint | Description |
---|---|---|
POST | /api/auth/login |
Login with JWT |
POST | /api/auth/register |
Register new user |
GET | /api/users/me |
Authenticated info |
This project is licensed under the MIT License.
Mert Duyar – LinkedIn – mertysfduyar@gmail.com
GitHub Profile
Star ⭐ the repo if you like it, and feel free to contribute!