{"id":19403793,"url":"https://github.com/joeltadeu/atm-simulator","last_synced_at":"2026-04-29T21:06:33.397Z","repository":{"id":208145217,"uuid":"454227427","full_name":"joeltadeu/atm-simulator","owner":"joeltadeu","description":"This project contains basic operations to simulate a ATM machine as get account balance and dispense money using a microservice architecture with spring-boot, sprinc-contract-test and java 17","archived":false,"fork":false,"pushed_at":"2022-02-08T00:44:53.000Z","size":157,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T00:34:07.659Z","etag":null,"topics":["docker","docker-compose","h2-database","java17","spring-boot","spring-cloud-contract","spring-feign"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joeltadeu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-01T01:30:11.000Z","updated_at":"2023-11-19T23:44:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"9caa4569-fd11-4ff7-9c01-b1c0696665a4","html_url":"https://github.com/joeltadeu/atm-simulator","commit_stats":null,"previous_names":["joeltadeu/atm-simulator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joeltadeu/atm-simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeltadeu%2Fatm-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeltadeu%2Fatm-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeltadeu%2Fatm-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeltadeu%2Fatm-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeltadeu","download_url":"https://codeload.github.com/joeltadeu/atm-simulator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeltadeu%2Fatm-simulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32443618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T20:22:27.477Z","status":"ssl_error","status_checked_at":"2026-04-29T20:22:26.507Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","h2-database","java17","spring-boot","spring-cloud-contract","spring-feign"],"created_at":"2024-11-10T11:30:31.096Z","updated_at":"2026-04-29T21:06:33.371Z","avatar_url":"https://github.com/joeltadeu.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ATM machine\n\n## Overview:\n\nWe all know how ATM machines work… don’t we? You are tasked with developing software for one that:\n\nshould initialize with the following accounts:\n\n| Account Number | PIN      |   Opening Balance   | Overdraft   |\n|----------------|----------|:-------------------:|-------------|\n| 123456789      | 1234     |         800         | 200         | \n| 987654321      | 4321     |        1230         | 150         |\n\n### Business rules ###\n* should initialize with €1500 made up of 10 x €50s, 30 x €20s, 30 x €10s and 20 x €5s\n* should not dispense funds if the pin is incorrect,\n* cannot dispense more money than it holds,\n* cannot dispense more funds than customer have access to\n* should not expose the customer balance if the pin is incorrect,\n* should only dispense the exact amounts requested,\n* should dispense the minimum number of notes per withdrawal,\n\nThe application should receive the data, process the operations, and then output the results, it is responsible for validating customer account details and performing basic operations as described by API requirements:\n\n* Create a Rest API (curl, postman, browser) that should be able to request a balance check along with maximum withdrawal amount (if any),\n* User should be able to request a withdrawal. If successful - details of the notes that would be dispensed along with remaining balance,\n* If anything goes wrong, user should receive meaningful message, and there should be no changes in user’s account,\nAssume application will be distributed as Docker image. Provide Dockerfile, but don’t waste too much time for building and testing docker image, focus on functionality.\n\nAssume importance levels:\n* Code working as described in requirements,\n* Application is building with mvn install or gradle build command (or any basic build command working on behalf of programming language you choose),\n* Unit tests are included. Coverage level depends on time you have left to complete the assignment, but we would like to see business logic (service layer) coverage at 60%,\n* Other things you would like to implement for this project (ex. Database, application test coverage over 90%, API for gathering different statistics, UI or whatever else you think would make your application extraordinary)\n\n## Architecture:\n![Alt text](_assets/atm-simulator-architecture.svg?raw=true \"ATM Simulator Architecture\")\n\n### EndPoints ###\n\n| Service   | EndPoint                              | Port | Method | Description                           |\n|-----------|---------------------------------------|:----:|:------:|---------------------------------------|\n| ATM       | /v1/atm/dispense                      | 7500 |  POST  | Dispense amount requested by the user |\n| ATM       | /v1/atm/balance                       | 7500 |  GET   | Get balance from account              |\n| Account   | /v1/accounts/{accountNumber}/balance  | 7501 |  GET   | Get balance from account              |\n| Account   | /v1/accounts/{accountNumber}/withdraw | 7501 |  PUT   | Withdraw money from account           |\n| Account   | /v1/accounts/{accountNumber}/deposit  | 7501 |  PUT   | Deposit money to account              |\n\n### Documentation and examples ###\n\n### Swagger\n\n- **ATM** : http://localhost:7500/swagger-ui.html\n- **Accounts** : http://localhost:7501/swagger-ui.html\n\n### Postman collection\n\n![Alt text](_assets/postman-collection-folder.png?raw=true \"Postman collection folder\")\n\n## Build \u0026 Run\n\nto build\n```\nmvn clean package\n```\nbuild docker images and containers and run containers\n```\ndocker-compose up --build\n```\nstop the dockerized services\n```\ndocker-compose stop\n```\n\nIn docker-compose.yml file:\n\n- ATM Service : **__7500__** port is mapped to **__7500__** port of host\n- Account Service : **__7501__** port is mapped to **__7501__** port of host\n\n## Versions\n\n### 1.0.0\n\n- Spring-Boot 2.6.3\n- Spring Cloud Contract Test\n- Java 17","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeltadeu%2Fatm-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeltadeu%2Fatm-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeltadeu%2Fatm-simulator/lists"}