Welcome to Loretta Bank, an online banking application built with Node.js, Express, PostgreSQL, and React. Loretta Bank offers a secure, user-friendly platform for managing your banking needs online.
- User Authentication (Sign Up, Log In, Log Out)
- Account Management (Create, View, Update, Delete Accounts)
- Fund Transfers (Internal and External)
- Transaction History
- Balance Inquiries
- Responsive Design
- Backend: Node.js, Express
- Database: PostgreSQL
- Frontend: React
- Authentication: JWT (JSON Web Tokens)
- Styling: CSS, Bootstrap
- Docker and Docker Compose installed
- Git installed
-
Clone the repository:
git clone https://github.com/7irelo/loretta-bank-web.git cd loretta-bank-web
-
Build and start the containers:
docker-compose up --build
Make sure to update your environment variables as needed. Here are the default ones used in the Docker setup:
-
Backend
.env
:PORT=3001 DATABASE_URL=postgres://postgres:password@db:5432/loretta_bank JWT_SECRET=your_jwt_secret
-
Frontend
.env
:REACT_APP_API_URL=http://localhost:5173
- Open your web browser and navigate to
http://localhost:5173
- Sign up for a new account or log in with your existing credentials
- Manage your accounts, transfer funds, and view transaction history
POST /api/auth/register
- Register a new userPOST /api/auth/login
- Log in a userGET /api/auth/me
- Fetch logged in userPUT /api/auth/logout
- Update logged in userPATCH /api/auth/logout
- Update logged in user
GET /api/accounts
- Get all accounts for the authenticated userPOST /api/accounts
- Create a new accountGET /api/accounts/:id
- Get a specific accountPUT /api/accounts/:id
- Update a specific accountDELETE /api/accounts/:id
- Delete a specific account
GET /api/transactions
- Get all transactions for the specific accountPOST /api/transactions
- Create a new transactionGET /api/transactions/:id
- Get a specific transactionPUT /api/transactions/:id
- Update a specific transactionDELETE /api/transactions/:id
- Delete a specific transaction
GET /api/cards
- Get all cards for the specific accountPOST /api/cards
- Create a new cardGET /api/cards/:id
- Get a specific cardPUT /api/cards/:id
- Update a specific cardDELETE /api/cards/:id
- Delete a specific card
GET /api/loans
- Get all loans for the specific accountPOST /api/loans
- Create a new loanGET /api/loans/:id
- Get a specific loanPUT /api/loans/:id
- Update a specific loanDELETE /api/loans/:id
- Delete a specific loan
GET /api/support
- Get all support tickets for the specific userPOST /api/support
- Create a new support ticketGET /api/support/:id
- Get a specific support ticketPUT /api/support/:id
- Update a specific support ticketDELETE /api/support/:id
- Delete a specific support ticket
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature/your-feature-name
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature/your-feature-name
) - Open a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries or issues, please contact us at support@lorettabank.com.
loretta-bank-web/
├── client/ # React frontend
│ ├── public/
│ ├── src/
│ ├── .env
│ ├── Dockerfile
│ └── package.json
├── server/ # Node.js backend
│ ├── config/ # Database and app configuration
│ ├── controllers/ # Route controllers
│ ├── middlewares/ # Middleware functions
│ ├── models/ # Database models
│ ├── routes/ # API routes
│ ├── services/ # Business logic
│ ├── utils/ # Utility functions
│ ├── .env
│ ├── Dockerfile
│ └── package.json
├── docker-compose.yml # Docker Compose configuration
└── README.md