Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gustavofreze/account
Service responsible for managing account transactions.
https://github.com/gustavofreze/account
account brasil cqrs ddd financial hexagonal-architecture php transaction
Last synced: 12 days ago
JSON representation
Service responsible for managing account transactions.
- Host: GitHub
- URL: https://github.com/gustavofreze/account
- Owner: gustavofreze
- License: mit
- Created: 2024-10-31T00:30:53.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-19T15:08:26.000Z (14 days ago)
- Last Synced: 2024-12-19T16:23:04.315Z (14 days ago)
- Topics: account, brasil, cqrs, ddd, financial, hexagonal-architecture, php, transaction
- Language: PHP
- Homepage:
- Size: 157 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Account
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
* [Overview](#overview)
- [Use cases](#use_cases)
- [Queries](#queries)
* [Installation](#installation)
- [Repository](#repository)
- [Configuration](#configuration)
- [Tests](#tests)
- [Review](#review)
- [Reports](#reports)
* [Environment setup](#environment_setup)
* [Observability](#observability)## Overview
Each cardholder (holder) has an account with their information.
For each operation performed, a transaction is created and associated with the respective account.
Transactions have specific types, e.g., **Normal Purchase**, **Purchase with installments**, **Withdrawal**, and
**Credit Voucher**.
**Normal Purchase** and **Withdrawal** transactions are recorded with **negative** values, while **Credit Voucher**
transactions are recorded with **positive** values.
Figure 01: Account transaction flow diagram.
### Use cases
- [Account opening](docs/USE_CASES.md#account-opening)
- [Account crediting](docs/USE_CASES.md#account-crediting)
- [Account debiting](docs/USE_CASES.md#account-debiting)
- [Account withdrawal](docs/USE_CASES.md#account-withdrawal)### Queries
- [Retrieve account balance](docs/QUERIES.md#retrieve-account-balance)
- [Retrieve an account by id](docs/QUERIES.md#retrieve-an-account-by-id)
- [Retrieve account transactions](docs/QUERIES.md#retrieve-account-transactions)## Installation
### Repository
To clone the repository using the command line, run:
```bash
git clone https://github.com/gustavofreze/account.git
```### Configuration
To install project dependencies locally, run:
```bash
make configure
```To start the application containers, run:
```bash
make start
```To stop the application containers, run:
```bash
make stop
```### Tests
Run all tests with coverage:
```bash
make test
```Run all tests without coverage:
```bash
make test-no-coverage
```### Review
Run static code analysis:
```bash
make review
```### Reports
Open static analysis reports (e.g., coverage, lints) in the browser:
```bash
make show-reports
```> You can check other available commands by running `make help`.
## Environment setup
### Access URLs
| Environment | DNS |
|:------------|:-------------------------|
| `Local` | http://account.localhost |### Database
| Environment | URL | Port |
|:------------|:----------------------------|:----:|
| `Local` | jdbc:mysql://localhost:3307 | 3307 |## Observability
You can access the application logs using the following command:
```bash
make show-logs
```