Online Banking Application API (ASP.NET Core, SQL Server, Redis)
MIT License
Welcome to Loretta Bank, an online banking application built with ASP.NET Core and PostgreSQL. Loretta Bank offers a secure, user-friendly platform for managing your banking needs online.
Clone the repository:
git clone https://github.com/7irelo/loretta-asp-api.git
cd loretta-asp-api
Set up PostgreSQL:
psql -U postgres -c "CREATE DATABASE loretta_bank;"
psql -U postgres -c "CREATE USER loretta_user WITH PASSWORD 'password';"
psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE loretta_bank TO loretta_user;"
Update the appsettings.json
file with your database connection string:
{
"ConnectionStrings": {
"DefaultConnection": "Host=localhost;Database=loretta_bank;Username=loretta_user;Password=password"
},
"Jwt": {
"Key": "your_jwt_secret_key",
"Issuer": "loretta_bank",
"Audience": "loretta_bank_users",
"ExpiresInMinutes": 60
}
}
Run the application:
dotnet build
dotnet run
Build and start the containers:
docker-compose up --build
The application will be accessible at http://localhost:5000
.
http://localhost:5000/api/
/auth/login
endpoint to obtain a JWT token, which should be included in the Authorization
header for subsequent requests.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
- Log out a userGET /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 accountGET /api/transactions
- Get all transactions for the authenticated userPOST /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 transactionGET /api/cards
- Get all cards for the authenticated userPOST /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 cardGET /api/loans
- Get all loans for the authenticated userPOST /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 loanGET /api/support
- Get all support tickets for the authenticated 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 ticketContributions are welcome! Please follow these steps to contribute:
git checkout -b feature/your-feature-name
).git commit -m 'Add some feature'
).git push origin feature/your-feature-name
).This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries or issues, please contact us at [email protected].
loretta-bank-api/
LorettaBank.Api/ # ASP.NET Core API project
Controllers/ # API Controllers
Models/ # Data models
Services/ # Business logic
Data/ # Database context and migrations
appsettings.json # Configuration settings
Startup.cs # Application startup configuration
LorettaBank.Tests/ # Unit and integration tests
docker-compose.yml # Docker Compose configuration
README.md
This README should now be suitable for an ASP.NET Core backend project for the Loretta Bank application.