💁 Account creation, login, and logout functionalities
📓 Deposit, withdrawal, and transaction logging capabilities
💻 An intuitive web UI for data input
The application utilizes the following packages and tools:
-
FastAPI: Connects the backend and frontend components
-
HTML/CSS: Constructs the dashboard and website interface
-
MySQL: Stores user data
-
Session Cookies: Remembers users, eliminating the need for constant logins
-
Logging: Tracks user actions
You can run the application in two ways: by setting it up manually or by using a pre-built Docker image. The latter is recommended for convenience, but both methods are available.
Packages to Install: FastAPI, datetime, logging, pymysql.cursors, uvicorn
When configuring the MySQL database, ensure the settings match your local environment. Here’s an example configuration:
connection = pymysql.connect(
host='localhost',
user='user1',
password='helloworld',
database='bank',
charset='utf8mb4',
cursorclass=pymysql.cursors.DictCursor
)Replace the host, user, password, and database variables with your own MySQL database configurations.
Execute the following command in your terminal to launch the application:
uvicorn main:app --reloadThe app should then be accessible in your browser.
Using Docker simplifies the setup process by bundling all required packages and code into a single image, eliminating the need for manual installation and configuration.
The Docker image for this application is available on Docker Hub. To download it, run:
docker pull jam777/bankofmed:latestAfter pulling the image, start the application with the following command:
docker run -d -p 8000:8000 -e HOST=host_name -e USER=username -e PASSWORD=password -e DATABASE=database jam777/bankofmed:latestReplace the HOST, USER, PASSWORD, and DATABASE environment variables with your own configurations.
And that’s all there is to it!
Here's a glimpse of the app's standout features—take a look at the transactions log!
