This project is a Java-based application developed as part of an interview project. It is designed to manage credit cards, users, and their balance histories.
The project consists of a backend server built using Java and Spring Boot. It provides RESTful APIs for managing users, credit cards, and their balance histories. The application uses Spring Data JPA for data persistence and follows the MVC (Model-View-Controller) architecture pattern.
- Create, read, update, and delete users
- Add credit cards to users
- Retrieve all credit cards associated with a user
- Find the user associated with a credit card
- Update credit card balance history with transactions
Before running the application, ensure you have the following installed:
- Java Development Kit (JDK) 8 or later
- Apache Maven
- MySQL or another compatible database server
-
Clone the repository to your local machine:
git clone https://github.com/your-username/interview-project.git
-
Navigate to the project directory:
cd interview-project
-
Build the project using Maven:
mvn clean package
-
Run the application:
java -jar target/interview-project.jar
Once the application is running, you can interact with it using any HTTP client, such as Postman. The application exposes RESTful endpoints for managing users and credit cards. See the Endpoints section for details on available endpoints and their usage.
- POST /user: Create a new user.
- DELETE /user: Delete a user by ID.
- POST /credit-card: Add a credit card to a user.
- GET /credit-card:all: Retrieve all credit cards associated with a user.
- GET /credit-card:user-id: Find the user associated with a credit card by card number.
- POST /credit-card:update-balance: Update credit card balance history with transactions.
This project is licensed under the MIT License.