Skip to content

Blake Celestian - Banking App - #246

Merged
kchandan merged 1 commit into
becloudready:masterfrom
bcelestian:master
Sep 8, 2026
Merged

Blake Celestian - Banking App#246
kchandan merged 1 commit into
becloudready:masterfrom
bcelestian:master

Conversation

@bcelestian

Copy link
Copy Markdown
Contributor

This is a clone of the "blake-deploy" branch which adds some UI polish and small bug fixes. Dependencies are not included.

@bcelestian bcelestian changed the title banking app submission Blake Celestian - Banking App Sep 4, 2026
@bcelestian
bcelestian requested review from kchandan and a lite review from Copilot September 4, 2026 23:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There are confirmed runtime/compile bugs plus significant unresolved security exposures (unauthenticated ID-based access and overly permissive network access) that block safe approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adds end-to-end deployment scaffolding and a refreshed full-stack implementation for the Banking App submission, including Terraform infrastructure, deployment scripts, a FastAPI backend, and a React/Vite frontend.

Changes:

  • Adds Terraform to provision AWS networking/compute + API Gateway + S3 website hosting, and provisions a Supabase Postgres project.
  • Adds deployment scripts to push the FastAPI app to EC2 and deploy the frontend build to S3.
  • Introduces/updates backend + frontend features around accounts, transactions (including wager + categories), and admin/customer UI flows.
File summaries
File Description
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/terraform/vpc.tf Creates VPC, public subnet, routing, and API security group.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/terraform/versions.tf Defines Terraform and provider version constraints.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/terraform/variables.tf Declares Terraform input variables for AWS + Supabase deployment.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/terraform/user_data.sh.tpl EC2 bootstrap/systemd unit template for the API service.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/terraform/terraform.tfvars.example Example tfvars for running the Terraform deployment.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/terraform/supabase.tf Provisions Supabase project and applies settings.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/terraform/s3.tf Provisions S3 static website bucket + placeholder index.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/terraform/README.md Documentation for applying/destroying infra and deployment steps.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/terraform/providers.tf Configures AWS + Supabase providers.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/terraform/outputs.tf Outputs API gateway URL, S3 site URL, instance IP, etc.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/terraform/ec2.tf Provisions EC2 instance, key pair, and DB URL local.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/terraform/api_gateway.tf Adds HTTP API Gateway proxy integrations + routes + stage.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/terraform/.gitignore Ignores terraform state and local overrides.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/scripts/deploy-frontend.sh Builds and syncs frontend assets to the provisioned S3 bucket.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/scripts/deploy-api.sh Deploys the FastAPI app to EC2 via SSH/rsync and systemd.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/setup-local-dev.sh Local dev bootstrap: venv + Docker Postgres + DATABASE_URL export.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/service/user_service.py User CRUD + authentication + domain mapping.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/service/transaction_service.py Transaction operations + categories + wager logic.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/service/account_service.py Account CRUD and lookup logic.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/security/password.py Password hashing/verification helpers.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/security/jwt.py JWT token creation utility/constants.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/routers/users.py FastAPI routes for user listing/read/create/delete.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/routers/transactions.py Transaction routes for deposits/withdrawals/transfers/wager/categories/spending.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/routers/login.py Login route wiring to authentication service.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/routers/accounts.py Account routes including admin status updates.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/requirements.txt Backend pinned dependencies for FastAPI/SQLModel/JWT/password hashing.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/repository/transactionRepo.py Transaction persistence and query helpers (including monthly withdrawals).
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/repository/accountsRepo.py Account query helpers for owned/any accounts.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/reminders.txt Local run/testing notes.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/Plan.txt Project planning notes/requirements checklist.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/package.json Adds a JS dependency (recharts) under project1.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/models/user.py Abstract domain user model.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/models/transaction.py SQLModel transaction schema + DTO models + enums.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/models/SavingsAccount.py Domain savings account type.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/models/customer.py Customer domain model and account creation logic.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/models/CheckingAccount.py Domain checking account with overdraft behavior.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/models/admin.py Admin domain model.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/models/account.py Domain account base class.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/models/account_model.py SQLModel account table schema.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/main.py FastAPI app init, CORS, routers, validation handler.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/dto/user_db.py SQLModel user table schema (UUID primary key).
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/dto/ResponseDTO.py Generic JSON response wrapper.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/dto/login_request.py Login request DTO.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/database.py DB engine/session wiring + create tables + ad-hoc migrations.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/vite.config.ts Vite config wiring for React plugin.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/tsconfig.node.json TS config for Vite/node build context.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/tsconfig.json TS project references.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/tsconfig.app.json TS config for app compilation.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/utils/.gitkeep Placeholder for utils directory.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/types/banking.ts Frontend domain types for accounts/transactions/users.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/types/.gitkeep Placeholder for types directory.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/styles/.gitkeep Placeholder for styles directory.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/pages/UserDetails.jsx User details/edit page (React Router param-based).
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/pages/customer/TransferPage.tsx Customer transfers page wired to API helper.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/pages/customer/ProfilePage.tsx Customer profile display with API-backed loading.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/pages/customer/DepositPage.tsx Customer deposit page wired to API helper.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/pages/customer/DashboardPage.tsx Customer dashboard with accounts, recent txns, spending pie chart.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/pages/customer/AccountPage.tsx Customer account detail with withdrawals and transaction list.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/pages/customer/.gitkeep Placeholder for customer pages directory.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/pages/auth/SignupPage.tsx Signup flow with validation and email availability checks.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/pages/auth/LandingPage.tsx Landing/login flow with admin toggle and session storage.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/pages/auth/.gitkeep Placeholder for auth pages directory.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/pages/admin/AdminAccountsPage.tsx Admin accounts view with status toggles and live data loading.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/pages/admin/.gitkeep Placeholder for admin pages directory.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/main.tsx React app bootstrap.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/index.css Base CSS variables + global styling.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/hooks/.gitkeep Placeholder for hooks directory.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/data/mockData.ts Local mock data + formatting helper.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/components/users/.gitkeep Placeholder for users components.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/components/transactions/TransactionList.tsx Transaction list UI with wagering + category updates.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/components/transactions/.gitkeep Placeholder for transactions components directory.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/components/layout/CustomerLayout.tsx Customer shell layout with drawer navigation and sign out.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/components/layout/.gitkeep Placeholder for layout components.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/components/coinflip/CoinFlip.tsx Coin flip UI control used for wager flow.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/components/coinflip/.gitkeep Placeholder for coinflip components directory.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/components/charts/.gitkeep Placeholder for charts components directory.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/components/accounts/AccountDetailsModal.tsx Account modal with embedded transaction list and admin mode.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/components/accounts/AccountCard.tsx Account card component for grids and admin toggles.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/components/accounts/.gitkeep Placeholder for accounts components directory.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/assets/vite.svg Vite SVG asset.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/assets/react.svg React SVG asset.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/assets/money_bag.svg Coinflip “win” asset.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/assets/bomb.svg Coinflip “loss” asset.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/api/bankingApi.ts Axios client + API wrappers + storage helpers.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/api/.gitkeep Placeholder for api directory.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/README.md Default Vite/React template README.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/public/icons.svg SVG icon sprite sheet.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/public/favicon.svg Favicon SVG.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/package.json Frontend dependencies and scripts.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/index.html HTML entrypoint for Vite app.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/eslint.config.js ESLint flat config for TS/React.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/.gitignore Frontend ignores for node/vite/env artifacts.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/.env.example Example VITE_API_URL config.
workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/.gitignore Root ignore additions for venv/node/terraform/frontend dist.
Review details

