-
loan-frontend/
- Modern React + TypeScript frontend with responsive sidebar navigation
- Redux Toolkit for state management
- Tailwind CSS for modern UI components
- Authentication integration with IdentityServer
- Dashboard with loan statistics and management
-
ai-service/
- Inference service exposing
/predict - Trains a RandomForest model for approve | pending | reject decisions
- Inference service exposing
-
identity-server/
- Duende IdentityServer + ASP .NET Identity for user management and OAuth2/OIDC
-
credit-bureau/
- (Optional) Client microservice querying a "Credit Bureau API"
-
loan-service/
- ASP .NET Core service for loan request management
- Listens to
UserRegisteredEventvia RabbitMQ and persistsCustomer - Exposes secured endpoints under
/loans
-
k8s/
- Manifests for Secrets, ConfigMaps, Deployments, Services, Ingress, StatefulSet (SQL Server), Jobs, CRD Queues, etc.ern microservices suite for credit evaluation and loan management, featuring a React frontend with modern sidebar navigation, FastAPI ML service, ASP .NET Core backend, Duende IdentityServer authentication, and Kubernetes deployment.
-
ai-service/
- Inference service exposing
/predict - Trains a RandomForest model for approve | pending | reject decisions
- Inference service exposing
-
identity-server/
- Duende IdentityServer + ASP .NET Identity for user management and OAuth2/OIDC
-
credit-bureau/
- (Optional) Client microservice querying a “Credit Bureau API”
-
loan-service/
- ASP .NET Core service for loan request management
- Listens to
UserRegisteredEventvia RabbitMQ and persistsCustomer - Exposes secured endpoints under
/loans
-
k8s/
- Manifests for Secrets, ConfigMaps, Deployments, Services, Ingress, StatefulSet (SQL Server), Jobs, CRD Queues, etc.
This C4 diagram shows the Context and Container views of the Decision Engine ecosystem:
- Users interact through the Web Frontend ( React.js ).
- Loan Service (.NET 7 + MassTransit) handles loan requests and consumes events from RabbitMQ.
- Identity Server (Duende IdentityServer) provides authentication & authorization.
- AI Service (Python + FastAPI) processes audio summaries and risk scoring.
- RabbitMQ acts as the message bus with retry and DLQ support.
- Loan Database (MongoDB/SQL Server) persists customers and loans.
- Prometheus collects metrics from all services.
-
Modern Frontend Implementation
- Created responsive React + TypeScript frontend with modern sidebar navigation
- Implemented Redux Toolkit for state management with loan and auth slices
- Integrated Tailwind CSS for modern, professional UI components
- Built modular dashboard with statistics grid, loan requests table, and creation modal
- Added JWT authentication integration with IdentityServer
- Configured proper routing and protected routes
-
Retry & Dead-Letter Queue
- Configured MassTransit to use exponential retry (3 attempts, 1s–10s) for
UserRegisteredConsumer. - Bound failed messages to
user-registered-queue-dlqdead-letter queue in RabbitMQ. - Updated Kubernetes manifests to declare
user-registered-queueanduser-registered-queue-dlqCRD queues.
- Configured MassTransit to use exponential retry (3 attempts, 1s–10s) for
- Docker
- kubectl
- Minikube / GKE / AKS / EKS
- .NET 9 SDK (for IdentityServer & Loan-Service)
- Python 3.10+ (for ai-service)
-
Clone the repo
git clone https://github.com/your-user/decision-engine.git cd decision-engine -
Run SQL Server locally
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=YourStrong@Passw0rd" \ -p 1433:1433 --name mssql-local -d mcr.microsoft.com/mssql/server:2019-latest
-
Build & run AI-Service
cd ai-service pip install -r requirements.txt python training.py # train model uvicorn app:app --reload
-
Run IdentityServer
cd identity-server dotnet run -
Run Loan-Service
cd loan-service/src/LoanService.Api dotnet run -
Run Frontend
cd loan-frontend npm install npm run dev
-
Build Docker images
# AI-Service docker build -t yourrepo/ai-inference:latest ai-service/ # IdentityServer docker build -t yourrepo/identity-server:latest identity-server/ # Loan-Service docker build -t yourrepo/loan-service:latest loan-service/src/
-
Push images to registry
docker push yourrepo/ai-inference:latest docker push yourrepo/identity-server:latest docker push yourrepo/loan-service:latest
-
Deploy to Kubernetes
# Ensure namespace kubectl create ns decision-engine-dev || true kubectl config set-context --current --namespace=decision-engine-dev # Apply all k8s manifests kubectl apply -f k8s/
-
Verify deployments
kubectl get all kubectl logs deployment/identity-server kubectl logs deployment/loan-service kubectl port-forward svc/ai-inference 8000:8000
-
AI-Service Predict
curl http://localhost:8000/predict \ -H "Content-Type: application/json" \ -d '{"salary":5000000,"age":30,"credit_score":700,"total_debt":1000000,"payment_history":[{"month":"2025-06","status":"on_time"}]}'
-
IdentityServer Metadata Visit
http://identity-server.local/.well-known/openid-configuration -
Loan-Service Endpoints
# list all loans curl -H "Authorization: Bearer <token>" http://loan-service.local/loans # get by id curl -H "Authorization: Bearer <token>" http://loan-service.local/loans/<loanId>
- Store secrets in Kubernetes Secrets
- Use Helm for parameterized templating
- Integrate CI/CD pipelines
- Add unit & integration tests
- Monitor with Prometheus & Grafana
- Enhance Loan-Service with more business rules
- ✅ Modern Frontend implemented (React + Tailwind + Redux Toolkit)
- Add RabbitMQ orchestration for multi-step workflows
- Implement advanced dashboard analytics and reporting
- Add unit & integration tests for frontend components
- Improve security, performance and observability
MIT © Cristian Mendoza
