Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devgabrielcoelho/walletapi
WalletAp é uma API para gerenciamento de carteiras digitais, permitindo criar carteiras, registrar transações, consultar saldos e realizar transferências com possibilidade de estorno. Conta com autenticação segura via JWT e hash de senhas com Argon2. Desenvolvida em C# e ASP.NET Core, usa SQL Server.
https://github.com/devgabrielcoelho/walletapi
api argon2 asp-net-core csharp dotnet-core jwt transactions
Last synced: 21 days ago
JSON representation
WalletAp é uma API para gerenciamento de carteiras digitais, permitindo criar carteiras, registrar transações, consultar saldos e realizar transferências com possibilidade de estorno. Conta com autenticação segura via JWT e hash de senhas com Argon2. Desenvolvida em C# e ASP.NET Core, usa SQL Server.
- Host: GitHub
- URL: https://github.com/devgabrielcoelho/walletapi
- Owner: DevGabrielCoelho
- Created: 2024-11-20T13:23:24.000Z (about 2 months ago)
- Default Branch: DevGabrielCoelho
- Last Pushed: 2024-12-17T22:21:45.000Z (22 days ago)
- Last Synced: 2024-12-17T22:30:09.188Z (22 days ago)
- Topics: api, argon2, asp-net-core, csharp, dotnet-core, jwt, transactions
- Language: C#
- Homepage:
- Size: 53.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WalletApi
A digital wallet management API, enabling control of financial transactions, balances, and other related functionalities.
## 🛠️ Features
- Creation of users and digital wallets.
- Record and query of financial transactions.
- Real-time balance check.
- Transfer between accounts with the possibility of reversal.
- Secure authentication and authorization using JWT and Argon2.## 📋 Prerequisites
Make sure you have the following tools installed on your machine before starting:
- **[Docker](https://www.docker.com/products/docker-desktop/)** (recommended latest version)
## 🚀 Installation and Setup
1. **Clone the repository:**
```bash
git clone https://github.com/DevGabrielCoelho/WalletApi.git
cd WalletApi
```2. **Configure the environment file:**
Create the `.env` file in the root of the project and add the following configurations (adjust as needed):```.env
DEFAULT_CONNECTION="Server=msql,1433;Database=WalletDb;User Id=sa;Password=YourStrong!Passw0rd;TrustServerCertificate=True;"LOGGING_LOG_LEVEL_DEFAULT="Information"
LOGGING_LOG_LEVEL_MICROSOFT_ASP_NET_CORE="Warning"ALLOWED_HOSTS="*"
ISSUER="IssuerNameOrLink(recommended "http://localhost:5236")"
AUDIENCE="AudienceNameOrLink(recommended "http://localhost:5236")"
SIGNIN_KEY="YourStrongSigninKey(recommended 128 characters)"SALT_SIZE=IntSaltSize(recommended 16)
KEY_SIZE=IntSaltSize(recommended 32)
MEMORY_SIZE=IntMemorySize(recommended 15360)
ITERATIONS=IntIterations(recommended 2)
DEGREE_OF_PARALLELISM=IntDegreeOfParallelism(recommended 1)
DELIMITER="CharDelimiter(recommended ";")"DOCKER_SA_PASSWORD="YourStrong!Passw0rd"
DOCKER_MSSQL_PID="Developer"DOCKER_ASP_NET_CORE_PORT=5236:5236
DOCKER_MSQL_PORT=1433:1433URLS=http://+:5236
SQLCMD_COMMAND=/opt/mssql-tools/bin/sqlcmd -S "mssql,1433" -U "sa" -P "YourStrong!Passw0rd" -Q "SELECT 1"
```3. **Start Docker build:**
```bash
docker-compose up -d --build
```4. Access the API at:
```
http://localhost:5236 (or the port configured in .env)
```## 🧪 API Endpoints
Here are the available routes and their main functionalities:
- **`GET /api/account/balance/?id=uuid_string`**: Shows the balance of a user.
- **`POST /api/auth`**: Performs login.
- **`POST /api/refunding/refound/?createdBy=uuid_string&transactionId=uuid_string`**: Performs a refund.
- **`POST /api/transaction/transfer/?toAccountId=uuid_string&fromAccountId=uuid_string&value=decimal`**: Performs a transfer.
- **`POST /api/users/register`**: Creates a new user.
- **`PUT /api/users/edit-user/?id=uuid_string`**: Edits an existing user.## 🛠️ Technologies Used
- **C#**: Programming language.
- **ASP.NET Core**: Framework for building RESTful APIs.
- **SQL Server**: Relational database.
- **JWT**: For secure authentication.
- **Argon2**: For secure password hashing.
- **Docker**: For containerization and application deployment.## 📂 Project Structure
```
src/
├── Controllers/ # Controllers for the API routes
├── Data/ # Database context
├── docker/ # docker/.sh file
├── Dtos/ # Data transfer objects
├── Enums/ # Enum definitions
├── Interfaces/ # Contracts for abstractions
├── Mappers/ # DTO to Model conversions and vice versa
├── Models/ # Data models
├── Properties/ # Project configurations
└── Repository/ # Implementations of interfaces using DbContext
```## 📞 Contact
For questions, suggestions, or collaborations, feel free to reach out:
- **Gabriel Coelho**
- GitHub: [DevGabrielCoelho](https://github.com/DevGabrielCoelho)
- Email: [[email protected]](mailto:[email protected])