A React-based banking application that simulates basic bank account operations with user registration and authentication.
This application provides a complete banking experience with:
- User registration and authentication
- Account balance management
- Deposit and withdrawal operations
- Loan request and payment functionality
- Secure logout with balance validation
- User Registration: Secure user registration with password confirmation
- Account Dashboard: Real-time balance and loan status display
- Financial Operations:
- Deposit money into account
- Withdraw money (with balance validation)
- Request loans (one active loan at a time)
- Pay off existing loans
- Security: Automatic logout when balance reaches zero
- Responsive Design: Clean, modern UI built with React
- Frontend: React 19.0.0
- Build Tool: Vite 6.1.0
- State Management: React useReducer hooks
- Styling: CSS with modern design patterns
- Development: ESLint for code quality
- Node.js (version 18 or higher)
- npm or yarn
- Clone the repository
- Navigate to the project directory:
cd Websites/Bank/main - Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and visit
http://localhost:5173
npm run dev- Start development servernpm run build- Build for productionnpm run lint- Run ESLintnpm run preview- Preview production build
src/
├── App.jsx # Main application component
├── components/ # Reusable UI components
├── index.css # Global styles
├── main.jsx # Application entry point
└── useKey.js # Custom hook for keyboard events
- Registration: Create a new account with username, first name, last name, and password
- Login: Access your account dashboard
- Banking Operations:
- View your current balance and loan status
- Deposit money to increase your balance
- Withdraw money (if sufficient balance)
- Request a loan (if no active loan)
- Pay off your loan
- Logout: Securely log out (automatic if balance reaches zero)
The application uses React's useReducer hook for state management:
- User State: Handles registration, authentication, and user data
- Bank State: Manages account balance, loans, and financial operations
This is a learning project demonstrating React concepts including:
- Component composition
- State management with useReducer
- Form handling
- Conditional rendering
- Custom hooks
This project is for educational purposes.