A simple bank account application with Express backend and vanilla JavaScript frontend.
- User account management with unique user IDs
- Deposit and withdrawal functionality
- Transaction history
- Balance tracking
- Input validation
- Error handling
- Responsive UI
- Install dependencies:
npm install- Start the server:
npm start- Open your browser and navigate to:
http://localhost:3000
- Backend: Express.js
- Frontend: Vanilla JavaScript, HTML, CSS
- Data Storage: In-memory (Map object)
- API Endpoints:
- GET /api/balance?userId={userId} - Get account balance and transactions
- POST /api/balance - Process transaction (deposit/withdrawal)
- Data is stored in memory and will be lost when the server restarts
- Each user can have up to 10 most recent transactions
- Withdrawals are prevented if the amount exceeds the current balance