https://github.com/useraar/user_management_app
A microservices-based architecture with two Spring Boot applications: one for user and profile management, and another as a Backend for Frontend (BFF) service. The system is integrated with PostgreSQL using Docker and communicates between services via REST APIs.
https://github.com/useraar/user_management_app
Last synced: 7 months ago
JSON representation
A microservices-based architecture with two Spring Boot applications: one for user and profile management, and another as a Backend for Frontend (BFF) service. The system is integrated with PostgreSQL using Docker and communicates between services via REST APIs.
- Host: GitHub
- URL: https://github.com/useraar/user_management_app
- Owner: UserAAR
- Created: 2024-10-10T20:40:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-12T10:26:39.000Z (over 1 year ago)
- Last Synced: 2025-02-12T11:38:13.951Z (over 1 year ago)
- Language: Java
- Size: 67.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Microservices: User Management System & Backend for Frontend (BFF)
## Overview
This repository contains a microservices-based architecture with two Spring Boot applications:
1. **User & Profile Management Service**: Handles user registration, profile management, and role-based access.
2. **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.
## Features
### 1. User & Profile Management Service
- **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).
### 2. Backend for Frontend (BFF) Service
- **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.
## Technologies
- **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)
## Architecture Overview

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.
## Getting Started
### Prerequisites
- Docker installed on your machine.
- Java 17 (Amazon Corretto recommended).
- Gradle for project management.
### Running the Services
1. **Clone the repository:**
```bash
git clone https://github.com/UserAAR/User-management_App.git
cd User-Management_App
```
2. **Set up PostgreSQL with Docker Compose:**
Both services use PostgreSQL for persistence. Start the database and services using Docker Compose:
```bash
docker-compose up -d
```
3. **Run the Services:**
Run each service using Gradle.
For **User & Profile Management** service:
```bash
cd user-management-service
./gradlew bootRun