Files not reviewed (2)

  • workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/frontend/src/App.css: Generated file
  • workshops/fullstack-aws/projects/submissions/Group_1__Blake_Celestian__Banking_App/ConsolePythonApp/project1/package-lock.json: Generated file
  • Files reviewed: 75/103 changed files
  • Comments generated: 11
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


export async function fetchSpending(userId: string): Promise<Transaction[]> {
const response = await api.get('/transactions/spending', { params: { owner_id: userId } })
return response.data.map(transactionFromApi)
Comment on lines +39 to +52
@router.get("")
def list_accounts(
session: SessionDep,
requester_id: UUID = Query(...),
owner_id: UUID | None = Query(default=None)
):
try:
requester = get_db_user(session, requester_id)
if not requester.is_admin:
if owner_id is not None and owner_id != requester_id:
raise HTTPException(status_code=403, detail="Customers can only see their own accounts")
owner_id = requester_id
accounts = account_service.get_accounts(session, str(owner_id) if owner_id is not None else None)

def read_spending_history(session: SessionDep, owner_id: UUID):

try:
return transaction_service.get_withdrawals(session, owner_id)
Comment on lines +35 to +46
@router.get("")
def list_users(
session: SessionDep
):
users = user_service.get_all_users(session)

return {
"users": [
user_to_dict(user)
for user in users
]
}
Comment on lines +1 to +7
from datetime import datetime, timedelta, timezone
from jose import jwt


SECRET_KEY = "change-this-later"
ALGORITHM = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES = 30
Comment on lines +16 to +21
network = jsonencode({
restrictions = [
"0.0.0.0/0",
"::/0"
]
})
Comment on lines +42 to +46
variable "ssh_ingress_cidr" {
type = string
description = "CIDR allowed to SSH to the API instance. Tighten this to your IP."
default = "0.0.0.0/0"
}
Comment on lines +65 to +71
ingress {
description = "FastAPI via API Gateway HTTP proxy"
from_port = 8000
to_port = 8000
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
Comment on lines +15 to +30
resource "aws_apigatewayv2_integration" "root" {
api_id = aws_apigatewayv2_api.http.id
integration_type = "HTTP_PROXY"
integration_method = "ANY"
integration_uri = "http://${aws_instance.api.public_ip}:8000/"
connection_type = "INTERNET"
timeout_milliseconds = 29000
}

resource "aws_apigatewayv2_integration" "proxy" {
api_id = aws_apigatewayv2_api.http.id
integration_type = "HTTP_PROXY"
integration_method = "ANY"
integration_uri = "http://${aws_instance.api.public_ip}:8000/{proxy}"
connection_type = "INTERNET"
timeout_milliseconds = 29000
Comment on lines +1 to +11
# Banking app Terraform bootstrap

Provisions the grade-ready AWS network plus a Supabase Postgres database that FastAPI already speaks through `DATABASE_URL`.

Created resources:

- VPC, public subnet, internet gateway, public route
- EC2 host for FastAPI (`project1`)
- HTTP API Gateway proxying to that host
- S3 website bucket for the Vite frontend
- Supabase project (managed PostgreSQL)
@kchandan
kchandan merged commit de0a1b6 into becloudready:master Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants