This project is a Spring Boot backend API for a dim sum restaurant ordering system. It supports user authentication, menu/item management, order creation and status tracking, address management, and real-time notifications.
The backend follows a layered architecture (controllers, business/use-case layer, persistence, domain models) and uses JWT-based authentication with role-based access control (e.g., ADMIN / CUSTOMER).
- User registration and login
- JWT authentication and authorization
- Role-based access control (admin/customer)
- Menu item and category management
- Order creation and status tracking
- Address management for users
- Real-time notifications via WebSocket
- Validation and secure password encoding
- Java 17
- Spring Boot
- Spring Security
- JWT
- Spring Data JPA / Hibernate
- Gradle
- WebSocket
- PostgreSQL / MySQL / H2 (depending on configuration)
This project is organized using a layered structure:
- Controller layer – REST API endpoints
- Use Case / Service layer – business logic
- Persistence layer – repositories and database access
- Domain layer – entities and core models
- Converters – request/response and entity mapping
/users– user registration and management/usertokens– authentication/login/orders– order creation and updates/items– menu items/categories– menu categories/addresses– delivery addresses/ws/**– WebSocket notifications
Actual endpoint names may vary depending on the final implementation.
- JWT-based stateless authentication
- BCrypt password encoding
- Role-based endpoint access control
- CORS configuration for frontend integration
- Java 17
- Gradle (or use the Gradle wrapper included in the project)
- Database (depending on your local configuration)
Using Gradle wrapper:
./gradlew bootRun