The Banking Application is a full-stack web application designed to handle essential banking functions, such as user authentication, transactions between users, and account management. The backend is built using Spring Boot and MySQL, while the frontend is developed with React.
- User Authentication
- Crediting and debiting users
- Formulating a cash flow statement
- Transactions between users
- Email security notifications
This guide will walk you through the steps to set up, install dependencies, and run the Banking Application using IntelliJ, MySQL, and React.
Before you begin, ensure you have the following installed on your machine:
- IntelliJ IDEA (Ultimate or Community Edition)
- MySQL
- Node.js (for React frontend)
- Maven (Optional, if not bundled with IntelliJ)
-
Install MySQL:
- Download and install MySQL from the official website.
- During the installation, set the root password and make sure you install MySQL Workbench (optional).
-
Create a Database:
- Open MySQL Workbench or the MySQL CLI.
- Create a new database for your Banking Application. Run the following command:
CREATE DATABASE banking_app;
-
Configure MySQL to Run on Port 8000:
- In your MySQL configuration file (typically
my.iniormy.cnf), find the[mysqld]section and change theportvalue to8000:[mysqld] port=8000
- Restart your MySQL service for changes to take effect.
- In your MySQL configuration file (typically
-
Create a User and Grant Privileges:
- Run the following SQL to create a new user and grant privileges:
CREATE USER 'banking_user'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON banking_app.* TO 'banking_user'@'localhost'; FLUSH PRIVILEGES;
- Run the following SQL to create a new user and grant privileges:
-
Clone the Banking Application Repository:
- Open IntelliJ IDEA.
- Navigate to
File -> New -> Project from Version Controland clone the Banking Application repository from GitHub.git clone https://github.com/your-username/Banking_Application.git
-
Install Dependencies (Maven):
- Open the
pom.xmlfile from the root of your project in IntelliJ. - Click on the Load Maven Changes button that appears, or right-click on
pom.xmland selectMaven -> Reload Project. - This will install all required dependencies defined in the
pom.xmlfile.
- Open the
-
Configure
application.properties:- Open the
src/main/resources/application.propertiesfile and configure the database settings as follows:spring.datasource.url=jdbc:mysql://localhost:8000/banking_app spring.datasource.username=banking_user spring.datasource.password=password spring.jpa.hibernate.ddl-auto=update
- Open the
-
Run the Application:
- Right-click the
BankingApplicationclass in thesrc/main/java/com/yourapppackage and selectRun 'BankingApplication'. - The backend should now be running on
http://localhost:8080.
- Right-click the
-
Install Node.js:
- Download and install Node.js.
- Verify the installation by running the following commands in your terminal:
node -v npm -v
-
Navigate to the Frontend Folder:
- In your terminal, navigate to the
frontenddirectory of the Banking Application:cd Banking_Application/frontend
- In your terminal, navigate to the
-
Install Frontend Dependencies:
- Run the following command to install all required dependencies for the React frontend:
npm install
- Run the following command to install all required dependencies for the React frontend:
-
Run the React Frontend:
- Start the React frontend by running:
npm start
- The React app should now be running on
http://localhost:3000.
- Start the React frontend by running:
- Make sure the backend is running on
http://localhost:8080and the frontend onhttp://localhost:3000. - Navigate to
http://localhost:3000in your browser to use the Banking Application. - When you log in or perform any actions, the React frontend will communicate with the Spring Boot backend.
- Port Conflicts: Ensure no other services are running on ports 8000 (MySQL), 8080 (backend), or 3000 (frontend).
- Database Connection Errors: Double-check your MySQL credentials in
application.properties.
If you're ready to deploy the application, follow these steps to build both the backend and frontend for production.
-
Build the Backend (Maven):
- Run the following Maven command to package the backend:
mvn clean install
- Run the following Maven command to package the backend:
-
Build the Frontend (React):
- In the
frontenddirectory, run:npm run build
This will create a
build/folder with the optimized React app ready for deployment. - In the
You have successfully set up the Banking Application using IntelliJ, MySQL, and React. You can now develop, test, and deploy your application.
For any issues, refer to the documentation or seek help from the community.
