https://github.com/renatodts/payments-technical-interview
Payments API project, developed for a technical interview.
https://github.com/renatodts/payments-technical-interview
api api-gateway api-rest backend cqrs ddd domain-driven-design eda event-driven-architecture event-sourcing express framework payments rest-api technical-interview typescript
Last synced: 12 months ago
JSON representation
Payments API project, developed for a technical interview.
- Host: GitHub
- URL: https://github.com/renatodts/payments-technical-interview
- Owner: renatodts
- License: mit
- Created: 2024-09-16T06:30:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-16T17:09:40.000Z (over 1 year ago)
- Last Synced: 2025-02-01T21:14:10.304Z (about 1 year ago)
- Topics: api, api-gateway, api-rest, backend, cqrs, ddd, domain-driven-design, eda, event-driven-architecture, event-sourcing, express, framework, payments, rest-api, technical-interview, typescript
- Language: TypeScript
- Homepage: https://www.linkedin.com/in/renatodts/
- Size: 86.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Technical Interview Project
## Overview
For this technical interview, I opted to create a custom framework instead of using existing ones to showcase my capabilities and provide full control over architectural decisions, based on Hexagonal Architecture principles.
The project was completed over several days, with a strong focus on meeting the expectations and requirements of the task. I implemented CQRS (Command Query Responsibility Segregation) and Event Sourcing from scratch, while adhering to best practices.
I also incorporated Domain-Driven Design (DDD) concepts, including the creation of value objects and the implementation of business rules within their respective classes. The project reflects a thorough and thoughtful approach beyond standard professional requirements.
## Getting Started
### Installation
1. Install the necessary npm dependencies:
```bash
npm install
```
2. Start the application:
```bash
npm run start
```
3. In a separate terminal, start the external API:
```bash
npm run external-api
```
### API Endpoints
- **Create Payment**
Use the following `curl` command to create a payment. Import into Postman:
```bash
curl -L 'localhost:3000/payment' -H 'Content-Type: application/json' -H 'Authorization: Bearer VALID_AUTH_TOKEN' -d '{ "pixKey": "1234567890", "amount": 1000.00 }'
```
- **Get Payment Details**
Use the following `curl` command to retrieve payment details. Import into Postman:
```bash
curl -L 'localhost:3000/payment/:id' -H 'Authorization: Bearer VALID_AUTH_TOKEN'
```
## Contact
Feel free to reach out if you have any questions or need further clarification.
Renato de Matos
contact@renatodematos.com