Repo for Cumbuca test for Software Developer
- Register
- Authentication
- Authorization
- Deposit
- Transfer
- Withdraw
- Refund
- Snapshot of wallet funds
- List snapshots
- Rollback Wallets based on a snapshot
- List Transactions
- Fastify
- MongoDB
- Redis
- Bull
- TypeScript
- NodeJS
- Register:
- full name, email, password and taxId are required
- email or taxId cannot be used by another user
- Authentication:
- the credentials must be right
- a token is generated and can't be forged
- Transfer:
- can't transfer if the amount is larger than the wallet funds or wallet does not exists
- Withdraw:
- can't withdraw if the amount is larger than the wallet funds
- List Transactions:
- startDate and endDate should be valid dates
- startDate should come first than endDate
- Refund:
- transaction should be a transaction of type
transfer
and not have a status ofrefunded
- transaction should be a transaction of type
- Rollback Transactions:
- snapshot should exist and all wallets that where snapshotted will be reversed to that point in time