The ATM Simulation System is a Spring Boot backend project that simulates ATM operations like account login, balance inquiry, deposits, withdrawals, and viewing transaction history. It focuses on clean architecture, layered design, and REST API development best practices.
- User login using account number and PIN
- Balance inquiry endpoint
- Deposit and withdraw functionality with validation
- Transaction history endpoint
- Clean separation of controller, service, repository layers
- Proper exception handling and response formatting
- Java 17+
- Spring Boot (Web, JPA)
- Hibernate ORM
- H2 / MySQL
- Maven
- Lombok
com.connectme.atm
βββ controller // REST API controllers
βββ service // Interfaces and implementations
βββ model // JPA entity classes
βββ dto // Request/response models
βββ repository // JPA repositories
βββ exception // Custom exception classes
βββ config // Config classes (if needed)
- Clone the project
git clone https://github.com/yourusername/atm-simulation-system.git
cd atm-simulation-system- Configure
application.properties(for H2 or MySQL):
spring.datasource.url=jdbc:h2:mem:atmdb
spring.datasource.driverClassName=org.h2.Driver
spring.jpa.hibernate.ddl-auto=update- Run the app
./mvnw spring-boot:runAPI Base URL: http://localhost:8080/api/atm/
POST /api/atm/login
{
"accountNumber": "12345678",
"pin": "1234"
}GET /api/atm/balance/12345678POST /api/atm/withdraw
{
"accountNumber": "12345678",
"amount": 500
}POST /api/atm/deposit
{
"accountNumber": "12345678",
"amount": 1000
}GET /api/atm/transactions/12345678Feel free to fork this project and raise pull requests. For any suggestions, feel free to open issues.
Created by [Harshit Varshney] β feel free to reach out on [[email protected]]