How erik-cupsa/spring-security-tutorial works
Project type and purpose
• This is a backend-only Spring Boot application implementing user authentication:
• Signup with email verification
• JWT-based login
• Basic user profile retrieval and error handling
• No frontend code; intended clients (Postman or any HTTP client) interact via REST APIs.
File structure
• Top-level “demo” directory contains:
• src/main/java/com/example/demo
– config: Spring and security configurations (JWT filter, mail, CORS, etc.)
– controller: REST controllers for auth and user endpoints
– dto: request/response data transfer objects
– model: JPA entity (User)
– repository: Spring Data JPA UserRepository
– service: core business logic (AuthenticationService, UserService, JwtService, EmailService)
• src/main/resources/application.properties: DB (Supabase) and mail properties
• src/test: basic application test
• build scripts: Gradle wrapper, settings.gradle
• Pattern: classic layered MVC with service and repository layers.
README for additional insights
• Dependencies: Java 8+, Spring Boot, Spring Security, JWT, email (SMTP), Supabase (PostgreSQL), Gradle
• Features call out external mail server and Supabase database.