An open API service indexing awesome lists of open source software.

https://github.com/fintech-lsi/transaction-service

A robust transaction processing microservice built with Spring Boot that handles all financial transactions for the FinTechPro platform. This service manages deposits, withdrawals, transfers, and maintains transaction history with real-time event processing.
https://github.com/fintech-lsi/transaction-service

Last synced: over 1 year ago
JSON representation

A robust transaction processing microservice built with Spring Boot that handles all financial transactions for the FinTechPro platform. This service manages deposits, withdrawals, transfers, and maintains transaction history with real-time event processing.

Awesome Lists containing this project

README

          

# ๐Ÿ’ธ Transaction Service

[![Build Status](https://img.shields.io/jenkins/build?jobUrl=your-jenkins-url)](https://jenkins-url)
[![Quality Gate Status](https://img.shields.io/sonar/quality_gate/transaction-service?server=http://54.86.47.1:9000)](http://54.86.47.1:9000)
[![Docker Pulls](https://img.shields.io/docker/pulls/your-repo/transaction-service)](https://hub.docker.com/r/your-repo/transaction-service)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## ๐Ÿ“‹ Table of Contents
- [Overview](#-overview)
- [Features](#-features)
- [Architecture](#-architecture)
- [Tech Stack](#-tech-stack)
- [Project Structure](#-project-structure)
- [Pipeline](#-pipeline)
- [Getting Started](#-getting-started)
- [API Documentation](#-api-documentation)
- [Configuration](#-configuration)
- [Deployment](#-deployment)
- [Contributing](#-contributing)
- [Team](#-team)
- [License](#-license)

## ๐ŸŽฏ Overview

A robust transaction processing microservice built with Spring Boot that handles all financial transactions for the FinTechPro platform. This service manages deposits, withdrawals, transfers, and maintains transaction history with real-time event processing.

## โœจ Features

- ๐Ÿ’ฐ **Multiple Transaction Types**
- Deposits
- Withdrawals
- Transfers
- ๐Ÿ“Š **Transaction Status Tracking**
- ๐Ÿ”„ **Real-time Processing**
- ๐Ÿ“ฑ **Wallet Integration**
- ๐Ÿ“จ **Notification Service**
- ๐Ÿ“ˆ **Transaction History**
- ๐Ÿ” **Advanced Filtering**
- ๐Ÿ“Š **Status Monitoring**
- ๐Ÿ” **Secure Processing**
- ๐Ÿ“ **Audit Logging**

## ๐Ÿ— Architecture

The service follows a microservices architecture with the following components:

```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”Œโ”€โ”€โ–ถโ”‚Wallet Serviceโ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” REST โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ Transaction โ”‚โ—€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Service โ”‚ Kafka โ””โ”€โ”€โ–ถโ”‚Notification โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ Messages โ”‚ Service โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

## ๐Ÿ›  Tech Stack


Spring Boot
Java
Kafka
PostgreSQL
Docker
Kubernetes

## ๐Ÿ“‚ Project Structure

```
src/
โ”œโ”€โ”€ ๐Ÿ“ฑ main/java/com/lsi/transaction/
โ”‚ โ”œโ”€โ”€ ๐Ÿ“Š config/
โ”‚ โ”œโ”€โ”€ ๐ŸŽฎ controller/
โ”‚ โ”‚ โ””โ”€โ”€ TransactionController.java
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ฆ dto/
โ”‚ โ”‚ โ”œโ”€โ”€ request/
โ”‚ โ”‚ โ””โ”€โ”€ response/
โ”‚ โ”œโ”€โ”€ ๐Ÿข entity/
โ”‚ โ”‚ โ”œโ”€โ”€ Deposit.java
โ”‚ โ”‚ โ”œโ”€โ”€ MoneyMethods.java
โ”‚ โ”‚ โ”œโ”€โ”€ Transaction.java
โ”‚ โ”‚ โ”œโ”€โ”€ TransactionStatus.java
โ”‚ โ”‚ โ”œโ”€โ”€ Transfer.java
โ”‚ โ”‚ โ””โ”€โ”€ WithDraw.java
โ”‚ โ”œโ”€โ”€ ๐Ÿ“š repository/
โ”‚ โ”œโ”€โ”€ ๐Ÿ”ง service/
โ”‚ โ”‚ โ”œโ”€โ”€ TransactionService.java
โ”‚ โ”‚ โ”œโ”€โ”€ feign_clients/
โ”‚ โ”‚ โ””โ”€โ”€ kafka_service/
โ”‚ โ””โ”€โ”€ TransactionServiceApplication.java
โ”œโ”€โ”€ ๐Ÿ“ main/resources/
โ”‚ โ”œโ”€โ”€ application.yaml
โ”‚ โ””โ”€โ”€ application-local.yaml
โ””โ”€โ”€ ๐Ÿงช test/
```

## ๐Ÿ”„ Pipeline

Our CI/CD pipeline ensures secure and reliable deployments:

![CI/CD Pipeline](/images/pipeline-diagram.png)

1. ๐Ÿ“ฅ **Code Checkout**: Source code retrieval
2. ๐Ÿ” **SonarQube Analysis**: Code quality and security checks
3. ๐Ÿ—๏ธ **Maven Build**: Compilation and package creation
4. ๐Ÿณ **Docker Build & Push**: Container image creation and ECR upload
5. โ˜ธ๏ธ **EKS Deployment**: Kubernetes deployment with proper configurations

## ๐Ÿš€ Getting Started

```bash
# Clone the repository
git clone https://github.com/your-org/transaction-service.git

# Navigate to the project directory
cd transaction-service

# Build the project
mvn clean install

# Run locally
mvn spring-boot:run -Dspring.profiles.active=local

# Run tests
mvn test
```

## ๐Ÿ“š API Documentation

Available endpoints:

```
GET /api/transaction - Get all transactions
GET /api/transaction/type/{type} - Get transactions by type (withdraw/deposit/transfer)
GET /api/transaction/wallet/{id} - Get transactions by wallet ID
GET /api/transaction/status/failed - Get failed transactions
GET /api/transaction/status/success - Get successful transactions
GET /api/transaction/status/pending - Get pending transactions
```

Detailed API documentation is available at `/swagger-ui.html` when running the service.

## โš™๏ธ Configuration

Key configuration parameters in `application.yaml`:

```yaml
spring:
application:
name: transaction-service
kafka:
bootstrap-servers: ${KAFKA_SERVERS}
consumer:
group-id: transaction-group
datasource:
url: ${DB_URL}
username: ${DB_USERNAME}
password: ${DB_PASSWORD}

feign:
wallet-service:
url: ${WALLET_SERVICE_URL}
```

## ๐Ÿšข Deployment

The service is deployed on AWS EKS using Kubernetes manifests in the `k8s/` directory:

- `configmap.yaml`: Environment variables
- `secrets.yaml`: Sensitive data
- `deployment.yaml`: Pod specifications
- `service.yaml`: Service configuration

## ๐Ÿ‘ฅ Team

| Avatar | Name | Role | GitHub |
|---------------------------------------------------------------------------------------------------------|------|------|--------|
| | Zakariae Azarkan | DevOps Engineer | [@zachary013](https://github.com/zachary013) |
| | El Mahdi Id Lahcen | Frontend Developer | [@goalaphx](https://github.com/goalaphx) |
| | Hodaifa | Cloud Architect | [@hodaifa-ech](https://github.com/hodaifa-ech) |
| | Khalil El Houssine | Backend Developer | [@khalilh2002](https://github.com/khalilh2002) |
| | Mohamed Amine BAHASSOU | ML Engineer | [@Medamine-Bahassou](https://github.com/Medamine-Bahassou) |

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

---


Built with โค๏ธ by the FinTech Team