Skip to content

This project implements a banking system using Spring Boot for the backend and Angular for the frontend. The system provides APIs for managing customers, accounts, and transactions.

Notifications You must be signed in to change notification settings

PeterEst/ng-spring-banking

Repository files navigation

Equadis - Banking

This project implements a banking system using Spring Boot for the backend and Angular for the frontend. The system provides APIs for managing customers, accounts, and transactions.

Expectations

  • API to create customer ✅
  • API to create an account with initial balance ✅
  • APIs to deposit and withdraw certain amounts ✅
  • APIs to query transactions ✅
  • Public Github ✅

Bonuses

  • Containerization working perfectly with Docker ✅
  • Needed scripts to automate CI ✅

Additionals

  • Pagination: Enhances user experience by dividing large datasets into manageable pages, ensuring quicker loading times and efficient navigation through transaction histories or customer data in the banking system.

  • Debounced Search Query (Accounts Listing): Optimized the search functionality with a debounced search query, providing users with a smoother and more responsive experience while reducing unnecessary API calls and enhancing overall performance.

  • Swagger Endpoint: Explore and test APIs effortlessly using Swagger UI by navigating to the /swagger-ui/index.html endpoint using spring boot's port.

  • Unit Testing & Github Actions: Implemented and executed simple unit tests for transaction deposit and withdrawal functionality. Ensured thorough testing and validation before any merge or push to the main branch for robust code quality.

  • Postman Collection: Suite of requests to interact with and verify the functionality of the APIs.

Run

1- Clone the project & go to the project directory

  git clone https://github.com/PeterEst/equadis-banking
  cd equadis-banking

2- Create a .env file in the project root and add the necessary environment variables. You can use the provided .env.example file as a template.

  cp .env.example .env
  • Update the values in the .env file as needed. If SPRING_BOOT_DOCKER_PORT is changed other than 8080, make sure to update the NGINX configuration nginx.conf in the frontend folder to match the Docker network backend port.
  location /api {
        proxy_pass http://spring-boot-app:8080;
   }
  • Leave the SA_USERNAME environment variable as sa (System Administrator)

  • Generate a strong password for the SA_PASSWORD environment variable. A strong password should include a mix of capital letters, small letters, and special characters. You can follow the guidelines provided by Microsoft SQL Server Here.

3- Execute the following command in the root folder to build and run the project:

Before executing this command, ensure that the Docker daemon is running.

  docker-compose up

This command will start three services - Microsoft SQL Server, Spring Boot backend, and Angular frontend - creating a fully functional Equadis Banking System.

Important Note: Ensure the database is created. Spring Boot will keep failing on initial startup due to the restart: on-failure configuration in the Docker Compose file. Once a database with the name specified in the MSSQL_DATABASE_NAME environment variable is created, Spring Boot will work automatically.

There are multiple ways to access the SQL Server and create the database:

Make sure MSSQL / SQL Server container having name of `ms-sql-server`
is working with a status of UP using: `docker ps` command
  • Accessing the Docker container directly:

    • docker exec -it ms-sql-server sh
    • /opt/mssql-tools/bin/sqlcmd -U <SA_USERNAME> -P <SA_PASSWORD> -Q "CREATE DATABASE <MSSQL_DATABASE_NAME>" (Variables set in .env)
    • exit (exits sqlcmd)
    • exit (exits shell)
  • Installing a CLI tool and accessing the database (e.g., using sql-cli npm package)

    • npm i -g sql-cli
    • mssql -u <SA_USERNAME> -p <SA_PASSWORD>
    • create database <MSSQL_DATABASE_NAME>
  • Using any GUI database tool.

4- The system should be up and running!

About

This project implements a banking system using Spring Boot for the backend and Angular for the frontend. The system provides APIs for managing customers, accounts, and transactions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published