Skip to content

yortch/agentic-devops-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Three Rivers Bank Business Credit Cards

A modern web application showcasing business credit card products for Three Rivers Bank, built with React frontend and Spring Boot backend, integrating with BIAN API v13.0.0 standards.

🏦 Overview

This project demonstrates a full-stack credit card comparison and information platform designed for small businesses. The application provides an intuitive interface for browsing, comparing, and learning about various business credit card offerings from Three Rivers Bank.

πŸ—οΈ Architecture

Frontend

  • Framework: React 18+ with Vite
  • Routing: React Router v6
  • State Management: React Query (TanStack Query)
  • UI Library: Material-UI (MUI)
  • Styling: Custom Three Rivers Bank theme (Navy/Teal)

Backend

  • Framework: Spring Boot 3.x
  • Language: Java 17+
  • Database: H2 In-Memory Database
  • API Integration: BIAN Credit Card API v13.0.0 (Swagger Hub Mock)
  • Resilience: Resilience4j Circuit Breaker
  • API Client: Spring Cloud OpenFeign
  • Caching: Spring Cache Abstraction

Infrastructure

  • Containerization: Docker
  • Registry: Azure Container Registry
  • Deployment: Azure Container Apps
  • CI/CD: GitHub Actions

πŸ“‹ Features

Credit Card Catalog

  • 5 Business Credit Cards:
    • Business Cash Rewards (2% cashback, $0 annual fee)
    • Business Travel Rewards (3X points, $95 annual fee)
    • Business Platinum (0% intro APR 15 months, $0 annual fee)
    • Business Premium (1.5% unlimited cashback, $150 annual fee)
    • Business Flex (Tiered 3%-1% rewards, $0 annual fee)

Card Comparison

  • Side-by-side comparison table
  • Advanced filtering (annual fee, APR, rewards type, card type)
  • Sorting capabilities
  • Responsive design for all devices

Card Details

  • Hero section with card imagery
  • Quick facts card (APR, fees, rewards)
  • Detailed features accordion
  • Benefits showcase
  • Fee schedules
  • Interest rate information

Business Features

  • Expense management tools
  • Employee card controls
  • QuickBooks integration
  • Receipt capture mobile app
  • Travel insurance & purchase protection

πŸ—‚οΈ Project Structure

agentic-devops-demo/
β”œβ”€β”€ backend/                          # Spring Boot application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”‚   β”œβ”€β”€ java/com/threeriversbank/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ controller/       # REST controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ service/          # Business logic
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ repository/       # JPA repositories
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ model/
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ entity/       # JPA entities
β”‚   β”‚   β”‚   β”‚   β”‚   └── dto/          # Data transfer objects
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ client/           # BIAN API Feign client
β”‚   β”‚   β”‚   β”‚   └── config/           # Configuration classes
β”‚   β”‚   β”‚   └── resources/
β”‚   β”‚   β”‚       β”œβ”€β”€ application.yml    # App configuration
β”‚   β”‚   β”‚       └── data.sql          # H2 seed data
β”‚   β”‚   └── test/                      # JUnit tests
β”‚   └── pom.xml                        # Maven dependencies
β”‚
β”œβ”€β”€ frontend/                          # React application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/               # Reusable components
β”‚   β”‚   β”‚   β”œβ”€β”€ cards/                # Card-related components
β”‚   β”‚   β”‚   β”œβ”€β”€ common/               # Shared UI components
β”‚   β”‚   β”‚   └── layout/               # Layout components
β”‚   β”‚   β”œβ”€β”€ pages/                    # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ HomePage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ CardComparisonPage.jsx
β”‚   β”‚   β”‚   └── CardDetailsPage.jsx
β”‚   β”‚   β”œβ”€β”€ services/                 # API service layer
β”‚   β”‚   β”œβ”€β”€ hooks/                    # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ theme.js                  # MUI theme configuration
β”‚   β”‚   └── App.jsx                   # Root component
β”‚   β”œβ”€β”€ package.json                  # npm dependencies
β”‚   └── vite.config.js                # Vite configuration
β”‚
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ e2e/                          # Playwright E2E tests
β”‚   β”‚   β”œβ”€β”€ card-comparison.spec.ts
β”‚   β”‚   β”œβ”€β”€ card-details.spec.ts
β”‚   β”‚   β”œβ”€β”€ filters-and-sorting.spec.ts
β”‚   β”‚   β”œβ”€β”€ responsive-design.spec.ts
β”‚   β”‚   └── database-integration.spec.ts
β”‚   β”œβ”€β”€ fixtures/                     # Test data fixtures
β”‚   β”‚   └── credit-cards.json
β”‚   └── screenshots/                  # Visual regression baselines
β”‚       └── baseline/
β”‚
β”œβ”€β”€ .github/
β”‚   β”œβ”€β”€ workflows/
β”‚   β”‚   └── deploy.yml                # CI/CD pipeline
β”‚   └── prompts/
β”‚       └── plan-threeRiversBankCreditCardWebsite.prompt.md
β”‚
β”œβ”€β”€ docker/
β”‚   β”œβ”€β”€ backend.Dockerfile
β”‚   └── frontend.Dockerfile
β”‚
└── README.md

