A simple banking system template that can be used by banks.
- Install and configure Docker.
- Clone and navigate to the project repository.
- Copy the
.env.example
file into a new file called.env
and fill in the specified variables. - Run
docker compose up
to start the server. - Access the database at localhost:8001 and sign in using your previously set credentials
- Paste in the SQL command from
docker_employee.sql
to create the employee/administrator user. - Navigate to localhost:8000 and you can now log in to the employee account with the credentials from the SQL file.
- Install Go v1.23+
- Install Postgres 17
- Clone this repo and cd to the directory
- Log in and connect to psql by running
psql -h localhost -p 5432 -U postgres
in the command line (Note: psql may need to be added to PATH/be set in an environment variable) - Enter the password (default password for username postgres is
postgres
). - Run
ALTER USER postgres WITH PASSWORD 'new_password';
. Try to avoid special characters. - Exit the psql session by typing
\q
. - Reconnect to psql with the new password.
- Run
CREATE DATABASE banking;
- Create a
.env
file and fill in values by following the example in.env.example
- Run
go run .
- The server should be up on the port specified in
.env
These steps should be done after running the webserver at least once.
- Connect to the database using
psql -h localhost -p 5432 -U postgres -d banking
. Make sure you run this in the base directory of the project. - Run
\i create_employee.sql
. Enter all the values when prompted. A value in parenthesis indicates the default value if left empty.
To customize the look of the website, modify the values in the config.env
file.
BANK_NAME
should be replaced with the name of the bank.LOGO
should include the url of or file path to the bank's logo.BANNER
should include the url of or file path to the image to be used for the top banner.PRIMARY_HEX
should include the hex code for the primary color of the website. Note: include the#
(e.g.#545F71
)
In .env
, there are two keys for EMAIL_SENDER
and EMAIL_PASSWORD
. This is for the purpose of sending 2FA codes.
EMAIL_SENDER
should be the Gmail account to send these codes.EMAIL_PASSWORD
should contain the app password for the Gmail account. See this link for more info on app passwords.