A microservices-based backend platform for the Clinicwave healthcare management system, built with Spring Boot.
This project consists of two main microservices:
The system follows a microservices architecture where each service is responsible for a specific domain of functionality:
- Handles user authentication and authorization
- Manages user profiles and roles
- Provides JWT-based security
- RESTful API endpoints for user operations
- Handles all notification-related functionality
- Processes email notifications
- Integrates with RabbitMQ for message queuing
- Supports template-based email content
- Java 21
- Spring Boot 3.x
- Spring Security with JWT
- Spring Data JPA
- PostgreSQL
- RabbitMQ
- Spring Mail
- Thymeleaf
- Maven
- Docker & Docker Compose
- Java 21 or later
- Maven 3.6 or later
- Docker and Docker Compose (optional, for containerized infrastructure)
- SMTP server for email notifications
The project includes a docker-compose.yml file that sets up the required infrastructure services:
# Start all infrastructure services
docker-compose up -d
# Stop all services
docker-compose downThis will start the following services:
-
PostgreSQL (v16.8)
- Port: 5432
- Database: user_management_db
- Username: postgres
- Password: postgres
-
Redis (v7.4.2)
- Port: 6379
- Used for caching and session management
-
RabbitMQ (v4.0 with Management UI)
- Message Broker Port: 5672
- Management UI Port: 15672
- Default credentials: guest/guest
All services are connected through a Docker network named app_network and have persistent volumes for data storage.
-
Clone the repository:
git clone https://github.com/aamirxshaikh/clinicwave-backend.git cd clinicwave-backend -
Set up the database:
- If using Docker Compose, the database will be automatically created
- If running locally, create a PostgreSQL database named
user_management_db - Configure database credentials in
user-management-service/src/main/resources/application.properties
-
Configure RabbitMQ:
- If using Docker Compose, RabbitMQ will be available at localhost:5672
- If running locally, ensure RabbitMQ is running or update the connection details in
notification-service/src/main/resources/application.properties
-
Configure Email Settings:
- Update SMTP server details in
notification-service/src/main/resources/application.properties
- Update SMTP server details in
-
Build and run the services:
For User Management Service:
cd user-management-service mvn spring-boot:runFor Notification Service:
cd notification-service mvn spring-boot:run
The services communicate through:
- REST APIs for synchronous communication
- RabbitMQ for asynchronous communication (notifications)
clinicwave-backend/
├── user-management-service/ # User Management microservice
│ ├── src/
│ ├── pom.xml
│ └── README.md
│
├── notification-service/ # Notification microservice
│ ├── src/
│ ├── pom.xml
│ └── README.md
│
└── docker-compose.yml # Infrastructure services configuration
To build all services:
mvn clean installTo run tests for all services:
mvn test- Postman Guide - Contains instructions on how to import and use the Postman collection for testing API endpoints.
- Postman Collection - A Postman collection with pre-configured API requests for easy testing of the User Management Service.
The system implements:
- JWT-based authentication
- Role-based authorization
- Secure password handling
- CORS configuration
Each service includes:
- Logging configuration
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
For support, please open an issue in the repository.
