This is a Money Transfer application developed using Java Spring Boot. The application handles user registration, login, logout, and JWT authentication. Each customer can create an account, manage their account details, transfer money between accounts, and view transaction history.
1.User Registration
2.Login with Email and Password
3.Logout (Destroy JWT Token)
4.Create Account (One Account per Customer)
5.Get Customer by ID
6.Get Account by Account Number
7.Session Management
8.Transfer Money Between Accounts
9.Update Account Info
10.Change Password (Old and New Password)
11.Add Account to Favourites
12.View Transaction History (Sorted by Date)
- Java 11 or higher
- Maven 3.6.0 or higher
- Postgres or any other relational databa
- Clone the repository:
git clone https://github.com/FilopateerFouad/Final-BM-internship-Backend-Project
cd Final-BM-internship-Backend-Project
- Configure the database: Update the -- application.properties file in src/main/resources with your database configuration.
spring.datasource.url=jdbc:postgresql://localhost:5432/your_db_name
spring.datasource.username=your_db_username
spring.datasource.password=your_db_password
spring.jpa.hibernate.ddl-auto=update
- Install dependencies and build the project:
mvn clean install
- Run the application:
mvn spring-boot:run
- Access Swagger UI for API Documentation:
Open your browser and navigate to http://localhost:8080/swagger-ui.html
we deploy on AWS so you can try any api endpoint using this host http://13.60.187.217:8080
- Register a new user:
POST /api/v1/auth/register
{
"name": "username",
"email": "user@example.com",
"password": "password",
"confirmPassword":"password",
"country":"anycountry",
"dateOfBirth":"year-month-day",
"currency":"example_Egy"
}
- Login:
POST /api/v1/auth/login
{
"email": "user@example.com",
"password": "password"
}
Response will include a JWT token and account info
- Logout:
POST /api/v1/auth/logout
Authorization: Bearer <jwt_token>
- Get account by account number:
GET /api/v1/account/getaccount/{accountNumber}
Authorization: Bearer <jwt_token>
- Get account Balance:
GET /api/v1/account//balance/{accountNumber}
Authorization: Bearer <jwt_token>
- Get customer by ID:
GET /api/v1/customers/{id}
Authorization: Bearer <jwt_token>
- Update customer info: any data is wanted to be changed and the id must be sent
PUT /api/v1/customers/data/{customerId}
Authorization: Bearer <jwt_token>
{
"customerId": "long",
"name":"new_name",
"email": "new_email"
}
- Change password:
PUT /api/v1/customers/password/{customerId}
Authorization: Bearer <jwt_token>
{
"oldPassword": "your_old_password",
"newPassword": "your_new_password"
}
- Transfer money between accounts:
POST /api/v1/account/transfer
Authorization: Bearer <jwt_token>
{
"fromAccount": "1234567890",
"toAccount": "0987654321",
"amount": 100.00
}
- View transaction history
GET /api/v1/account/transactions/{accountNumber}
Authorization: Bearer <jwt_token>
- Add account to favourites:
POST /api/v1/favourites/{accountNumber}
Authorization: Bearer <jwt_token>
{
"recipientName":"your_favourite_name",
"recipientAccount": "yout_favourite_account_number"
}
- Get favourite list
GET /api/v1/favourites/{customerId}
Authorization: Bearer <jwt_token>
- Delete favourite
DELETE /api/v1/favourites
Authorization: Bearer <jwt_token>
{
"recipientName":"your_favourite_name",
"recipientAccount": "yout_favourite_account_number"
}
- JWT tokens are used for securing the API endpoints.
- Spring Boot
- Spring Security
- JWT
- Swagger
- Postman
- AWS
1-Account Creation
2-Transaction History(Add Transaction to all the project)
3-Account Balance
4-Favourite Recipients
5-Testing
6-Docker File
1-Account Logiin
2-Account Logout
3-Session Management
4-Money Transfer
5-Deploy
6-Docker File