A retail banking demo application built with .NET 10 and React, designed for GitHub Copilot demos.
Three Rivers Bank is a fictional retail banking application that demonstrates modern web development practices. It features a .NET 10 backend API and a React frontend with TypeScript.
- .NET 10 - Latest .NET framework
- C# - Primary programming language
- Minimal APIs - Modern API design pattern
- Entity Framework Core - ORM for data access
- SQLite In-Memory - Lightweight database for demo purposes
- React 18 - UI library
- TypeScript - Type-safe JavaScript
- Vite - Fast build tool
- React Router - Client-side routing
- Axios - HTTP client
banking-dotnet-demo/
├── backend/
│ └── Api/
│ ├── Models/
│ │ ├── Account.cs
│ │ ├── Customer.cs
│ │ └── Transaction.cs
│ ├── Services/
│ │ ├── Data/
│ │ │ ├── BankingDbContext.cs # EF Core DbContext
│ │ │ └── DatabaseSeeder.cs # Seed data initialization
│ │ ├── Interfaces/
│ │ │ ├── IAccountService.cs
│ │ │ ├── ICustomerService.cs
│ │ │ └── ITransactionService.cs
│ │ ├── AccountService.cs # Account domain operations
│ │ ├── CustomerService.cs # Customer domain operations
│ │ └── TransactionService.cs # Transaction domain operations
│ └── Program.cs
│ └── Api.Tests/
│ ├── TestDatabaseFactory.cs # Test database setup
│ └── Services/
│ ├── AccountServiceTests.cs
│ ├── CustomerServiceTests.cs
│ └── TransactionServiceTests.cs
├── frontend/
│ └── ui/
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── services/
│ │ └── types/
│ └── package.json
└── README.md
The backend follows a domain-driven modular architecture with three main services:
| Service | Responsibility |
|---|---|
CustomerService |
Customer lookup, profile management |
AccountService |
Account queries, balance summaries |
TransactionService |
Transactions, transfers, deposits, withdrawals |
The application uses Entity Framework Core with SQLite in-memory database:
| Component | Description |
|---|---|
BankingDbContext |
EF Core DbContext with entity configurations |
DatabaseSeeder |
Initializes the database with demo data on startup |
The SQLite in-memory database is created fresh on each application start, seeded with demo customers, accounts, and transactions. This approach provides:
- Real database operations with SQL queries
- Transaction support for data integrity
- Easy testing with isolated database instances
- No external database dependencies
erDiagram
Customer {
guid Id PK
string FirstName
string LastName
string Email UK
string Phone
string Address
string City
string State
string ZipCode
datetime DateOfBirth
datetime CreatedDate
bool IsActive
string CustomerNumber UK
}
Account {
guid Id PK
string AccountNumber UK
string AccountType
string AccountName
decimal Balance
decimal AvailableBalance
guid CustomerId FK
datetime OpenedDate
bool IsActive
string Currency
}
Transaction {
guid Id PK
guid AccountId FK
string TransactionType
string Category
decimal Amount
decimal BalanceAfter
string Description
string Merchant
datetime TransactionDate
string Status
string ReferenceNumber
}
Customer ||--o{ Account : "has"
Account ||--o{ Transaction : "has"
- .NET 10 SDK
- Node.js 18+
- npm or yarn
cd backend/Api
dotnet runThe API will start at http://localhost:5000
cd frontend/ui
npm install
npm run devThe frontend will start at http://localhost:5173
GET /api/customers- Get all customersGET /api/customers/{id}- Get customer by IDGET /api/customers/{id}/profile- Get customer profile with accounts
GET /api/customers/{id}/accounts- Get customer accountsGET /api/accounts/{id}- Get account by ID
GET /api/accounts/{id}/transactions- Get account transactionsGET /api/transactions/{id}- Get transaction by ID
POST /api/transfer- Transfer funds between accountsPOST /api/deposit- Deposit fundsPOST /api/withdraw- Withdraw funds
GET /health- API health status
The application comes with three pre-configured demo customers:
| Customer | Customer Number | |
|---|---|---|
| Sarah Johnson | sarah.johnson@email.com | TRB-100001 |
| Michael Chen | michael.chen@email.com | TRB-100002 |
| Emily Rodriguez | emily.rodriguez@email.com | TRB-100003 |
Default demo user: Sarah Johnson (ID: 11111111-1111-1111-1111-111111111111)
- Dashboard - Overview of accounts and recent transactions
- Account Management - View account details and balances
- Fund Transfers - Transfer money between accounts
- Transaction History - View all transactions with filtering
- Header - Navigation and branding
- AccountCard - Display account information
- TransactionList - List of transactions with icons
- Add new feature: "Add a bill payment feature"
- Add authentication: "Implement JWT authentication"
- Migrate database: "Connect to Azure SQL database"
- Add tests: "Write unit tests for the banking service"
- Add validation: "Add input validation to the transfer endpoint"
- Refactor code: "Extract account operations to a separate service"
This project is for demonstration purposes only.
Made with ❤️ for GitHub Copilot demos