πŸ”Œ API Endpoints

REST API

  • GET /api/cards - List all credit cards with filtering/sorting
  • GET /api/cards/{id} - Get detailed card information
  • GET /api/cards/{id}/fees - Get card fee schedule
  • GET /api/cards/{id}/interest - Get interest rate details
  • GET /api/cards/{id}/transactions - Get sample transactions (BIAN)

Management & Documentation

  • GET /actuator/health - Health check endpoint
  • GET /swagger-ui.html - OpenAPI/Swagger documentation
  • GET /h2-console - H2 database console (dev only)

πŸ—„οΈ Database Schema

Entities

  • CreditCard: Core card information (name, type, APR, fees, rewards)
  • CardFeature: Individual card features and benefits
  • FeeSchedule: Detailed fee structure per card
  • InterestRate: Interest rate configurations and history

πŸ”— BIAN API Integration

Integrates with BIAN Credit Card API v13.0.0 via Swagger Hub mock server:

  • Base URL: https://virtserver.swaggerhub.com/B154/BIAN/CreditCard/13.0.0
  • Endpoints Used:
    • /CreditCard/{id}/Retrieve
    • /CreditCard/{id}/CardTransaction/{txid}/Retrieve
    • /CreditCard/{id}/Billing/{billingid}/Retrieve

Resilience Features

  • Circuit breaker pattern (Resilience4j)
  • Retry logic: 3 attempts, 5s timeout
  • Fallback to H2 data on BIAN API failure
  • Response caching: 5min (transactions), 1hr (billing)

πŸš€ Getting Started

Prerequisites

  • Backend: Java 17+, Maven 3.8+
  • Frontend: Node.js 18+, npm 9+
  • Testing: Playwright (installed via npm)

Local Development

Backend

cd backend
mvn clean install
mvn spring-boot:run

Backend runs on http://localhost:8080

Frontend

cd frontend
npm install
npm run dev

Frontend runs on http://localhost:5173

H2 Console

Access H2 database console at http://localhost:8080/h2-console

  • JDBC URL: jdbc:h2:mem:creditcards
  • Username: sa
  • Password: (empty)

πŸ§ͺ Testing

Backend Tests (JUnit)

cd backend
mvn test

Tests include:

  • CreditCardServiceTest.java - Service layer with H2 queries
  • CreditCardControllerTest.java - REST API with MockMvc
  • CreditCardRepositoryTest.java - JPA repository validation
  • BianApiClientTest.java - BIAN API integration with WireMock

Frontend Tests (Playwright)

cd tests
npm install
npx playwright install
npx playwright test

E2E tests cover:

  • Card comparison functionality
  • Card detail pages
  • Filters and sorting
  • Responsive design (3 viewports)
  • Database integration
  • Visual regression
  • Accessibility (WCAG 2.1 AA)

Test Configuration:

  • Browsers: Chromium, WebKit
  • Viewports: Desktop (1920x1080), Tablet (768x1024), Mobile (375x667)
  • Parallel execution enabled

🐳 Docker

Build Images

# Backend
docker build -f docker/backend.Dockerfile -t threeriversbank/backend:latest ./backend

# Frontend
docker build -f docker/frontend.Dockerfile -t threeriversbank/frontend:latest ./frontend

Run Containers

# Backend
docker run -p 8080:8080 threeriversbank/backend:latest

# Frontend
docker run -p 80:80 threeriversbank/frontend:latest

☁️ Azure Deployment

Container Apps Configuration

  • Backend: 0.5 vCPU, 1GB RAM
  • Frontend: 0.25 vCPU, 0.5GB RAM
  • Ingress: HTTPS-only with custom domain support
  • Health Checks: /actuator/health

Environment Variables

  • BIAN_API_URL: BIAN API base URL
  • H2_CONSOLE_ENABLED: Enable/disable H2 console (false in prod)
  • LOGGING_LEVEL: Application logging level (INFO)

CI/CD Pipeline

GitHub Actions workflow (.github/workflows/deploy.yml) automatically:

  1. Builds React frontend
  2. Builds Spring Boot backend
  3. Runs JUnit tests
  4. Runs Playwright E2E tests
  5. Creates Docker images
  6. Pushes to Azure Container Registry
  7. Deploys to Azure Container Apps

🎨 Branding

Three Rivers Bank Theme:

  • Primary Color: Navy Blue (#003366)
  • Secondary Color: Teal (#008080)
  • Logo: Three Rivers Bank corporate logo
  • Typography: Roboto (Material-UI default)

Contact Information:

πŸ“„ License

This project is for demonstration purposes.

🀝 Contributing

This is a demonstration project. For questions or feedback, please contact the repository owner.


Built with ❀️ for Three Rivers Bank

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published