{"id":17780713,"url":"https://github.com/lokie-codes/digital-bank","last_synced_at":"2025-08-12T18:33:46.753Z","repository":{"id":258189445,"uuid":"850193301","full_name":"Lokie-codes/digital-bank","owner":"Lokie-codes","description":"The Digital Bank project is a microservices-based application designed to provide a comprehensive banking solution. Built using Spring Boot, it consists of several services.","archived":false,"fork":false,"pushed_at":"2024-10-16T07:59:37.000Z","size":283,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-28T05:34:07.753Z","etag":null,"topics":["docker","fastapi","grafana","java","kafka","microservice","microservices","postgresql","prometheus","spring-security","springboot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lokie-codes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-31T05:28:35.000Z","updated_at":"2024-10-16T08:03:24.000Z","dependencies_parsed_at":"2024-10-18T07:05:25.993Z","dependency_job_id":null,"html_url":"https://github.com/Lokie-codes/digital-bank","commit_stats":null,"previous_names":["lokie-codes/digital-bank"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lokie-codes%2Fdigital-bank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lokie-codes%2Fdigital-bank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lokie-codes%2Fdigital-bank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lokie-codes%2Fdigital-bank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lokie-codes","download_url":"https://codeload.github.com/Lokie-codes/digital-bank/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229701842,"owners_count":18110222,"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":["docker","fastapi","grafana","java","kafka","microservice","microservices","postgresql","prometheus","spring-security","springboot"],"created_at":"2024-10-27T03:03:38.110Z","updated_at":"2025-08-12T18:33:46.659Z","avatar_url":"https://github.com/Lokie-codes.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DigitalBank\n\nA microservices-based digital banking platform built with Django REST Framework.  \nEach service is independently deployable and comes with a full suite of tests.\n\n---\n\n## Table of Contents\n\n1. [Architecture Overview](#architecture-overview)  \n2. [Services](#services)  \n3. [Prerequisites](#prerequisites)  \n4. [Getting Started](#getting-started)  \n   - [Clone the Repo](#clone-the-repo)  \n   - [Environment Variables](#environment-variables)  \n   - [Running Services Locally](#running-services-locally)  \n5. [API Documentation](#api-documentation)  \n6. [Testing](#testing)  \n7. [Continuous Integration](#continuous-integration)  \n8. [Deployment](#deployment)  \n9. [Contributing](#contributing)  \n10. [License](#license)  \n\n---\n\n## Architecture Overview\n\nDigitalBank follows a microservice architecture. Each service is a separate Django project exposing a RESTful API. Services communicate over HTTP (JSON) and share data via events (e.g., via RabbitMQ or Kafka).  \n\n\u003c!-- ![Microservices Diagram](docs/architecture.png) --\u003e\n\n---\n\n## Services\n\n| Service Name            | Description                                         | Port  |\n|-------------------------|-----------------------------------------------------|-------|\n| **user-service**        | User registration, login, JWT issuance, permissions | 8001  |\n| **account-service**     | Account creation, balance inquiries, account types  | 8002  |\n| **transaction-service** | Funds transfer, transaction history                 | 8003  |\n| **notification-service**| Email/SMS notifications                             | 8004  |\n| **gateway-service**     | API gateway / reverse proxy routing to services     | 8000  |\n\n---\n\n## Prerequisites\n\n- Python 3.10+  \n- Docker \u0026 Docker Compose (optional but recommended)  \n- PostgreSQL 13+ (or via Docker)  \n- RabbitMQ or Kafka (for event-driven features)  \n- Redis (for caching, rate limiting)\n\n---\n\n## Getting Started\n\n### Clone the Repo\n\n```bash\ngit clone https://github.com/Lokie-codes/digital-bank.git\ncd digital-bank\n````\n\n### Environment Variables\n\nCreate a `.env` file in each service’s root (or centrally) with:\n\n```dotenv\n# Example for auth-service\n# User service DB\nUSER_POSTGRES_DB=user_db\nUSER_POSTGRES_USER=user_db_user\nUSER_POSTGRES_PASSWORD=user_db_pass\nUSER_POSTGRES_HOST=user_db\nUSER_POSTGRES_PORT=5432\n\n# Common\nUSE_POSTGRES=1\nDJANGO_SECRET_KEY=your_secret_key\nDEBUG=0\n```\nBe sure to change values to your current configurations.\n\n### Running Services Locally\n\n#### Option 1: With Docker Compose\n\n```bash\ndocker-compose up --build\n```\n\nAll services will be available at `http://localhost:\u003cport\u003e`.\n\n#### Option 2: Manually\n0. Choose the service to run:\n    ```\n    cd \u003cservice-name\u003e\n    ``` \n1. Create \u0026 activate a virtualenv:\n\n   ```bash\n   python -m venv .venv\n   source .venv/bin/activate\n   # For Windows\n   # .venv\\bin\\activate.bat\n   ```\n2. Install dependencies in each service:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n3. Apply migrations \u0026 run:\n\n   ```bash\n   python manage.py migrate\n   python manage.py runserver 0.0.0.0:800X\n   ```\n    Make sure to use different ports for different services.\n---\n\n## API Documentation\n\nEach service exposes interactive docs at `/api/docs/` (Swagger / ReDoc):\n\n* Auth:  `http://localhost:8001/api/docs/`\n* Account:  `http://localhost:8002/api/docs/`\n* Transaction:  `http://localhost:8003/api/docs/`\n* Notification:  `http://localhost:8004/api/docs/`\n\nExample endpoint for creating a new user (User Service):\n\n```http\nPOST /api/users/\nContent-Type: application/json\n\n{\n  \"username\": \"jdoe\",\n  \"email\": \"jdoe@example.com\",\n  \"password\": \"StrongPass!23\",\n  \"password2\": \"StrongPass!23\"\n}\n```\n\n---\n\n## Testing\n\nEvery service includes unit and integration tests using **pytest** and **Django’s TestCase**. To run tests:\n\n```bash\n# From the root of each service:\npytest --maxfail=1 --disable-warnings -q\n```\n\nOr via Docker Compose:\n\n```bash\ndocker-compose run --rm auth-service pytest\n```\n\n---\n\n## Deployment\n\n1. Build Docker images:\n\n   ```bash\n   docker build -t digitalbank/auth-service ./auth-service\n   ```\n2. Push to your container registry.\n3. Deploy with Kubernetes / Docker Swarm / AWS ECS.\n4. Use a managed PostgreSQL, Redis, and RabbitMQ in production.\n5. Configure environment-specific settings via your orchestrator’s secret manager.\n\n---\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/awesome-feature`\n3. Write tests \u0026 code\n4. Commit: `git commit -m \"Add awesome feature\"`\n5. Push \u0026 open a PR\n\nPlease follow our [Code of Conduct](CODE_OF_CONDUCT.md).\n\n---\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flokie-codes%2Fdigital-bank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flokie-codes%2Fdigital-bank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flokie-codes%2Fdigital-bank/lists"}