Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3bf20de
Modernize application — full backend + redesigned frontend
LondheShubham153 Feb 21, 2026
a060210
Add README and ROADMAP for DevOps progression
LondheShubham153 Feb 21, 2026
b3f473a
added docker publish workflow
Mar 30, 2026
a6a0dda
Fixed error in docker publish workflow
Mar 30, 2026
cc2aef4
Fixed error in docker publish workflow
Mar 30, 2026
786d4dd
Fixed error in docker publish workflow
Mar 30, 2026
3c217b7
Fixed error in docker publish workflow
Mar 30, 2026
795e614
Added workflow-dispatch in docker publish workflow
Mar 30, 2026
155713c
Fixed error in docker publish workflow
Mar 30, 2026
ade40fa
Fixed error in docker publish workflow
Mar 30, 2026
25b2404
Fixed error in docker publish workflow
Mar 30, 2026
194b53d
Fixed error in docker publish workflow
Mar 30, 2026
aa3b9af
updated pom.xml,application properties file fr dockerhub publish work…
Mar 30, 2026
224efbd
Fixed error in docker publish workflow
Mar 30, 2026
f5a318a
Fixed error in docker publish workflow
Mar 30, 2026
1c1ad64
fix: add missing ActiveProfiles import in test class
Mar 30, 2026
97737f3
Fixed error in docker-publish workflow
Mar 30, 2026
0346b40
Updated the docker publish workflow to push only on main branch
Apr 1, 2026
c49d9ec
Update README with Docker badge and feature details
Sana-2026 Apr 2, 2026
b76e097
Update README.md
Sana-2026 Apr 11, 2026
c8b7aac
Added the test script
Apr 11, 2026
4db298d
Added reusable build and test workflow
Apr 11, 2026
9283013
Added reusable docker workflow
Apr 12, 2026
31a3c00
Added the pr pipeline workflow
Apr 12, 2026
d94d417
testing PR pipeline
Apr 12, 2026
5e36230
testing PR pipeline
Apr 13, 2026
c71fdf2
Updated PR pipeline
Apr 13, 2026
1062d3e
Testing PR pipeline
Apr 13, 2026
27927df
Testing PR pipeline
Apr 13, 2026
1726d83
deleted extra file and updated README.md
Apr 13, 2026
abc76f3
trigger PR pipeline again
Apr 13, 2026
e2f4b23
Resolved merge conflicts
Apr 13, 2026
10c112f
test: trigger PR pipeline
Apr 13, 2026
5bb31c8
Fixed error in Pr pipeline workflow
Apr 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# App configuration
APP_PORT=8083

# MySQL configuration
MYSQL_HOST=mysql-db
MYSQL_PORT=3306
MYSQL_ROOT_PASSWORD=root123
MYSQL_DATABASE=bankappdb
MYSQL_USER=bankuser
MYSQL_PASSWORD=root123
40 changes: 40 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Docker Build & Push

on:
push:
branches: ["*"] # allow all branches so we can test skip logic
workflow_dispatch:

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Build Jar
run: mvn clean package

- name: Login to Docker Hub
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build & Push to DockerHub
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.ref == 'refs/heads/main' }}
tags: |
${{ secrets.DOCKER_USERNAME }}/ai-bankapp:latest
${{ secrets.DOCKER_USERNAME }}/ai-bankapp:sha-${{ github.sha }}

20 changes: 20 additions & 0 deletions .github/workflows/pr-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: PR Pipeline
on:
pull_request:
branches: [start]
types: ['opened', 'synchronize']

jobs:
call-reusable-build-test:
uses: ./.github/workflows/reusable-build-test.yml
with:
java-version: '21'
runs_tests: true

pr-comment:
runs-on: ubuntu-latest
needs: call-reusable-build-test
steps:
- name: PR summary
run: |
echo "PR checks passed from branch : ${{ github.head_ref }} "
49 changes: 49 additions & 0 deletions .github/workflows/reusable-build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Reusable Build Test Workflow
on:
workflow_call:
inputs:
java-version:
description: 'The version of Java to use for the build'
required: true
type: string
runs_tests:
description: 'Whether to run tests'
required: false
type: boolean
default: true
outputs:
test-result:
description: 'The result of the test process'
value: ${{ jobs.build.outputs.test-result }}
jobs:
build:
runs-on: ubuntu-latest
outputs:
test-result: ${{ steps.test.outputs.result }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Java ${{ inputs.java-version }}
uses: actions/setup-java@v4
with:
java-version: ${{ inputs.java-version }}
distribution: 'temurin'

- name: Build with maven
run: mvn clean install -DskipTests

- name: Run test script
id: test
if: ${{ inputs.runs_tests }}
run: |
chmod +x ./test.sh
if ./test.sh; then

echo "result=passed" >> $GITHUB_OUTPUT
else

echo "result=failed" >> $GITHUB_OUTPUT
fi


52 changes: 52 additions & 0 deletions .github/workflows/reusable-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Reusable Docker Workflow
on:
workflow_call:
inputs:
image-name:
description: 'The name of the Docker image to build'
required: true
type: string
image-tag:
description: 'The tag of the built Docker image'
required: false
type: string
default: 'latest'

secrets:

DOCKER_USERNAME:
description: 'DockerHub username'
required: true
DOCKER_TOKEN:
description: 'DockerHub access token'
required: true

outputs:
image_url:
description: 'The URL of the built Docker image'
value: ${{ jobs.DockerBuild.outputs.image_url }}

jobs:
DockerBuild:
runs-on: ubuntu-latest
outputs:
image_url: ${{ steps.build.outputs.image_url }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and Push Docker image
id: build
run: |
docker build -t ${{ inputs.image-name }}:${{ inputs.image-tag }} .
docker push ${{ inputs.image-name }}:${{ inputs.image-tag }}
echo "image-url=${{ inputs.image-name }}:${{ inputs.image-tag }}" >> $GITHUB_OUTPUT



32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# ---------- Stage 1: Build ----------
FROM maven:3.9.9-eclipse-temurin-21 AS builder

WORKDIR /build

# Copy project files
COPY pom.xml .
COPY src ./src

# Build the application
RUN mvn clean package -DskipTests


# ---------- Stage 2: Runtime ----------
FROM eclipse-temurin:21-jdk-alpine

# Create non-root user
RUN addgroup -S springgroup && adduser -S springuser -G springgroup

WORKDIR /app

# Copy jar from builder stage
COPY --chown=springuser:springgroup --from=builder /build/target/*.jar app.jar



# Switch to non-root user
USER springuser

EXPOSE 8083

ENTRYPOINT ["java","-jar","app.jar"]
Empty file added FETCH_HEAD
Empty file.
7 changes: 7 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<<<<<<< HEAD
#testing2- Pull_request
#testing3- Pull_request
=======
#testing- Pull_request
#testing1- Pull_request
>>>>>>> test-pr
102 changes: 102 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# AI-BankApp-DevOps

![Docker Build & Push](https://github.com/Sana-2026/AI-BankApp-DevOps/actions/workflows/docker-publish.yml/badge.svg)

A production-ready full-stack banking application built with Spring Boot and MySQL, featuring secure authentication, account management, and transaction processing. Integrated with a complete DevOps pipeline using Docker, GitHub Actions CI/CD, Kubernetes, Helm, Terraform, Prometheus, and ArgoCD for scalable, automated, and observable deployments.

<img width="1355" height="635" alt="dashboard-app" src="https://github.com/user-attachments/assets/78a0e023-bfab-4b2e-907d-d1f746a989ac" />

## 🏗️ Architecture

A cloud-native AI banking application built with Spring Boot, containerized using Docker, and deployed via GitHub Actions CI/CD. It leverages Kubernetes for scalability, ArgoCD for GitOps, and Prometheus & Grafana for monitoring.

![architecture](https://github.com/user-attachments/assets/3daa07a3-51b6-4918-b87f-63cb48d7a278)

---
## 🧰 Tech Stack

| Category | Technologies |
|----------------|-------------|
| **Backend** | Spring Boot 3.4.1, Java 21, Spring Security, JPA/Hibernate |
| **Frontend** | Thymeleaf, Bootstrap 5, Glassmorphism UI (Dark/Light Theme) |
| **Database** | MySQL 8.0 |
| **AI** | Ollama (Self-hosted LLM chatbot) |
| **Containerization** | Docker |
| **CI/CD** | GitHub Actions |
| **Orchestration** | Kubernetes |
| **Package Management** | Helm |
| **Infrastructure as Code** | Terraform |
| **Monitoring** | Prometheus, Grafana |
| **GitOps** | ArgoCD |

---

## Branches
| Branch | Description |
|--------|-------------|
| `start` | Modernized app — full backend + frontend (developer handoff) |
| `docker` | Adds Dockerfile, multi-stage build, docker-compose |
| `ai` | Adds AI chatbot powered by Ollama |
| `main` | End-to-end DevOps (WIP) |


## Quick Start

### Run locally (needs Java 21 + MySQL)
```bash
# Create database
mysql -u root -p -e "CREATE DATABASE bankappdb;"
# Run the app
./mvnw spring-boot:run
```

### Run with Docker (recommended)
```bash
# Switch to docker branch
git checkout docker
# Start everything
docker compose up -d --build
# Visit http://localhost:8080
```

### Run with AI Chatbot
```bash
# Switch to ai branch
git checkout ai
# Start everything (includes Ollama)
docker compose up -d --build
# Pull the AI model (one-time)
docker exec bankapp-ollama ollama pull tinyllama
# Visit http://localhost:8080
```

## Features
- User registration & login with BCrypt passwords
- Deposit, withdraw, transfer between accounts
- Transaction history with color-coded entries
- Dark/light theme toggle (persists across sessions)
- AI chatbot that knows your balance and recent transactions
- Prometheus metrics at `/actuator/prometheus`
- Health check at `/actuator/health`

- ## 🚀 Future Enhancements

* Kubernetes auto-deployment with Helm
* GitOps using ArgoCD
* Terraform-based infrastructure provisioning
* Advanced AI banking features

---

## 👨‍💻 Author

Sana Shaik

---

🔥 Built as part of DevOps Capstone Project

<<<<<<< HEAD
Final trigger
=======
Testing my PR 10th time
Loading