- Backend with Jwt Authentication
- Jwt refresh token implemented
- Application properties
- Add Angular frontend
- Global notification service in angular
- Link frontend with backend
The backend uses a layered architecture to provide maximum modularity.
- config: configuration for the application
- domain: holds the entities of the application that will be created automaticly by hibernate
- endpoints: contains all the rest endpoints that can be called from the client
- exceptions: all the custom exceptions that can be thrown by the backend
- persistence: Spring data jpa repositories
- security: all the security configuration and jwt things ;)
- service: holding the business logic
For the backend you can define properties in the application.yml
file. The class ApplicationProperties
has fields that access the properties with the prefix application
from the application.yml
file.
Roles can be defined in the enum ApplicationRoles
. At application startup the roles will be created if they dont exist already in the db.
To get notification global on the frontend there is a notificationservice. Usage:
export class LoginComponent implements OnInit {
constructor(private notificationService: NotificationService) {
this.loginForm = this.formBuilder.group({
username: ['', [Validators.required]],
password: ['', [Validators.required, Validators.minLength(8)]]
});
}
}
Note: