{"id":26378473,"url":"https://github.com/atlas-is-coding/go-bank-service","last_synced_at":"2025-03-17T04:52:05.177Z","repository":{"id":179113973,"uuid":"592252685","full_name":"atlas-is-coding/go-bank-service","owner":"atlas-is-coding","description":"It is a sample bank application built using the Go programming language.","archived":false,"fork":false,"pushed_at":"2023-02-14T12:54:43.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T12:29:20.853Z","etag":null,"topics":["api","banking-api","banking-applications","docker","golang","postgresql","swagger"],"latest_commit_sha":null,"homepage":"","language":"Go","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/atlas-is-coding.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":"2023-01-23T10:18:45.000Z","updated_at":"2023-07-09T03:36:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb5624f2-2bb6-46a7-a5a3-258e89f2f860","html_url":"https://github.com/atlas-is-coding/go-bank-service","commit_stats":null,"previous_names":["dgaliaf/go-bank-service","atlas-is-coding/go-bank-service"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlas-is-coding%2Fgo-bank-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlas-is-coding%2Fgo-bank-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlas-is-coding%2Fgo-bank-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlas-is-coding%2Fgo-bank-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atlas-is-coding","download_url":"https://codeload.github.com/atlas-is-coding/go-bank-service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243976512,"owners_count":20377691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["api","banking-api","banking-applications","docker","golang","postgresql","swagger"],"created_at":"2025-03-17T04:52:04.168Z","updated_at":"2025-03-17T04:52:05.159Z","avatar_url":"https://github.com/atlas-is-coding.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Bank Service\n\nIt is a sample bank application built using the Go programming language. The application allows to create users, charge/remove user balance, transfer money from one user to another\n\n## Features\n\n- Create user\n- Charge user balance\n- Remove user balance\n- Transfer money\n\n## Tech\n\nThe following technologies were used in the development of this project:\n\n- [Golang](https://go.dev)\n- [HttpRouter](https://github.com/julienschmidt/httprouter) - HttpRouter by julienschmidt\n- [PostgreSQL](https://www.postgresql.org) - [pgx](https://github.com/jackc/pgx) (PostgreSQL Driver and Toolkit) by jackc\n- [Swagger](https://swagger.io) - [swag](https://github.com/swaggo/swag) (Automatically generate RESTful API) by swaggo\n- [Docker](https://www.docker.com)\n\n## Installation\n\nGo Bank Service requires [Golang](https://go.dev/dl/) v1.20.0+ to run.\n\n- Install and start PostgreSQL\n- Change configuration file `/configs/config.local.yml`\n- Install docker and start the server.\n\n```sh\ncd go-bank-service\ngo run app/cmd/app/main.go\n```\n\n## Docker\n\u003e Go Messenger is very easy to run through Docker container.\n\n##### Prerequisites\nMake sure you have Docker and Docker Compose installed on your machine. You can download Docker Desktop from the official website for your operating system.\n\n##### Environment Variables\nBefore running the application, you'll need to set some environment variables in the docker-compose.yml file. The following environment variables are used in the provided configuration:\n\n- `PSQL_HOST`: the hostname or IP address of the Postgres database\n- `PSQL_PORT`: the port number on which Postgres is listening\n- `PSQL_USERNAME`: the username for the Postgres user\n- `PSQL_PASSWORD`: the password for the Postgres user\n- `PSQL_DATABASE`: the name of the Postgres database to use\n\u003e You can set these environment variables in the docker-compose.yml file or in your shell environment.\n\n##### Build and Run the Application\nChange into the root directory of the cloned repository and run the following command to build and start the application:\n\n```ssh\ndocker-compose up --build\n```\n\nor\n\n```ssh\nmake docker.up\n```\n\n\u003e This command will build the Go application using the Dockerfile and start two containers: one for the HTTP server and one for Postgres. The --build flag ensures that the latest version of the application is built before starting the containers.\n\nOnce the application is running, you should be able to access it in your web browser by navigating to http://localhost:30001. The HTTP server is running on port 30001, which is mapped to the container's port 30001 in the docker-compose.yml file.\n\n##### Stop the Application\nTo stop the application and remove the containers, press Ctrl-C in the terminal where docker-compose up is running. Alternatively, you can run the following command in the same directory as the docker-compose.yml file:\n```ssh\ndocker-compose down\n```\n\nor\n\n```ssh\nmake docker.stop\n```\n\nIf you want to delete containers use:\n```ssh\nmake docker.down\n```\n\nThis command will stop and remove the containers created by the docker-compose up command.\n\n### Swagger Documentation\nYou can view the Swagger documentation for the API by navigating to `http://localhost:30001/swagger` in your web browser. This will display a UI that shows all the available endpoints, along with details on the request and response formats.\n\u003e The Swagger UI provides a convenient way to explore the API and test its endpoints. You can try out each endpoint by clicking on it and entering the required parameters. The UI will display the response in real-time, making it easy to see the results of your requests.\n\n## TODO\n\n- Tests\n\n- Receipts\n\n- Accounting report\n\n## License\n\n##### MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatlas-is-coding%2Fgo-bank-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatlas-is-coding%2Fgo-bank-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatlas-is-coding%2Fgo-bank-service/lists"}