Post-Hub is a demo project created for my Udemy course to demonstrate how microservices work in practice. It lets users register, log in, create posts and comments, and shows how services communicate via Kafka and are secured with JWT.
- User registration and login
- Post and comment creation
- Action logging via Kafka
- Secure endpoints using JWT
- Web access via Gateway and Nginx
- Full microservices architecture + CI/CD deployment
The following technologies and tools were used in this project:
- Java: The primary programming language for developing microservices.
- Spring Boot: Used to build the microservices with RESTful APIs.
- JWT & Spring Security: Ensures secure user authentication and authorization.
- Kafka: Facilitates asynchronous communication between microservices.
- Flyway: Manages database migrations.
- H2 & PostgreSQL: H2 is used for local development, and PostgreSQL is used for production.
- Docker: Containerizes the application and its services.
- IntelliJ IDEA Ultimate: Integrated Development Environment (IDE) used for coding.
The deployment process involves the following steps:
- Image Logs Stage: Retrieve the last 1000 lines of Docker container logs from the remote server via SSH.
- Docker Stop Stage: Stop and remove the current Docker container to prepare the server for deployment.
- Data Check Stage: Validate the Docker environment, network, and user data on the server.
- Build JAR Stage: Compile the application code into a JAR file using Maven.
- Build Docker Stage: Create a new Docker image from the JAR file and push it to the Docker Registry.
- Deploy Stage: Pull the new Docker image from the registry and deploy it on the server.
The project uses a managed PostgreSQL database hosted on the ScaleGrid platform, leveraging AWS for high availability and scalability. The application is hosted on a dedicated server that uses Docker for deployment, ensuring flexible resource management and maintaining high performance.

