A secure RESTful backend for a Lost & Found platform built with Spring Boot, featuring JWT authentication and interactive API documentation via Swagger.
🔐 JWT Authentication (Login & Register)
👤 User Management
Role-Based Authorization
Interactive API Documentation (Swagger UI)
PostgreSQL Database Integration
Cloud Deployment Ready (Render)
Java 21
Spring Boot 3.4.5
Spring Security
Spring Data JPA
JWT (JSON Web Token)
PostgreSQL
Maven
Swagger / OpenAPI 2.6.0 (springdoc)
src/main/java/com/lostfound/lostfound
│
├── config/ # Security & OpenAPI configuration
├── controller/ # REST Controllers
├── service/ # Business logic layer
├── repository/ # JPA repositories
├── model/ # Entities
├── dto/ # Data Transfer Objects
├── security/ # JWT filter & utilities custom implementation
└── LostfoundApplication.java
-
User register via
POST /api/auth/register -
User login via
POST /api/auth/login
- Server returns JWT token
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
-
Use token in requests
Authorization: Bearer <your_token>
Swagger Ui avaliable at :- https://findme-1-e6k5.onrender.com/swagger-ui/index.html#/
- Click Authorize
- Paste :-
Bearer <your-token> - Now access protected endpoints 🔐
```
spring.datasource.url=jdbc:postgresql://.....
spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}
```
1️⃣ Clone Repository
git clone https://github.com/Kalkidan407/lost-FoundBackEnd.git
cd lostfound-api
2️⃣ Build Project
mvn clean install
3️⃣ Run Application
mvn spring-boot:run
Role-based AuthZ
Passwords encrypted using BCrypts
Stateless authentication using JWT
All protected routes require valid token
Swagger configured with Bearer Authentication
Email verification
Password reset
Developed by Kalkidan Kelemework
Backend Developer | Spring Boot | REST APIs | Cloud Deployment