feat: Add business credit card application feature with multi-step form#21
Open
feat: Add business credit card application feature with multi-step form#21
Conversation
…e Builder agent Co-authored-by: yortch <4576246+yortch@users.noreply.github.com>
Implements comprehensive agent definitions to support the Feature Builder agent's handoff workflow: ## New Agent Definitions ### `.github/agents/security-reviewer.md` Security-focused code review specialist incorporating: - OWASP Top 10 security patterns - Three Rivers Bank specific checks (Bean Validation, circuit breakers, H2 vs BIAN) - Frontend security (XSS prevention, API validation) - Zero Trust implementation patterns - Code review report templates ### `.github/agents/test-writer.md` Comprehensive testing specialist combining guidance from: - Playwright E2E testing patterns (from awesome-copilot) - JUnit 5 best practices (from awesome-copilot) - React Testing Library patterns (from awesome-copilot) - Three Rivers Bank specific testing strategies (H2 seed data, circuit breaker tests) - Testing pyramid approach (E2E → Integration → Unit) ### `.github/agents/pr-creator.md` Pull request creation specialist incorporating: - GitHub PR creation workflow (from awesome-copilot) - Three Rivers Bank PR template and conventions - Architecture decision documentation - Comprehensive testing and verification checklists - Quality gates before PR submission ## Integration with Feature Builder These agents are referenced in `.github/agents/feature-builder.md` handoffs: - `security-reviewer` - Reviews code for vulnerabilities after implementation - `test-writer` - Writes comprehensive tests (Playwright, JUnit, React) - `pr-creator` - Creates well-documented pull requests ## Sources - Security reviewer: github/awesome-copilot/agents/se-security-reviewer.agent.md - Playwright testing: github/awesome-copilot/agents/playwright-tester.agent.md - JUnit guidance: github/awesome-copilot/prompts/java-junit.prompt.md - React patterns: github/awesome-copilot/agents/expert-react-frontend-engineer.agent.md - PR creation: github/awesome-copilot/prompts/create-github-pull-request-from-specification.prompt.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ools in PR creator Co-authored-by: yortch <4576246+yortch@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Business Credit Card Application Feature
Implements a comprehensive business credit card application system with a multi-step form interface, backend API, and complete test coverage.
Changes
Backend
New Entities & Models:
BusinessCreditCardApplicationentity with complete business and owner informationApplicationRequestDtowith comprehensive Bean Validation annotations for input validationApplicationResponseDtofor standardized API responsesNew API Endpoints:
POST /api/applications- Submit business credit card application with validationBusiness Logic:
ApplicationServicewith:Data Layer:
BusinessCreditCardApplicationRepositoryextending JpaRepositoryValidation:
@Validand Bean ValidationFrontend
New Pages:
ApplicationFormPage.jsx- Multi-step form with 4 stages:ApplicationReviewPage.jsx- Dedicated review page with:ApplicationConfirmationPage.jsx- Success page displaying:UI Features:
Integration:
Updated Components:
Testing
Backend Tests (JUnit 5):
ApplicationControllerTest(326 lines) - REST endpoint testing with MockMvcApplicationServiceTest(321 lines) - Business logic testingBusinessCreditCardApplicationRepositoryTest(299 lines) - Data layer testingE2E Tests (Playwright):
application-flow.spec.ts(352 lines) - Complete user journey testingTest Coverage:
Architecture Decisions
Why H2 as primary source?
The
BusinessCreditCardApplicationentity is stored in H2 because:Why multi-step form?
Implemented as a 4-step process because:
Why localStorage for drafts?
Why Tax ID encryption?
Three Rivers Bank Compliance
@Validand Bean Validationdata-testidattributes added for E2E testingTesting
Backend Testing
Frontend Testing
E2E Testing
Manual Testing Steps
Expected behavior: Application submitted successfully, redirected to confirmation page with unique application number starting with "APP-"
Database Changes
Added new table
business_credit_card_application:credit_cardtable via foreign keySchema fields:
API Changes
New Endpoints:
POST /api/applications- Submit business credit card applicationApplicationRequestDto(validated)ApplicationResponseDtowith application number and statusAPI Request Example:
{ "creditCardId": 1, "businessLegalName": "Test Company LLC", "taxId": "123456789", "businessStructure": "LLC", "industry": "Technology", "yearsInBusiness": 5, "annualBusinessRevenue": "$500,000 - $1,000,000", // ... additional fields "acceptedTerms": true }API Response Example:
{ "applicationNumber": "APP-20260204-00001", "status": "PENDING_REVIEW", "creditCardName": "Business Cash Rewards" }Dependencies
Backend:
Frontend:
Security Review
Input Validation:
@NotBlank,@Email,@Pattern)Data Protection:
Security Concerns Addressed:
Breaking Changes
None. This is a new feature that doesn't modify existing functionality.
Rollback Plan
If issues arise:
business_credit_card_applicationtable if neededNo data migration needed as this is the initial implementation.
Related Issues
Implements new credit card application feature as requested.
Checklist
data-testidattributes added for testingFiles Changed: 23 files, 5,267 insertions
Backend (9 files):
Frontend (5 files):
Testing (1 file):
Documentation (6 files):
Ready for Review ✅
This PR implements a production-ready business credit card application system with comprehensive validation, security measures, and test coverage following Three Rivers Bank coding standards.