The Open-Source API-First Ledger
npm install sqrtledger-coreBLANK_README.md to get started.
sh
npm install sqrtledger-core@latest -- save
`
Usage
`typescript
import {
MongoDbAccountRepository,
MongoDbTransactionRepository,
TransactionService,
IAccountRepository,
} from 'sqrtledger-core';
const accountRepository: IAccountRepository = new MongoDbAccountRepository(null);
const transactionRepository: ITransactionRepository = new MongoDbTransactionRepository(null);
const transactionService: TransactionService = new TransactionService(
accountRepository,
transactionRepository
);
`
Models
$3
`json
{
"label": "All In One Current Account",
"metadata": {
"issuer": "Banco Santander"
},
"name": "Current Account",
"reference": "EVoiVSfB"
}
`
$3
`json
{
"availableBalance": 10000,
"balance": 10000,
"label": "All In One Current Account",
"metadata": {
"issuer": "Banco Santander"
},
"name": "Current Account",
"reference": "EVoiVSfB",
"settings": {
"allowTransactions": true,
"allowCreditTransactions": true,
"allowDebitTransactions": true
},
"status": "active"
}
`
$3
`json
{
"authorizationCode": "AUTH_gltaab334m",
"bankIdentificationNumber": "408408",
"expirationMonth": "12",
"expirationYear": "2030",
"last4Digits": "4081"
}
`
Roadmap
- [x] Account Service
- [x] Implement create Function
- [x] Implement delete Function
- [x] Implement find Function
- [x] Customer Service
- [x] Implement create Function
- [x] Implement createOrUpdate Function
- [x] Implement find Function
- [x] Implement findAll Function
- [ ] Transaction Service
- [x] Implement complete Function
- [x] Implement create Function
- [x] Implement createProcessComplete Function
- [ ] Implement createProcessCompleteMultiple Function
- [x] Implement fail Function
- [x] Implement find Function
- [x] Implement findAll Function
- [x] Implement process Function
- [x] Account Repository using MongoDB
- [x] Implement create Function
- [x] Implement delete Function
- [x] Implement find Function
- [x] Implement updateAvailableBalance Function
- [x] Implement updateBalance Function
- [ ] Account Repository using Redis
- [x] Implement create Function
- [x] Implement delete Function
- [x] Implement find Function
- [x] Implement updateAvailableBalance Function
- [x] Implement updateBalance Function
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
1. Fork the Project
2. Create your Feature Branch (git checkout -b feature/amazing-feature)
3. Commit your Changes (git commit -m 'Add amazing feature')
4. Push to the Branch (git push origin feature/amazing-feature)
5. Open a Pull Request
License
Distributed under the MIT License. See LICENSE` for more information.