A secure backend REST API for uploading and managing photos tied to specific events. Designed for use by event organizers and attendees with role-based access, S3 photo storage, and robust authentication using JWT.
- Language: Java
- Framework: Spring Boot
- Security: Spring Security + JWT (JSON Web Tokens)
- Database: PostgreSQL
- File Storage: AWS S3
- Build Tool: Maven
- Testing Tool: Postman
- User registration & login with hashed passwords (BCrypt)
- JWT token-based authentication
- Role-based access:
Organizer,Attendee
- Organizers can create, update, delete events
- Users can be assigned to events with specific roles
- Upload photos to events using AWS S3
- List event photos with pagination
- Organizers can delete their own photos
- Attendees can only upload and view photos for events they’re assigned to
All endpoints were tested using Postman to validate authentication, file uploads, access control, and error handling.
To test locally:
- Start the Spring Boot application.
- Register a new user via
/api/auth/register - Login via
/api/auth/loginto receive a JWT token - Add the token to the
Authorization: Bearer <token>header in Postman - Use
form-datain POST requests to upload photos
- Java 17+
- Maven
- PostgreSQL
- AWS S3 account + bucket
- Clone the repository
git clone https://github.com/your-username/event-photo-backend.git
cd event-photo-backend