{"id":34167920,"url":"https://github.com/mathis-k/bank-api","last_synced_at":"2026-03-12T19:34:22.423Z","repository":{"id":258846350,"uuid":"839420403","full_name":"mathis-k/bank-api","owner":"mathis-k","description":"BANK JSON API SERVER with Golang, Gorilla/mux, MongoDB and JWT","archived":false,"fork":false,"pushed_at":"2024-12-08T22:58:41.000Z","size":61,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-18T06:48:43.793Z","etag":null,"topics":["api-rest","golang","gorilla-mux","json-api","jwt-token","mongodb"],"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/mathis-k.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":"2024-08-07T15:13:39.000Z","updated_at":"2025-04-15T12:23:07.000Z","dependencies_parsed_at":"2024-10-21T01:14:46.760Z","dependency_job_id":null,"html_url":"https://github.com/mathis-k/bank-api","commit_stats":null,"previous_names":["mathis-k/bank-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mathis-k/bank-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathis-k%2Fbank-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathis-k%2Fbank-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathis-k%2Fbank-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathis-k%2Fbank-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathis-k","download_url":"https://codeload.github.com/mathis-k/bank-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathis-k%2Fbank-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30439950,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"last_error":"SSL_read: 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":["api-rest","golang","gorilla-mux","json-api","jwt-token","mongodb"],"created_at":"2025-12-15T10:41:45.802Z","updated_at":"2026-03-12T19:34:22.414Z","avatar_url":"https://github.com/mathis-k.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bank API\n\nA simple JSON API server for a banking system built with Go (Golang), Gorilla/mux (no Gin), MongoDB, and JWT for authorization and authentication.\n\n## Features\n\n- **User Authentication**: Secure JWT-based authorization and authentication.\n- **Account Management**: Create, view, update, and delete bank accounts.\n- **Transaction Management**: Perform and track transactions between accounts.\n- **Database**: MongoDB for data storage.\n\n## Tech Stack\n\n- **Golang**: Backend server\n- **Gorilla/mux**: HTTP router and dispatcher\n- **MongoDB**: NoSQL database\n- **JWT**: Secure token-based authentication\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/mathis-k/bank-api.git\n   cd bank-api\n2. Install dependencies:\n\n   ```bash\n   go mod download\n3. Set up your environment variables:\n\n   ```bash\n    cp .env.example .env\n4. Start the API:\n\n   ```bash\n   go run main.go\n\n## API Endpoints\n\n### Authentication\n\n- **POST /api/auth/register**: Register a new user \\\nRequest Body:\n  ```json\n    {\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"email\": \"john.doe@example.com\",\n      \"password\": \"password123\"\n    }\n- **POST /api/auth/login**: Login an existing user \\\n  Request Body:\n  ```json\n    {\n      \"email\": \"john.doe@example.com\",\n      \"password\": \"password123\"\n    }\n### Users\n\n- **GET /api/user**: Get the current user\n- **PUT /api/user**: Update the current user \\\n  Request Body:\n  ```json\n    {\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\",\n      \"email\": \"john.doe@example.com\"\n    }\n  or\n    {\n      \"last_name\": \"Doey\"\n    }\n\n### Accounts\n\n- **GET /api/accounts**: Get all accounts for the current user\n- **GET /api/accounts/{number}**: Get an account by ID for the current user\n- **POST /api/accounts**: Create a new account for the current user\n- **DELETE /api/accounts/{number}**: Delete an account by ID for the current user\n\n### Transactions\n\n- **GET /api/transactions**: Get all transactions for the current user\n- **GET /api/transactions/{id}**: Get a transaction by ID for the current user\n- **GET /api/transactions/account/{number}**: Get all transactions for an account from the current user\n- **POST /api/transactions/account/{number}/deposit**: Deposit funds into an account from the current user \\\n  Request Body:\n  ```json\n    {\n      \"amount\": 150.00\n    }\n- **POST /api/transactions/account/{number}/withdraw**: Withdraw funds from an account from the current user \\\n  Request Body:\n  ```json\n    {\n      \"amount\": 150.00\n    }\n- **POST /api/transactions/account/{number}/transfer**: Transfer funds from an account of the current user to another account \\\n  Request Body:\n  ```json\n    {\n      \"amount\": 150.00,\n      \"to_account\": \"7252934484834\"\n    }\n\n\n## Project Structure\n\n```bash \n.\n├── main.go\n├── routes/\n├── controllers/\n├── models/\n├── middleware/\n├── utils/\n├── .env.example\n├── go.mod\n└── go.sum","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathis-k%2Fbank-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathis-k%2Fbank-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathis-k%2Fbank-api/lists"}