Full‑stack Bank Management System built with:
- React (Create React App) in
client/ - Node.js + Express API in
server/ - PostgreSQL (Neon) database
Live API: [API base]/ Live Frontend: [Frontend URL]
.
├── client/ # React frontend (CRA)
│ ├── src/components/ # UI components
│ └── src/utils/api.js # API helper (uses REACT_APP_API_URL)
├── server/ # Express API
│ ├── app.js # Routes/controllers/middleware
│ ├── database.js # pg Pool + env config
│ └── database-setup/ # SQL helpers for schema/seed
├── render.yaml # Render config (API)
├── neon-db-init.sql # Optional seed helpers
└── README.md # This file
Server (server/.env)
# Prefer a single DATABASE_URL on Render/Neon
DATABASE_URL=postgresql://USER:PASSWORD@HOST:PORT/DB
# or individual variables for local dev
DB_USER=postgres
DB_PASSWORD=postgres
DB_HOST=localhost
DB_PORT=5433
DB_NAME=BANK
# Optional CORS front-end origin
FRONTEND_URL=https://your-frontend.onrender.com
NODE_ENV=production
Client (client/.env)
REACT_APP_API_URL=https://your-api.onrender.com
-
Terminal 1 (API)
cd server && npm install && npm run dev
Runs on http://localhost:5000
-
Terminal 2 (Frontend)
cd client && npm install && npm start
CRA dev server on http://localhost:3000
API (Web Service)
- Root Directory:
server - Build Command:
npm ci - Start Command:
node app.js - Health Check Path:
/ping - Env: set
DATABASE_URL, remove customPORT
Frontend (Static Site)
- Build Command:
npm ci && npm run build - Publish Directory:
client/build - Set
REACT_APP_API_URLin environment
Auth
- POST
/customer/login - POST
/employee/login - POST
/manager/login
Resources
- Customers: GET
/customer, POST/customer, PUT/customer/:customer_id, DELETE/customer/:customer_id - Employees: GET
/employee, POST/employee, PUT/employee/:emp_id, DELETE/employee/:username - Branches: GET
/branch, POST/branch, PUT/branch/:branch_id, DELETE/branch/:branch_id - Accounts: GET
/accounts, GET/accounts/:customer_id, POST/accounts, DELETE/accounts/:account_id - Transactions: GET
/transaction/:customer_id, POST/transaction
Health/Debug
- GET
/ping(liveness) - GET
/health(DB check) - GET
/debug/tables(introspection)
server/database.jsusesDATABASE_URLif present; otherwise individual vars.- SSL is enabled for production. Ensure Neon requires SSL or set appropriately.
- Seeding: you can use
neon-db-init.sqlor the SQL append scripts you ran.
- CORS allows your
FRONTEND_URLand any*.onrender.comorigin. - Parameterized queries with
pg. - Basic input validation and error handling.
Root shortcuts (optional):
npm run dev # cd server && npm run dev
npm start # cd server && npm startBuilt by Sahil Talreja.








