This application was built to streamline appointment scheduling for clinics, making it simple for users to book consultations, check available doctors and their specialties, and view open time slots, and email sending for confirmation. Users can easily make, view, and cancel bookings, while system administrators have access to monitoring tools for system health and performance metrics
- User Authentication: Secure registration and login using Spring Security.
- Password Management: Change passwords via secure email links.
- Oauth2 with JWT: Provides robust security and stateless authentication.
- Role-based authorization: Access control based on roles (ADMIN, USER, DOCTOR).
- Error handling: Detailed exception handling for clear API responses.
- API documentation: Interactive Swagger UI for endpoint testing.
- Monitoring Tools:
- Prometheus: Collect metrics for performance analysis.
- Grafana Dashboards: Visualize system metrics with preconfigured templates.
- Spring Boot 3.3
- Spring Security 6.3
- Spring Data
- Oauth2
- JavaMail
- Maven
- Swagger
- Prometheus
- Grafana
- Java 17
- Docker (recommended) or MySQL
To run the application firstly, you need to manually add roles into the database:
docker-compose up- Id: 1, ROLE : ADMIN
- Id: 2, ROLE : USER
- Id: 3, ROLE : DOCTOR
There is a class InitialConfig in "config" made for tests only. This class on running the Api will add some info to the database
- To run unit tests:
mvn test
If you have any kind of problem with the email config, this YouTube video can help you fix it JavaMail Video
To view the API documentation, run the application and navigate to: http://localhost:8080/swagger-ui.html
All endpoints include detailed summaries and descriptions and the body in JSON format as well.
Prometheus can be accessed at: http://localhost:9090/
To view metrics in Grafana:
- Run the application.
- Navigate to
http://localhost:3000(default Grafana URL). - Create a new data source using Prometheus with this URL:
http://prometheus:9090. - A recommended dashboard is JVM (Micrometer), which provides detailed JVM and application metrics.
/actuator/info– Basic application information/actuator/metrics– Application metrics/actuator/health– Health status/actuator/prometheus– Prometheus metrics endpoint