Skip to content

pratikb0501/fintech-platform

Repository files navigation

🏦 P2P Lending Platform

A full-stack Peer-to-Peer (P2P) Lending Platform inspired by LendingClub and Prosper, designed using microservices architecture. It allows users to register as Borrowers or Lenders, create loans, invest in loans, and manage repayment—securely and in real time.


🚀 Features

  • ✅ JWT-based user authentication & role management
  • 🧾 Loan creation, retrieval, and status updates
  • 💸 Investment creation and user/loan-wise filtering
  • 🔐 Secure APIs with Spring Security
  • 📦 Containerized using Docker, orchestrated via Kubernetes (Minikube)
  • 📄 API documentation via Swagger UI
  • 📬 Postman collection for endpoint testing

🏗️ Microservices

1. 👤 User Service

2. 💰 Loan Service

3. 📈 Investment Service (Work in Progress)

  • Endpoints:
    • POST /api/v1/investments
    • GET /api/v1/investments/user/{userId}
    • GET /api/v1/investments/loan/{loanId}

🗄️ Database

Each service uses PostgreSQL as its database engine.

Example local config (application.properties):

spring.datasource.url=jdbc:postgresql://localhost:5432/p2p_loandb
spring.datasource.username=postgres
spring.datasource.password=yourpassword

🐳 Docker & 🧵 CI/CD

  • Each microservice has its own Dockerfile.
  • CI/CD set up using GitHub Actions to build and push Docker images.
docker build -t pratikbagm/userservice:latest .
docker build -t pratikbagm/loanservice:latest .

☸️ Kubernetes

Deployed on Minikube.

Commands:

kubectl apply -f k8s/userservice-deployment.yaml
kubectl apply -f k8s/loanservice-deployment.yaml
kubectl get pods
kubectl get services

🔐 JWT Authentication

  • Upon login, a JWT token is returned.
  • Include this token in the Authorization header for secured endpoints:
Authorization: Bearer <your-token>

📬 Postman Collection

Postman collection included in the /postman/ folder for quick testing of:

  • Register/Login
  • Loan creation & approval
  • Investment endpoints

📚 Swagger Documentation

Access each microservice’s Swagger UI:

  • http://localhost:8081/swagger-ui.html — User Service
  • http://localhost:8082/swagger-ui.html — Loan Service

About

Fintech Platform Microservices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published