This repository contains a microservices-based architecture with two Spring Boot applications:
- User & Profile Management Service: Handles user registration, profile management, and role-based access.
- Backend for Frontend (BFF) Service: A dedicated backend service optimized for client needs, aggregating data from the User Management service and preparing it for frontend consumption.
Both services are containerized using Docker, and the communication between them is done through REST APIs. PostgreSQL is used for data persistence, and the project is structured for easy scaling and deployment.
- User Management: Full CRUD operations for users and profiles.
- Role-Based Access: Managed user roles such as
USER
,ADMIN
, etc. - Profile Picture Handling: Store and retrieve profile images.
- Platform-URL Associations: Each profile can store multiple platform and URL mappings (e.g., GitHub, LinkedIn).
- API Aggregation: Fetches and combines data from multiple sources (primarily the User Management service) to optimize for frontend use.
- Frontend-Focused: Tailored to the specific needs of client applications (e.g., mobile, web).
- Simplified Endpoints: Provides simplified endpoints that combine multiple backend responses into a single request for frontend consumption.
- Java 17 (Amazon Corretto)
- Spring Boot 3.x (for both services)
- JPA & Hibernate
- PostgreSQL
- Docker & Docker Compose
- Gradle (build and dependency management)
- RESTful APIs (for service communication)
The architecture consists of two microservices communicating through REST APIs. The User Management service handles the core business logic and interacts with the database, while the BFF service is a middle layer, tailored to deliver optimized data for frontend applications.
- Docker installed on your machine.
- Java 17 (Amazon Corretto recommended).
- Gradle for project management.
-
Clone the repository:
git clone https://github.com/UserAAR/User-management_App.git cd User-Management_App
-
Set up PostgreSQL with Docker Compose: Both services use PostgreSQL for persistence. Start the database and services using Docker Compose:
docker-compose up -d
-
Run the Services:
Run each service using Gradle.
For User & Profile Management service:
cd user-management-service ./gradlew bootRun