Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/torniker/codenotary
https://github.com/torniker/codenotary
immudb
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/torniker/codenotary
- Owner: torniker
- Created: 2024-02-29T15:36:35.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-02-29T15:51:49.000Z (8 months ago)
- Last Synced: 2024-06-19T17:57:36.283Z (5 months ago)
- Topics: immudb
- Language: Go
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# The Task
Please have a look at our cloud service immudb (http://vault.immudb.io/)[Vault] and build a simple application (Frontend + Backend) around it with the following requirements:
- Application is storing accounting information within immudb Vault with the following structure: account number (unique), account name, iban, address, amount, type (sending, receiving)
- Application has an API to add and retrieve accounting information
- Application has a frontend that displays accounting information and allows to create new records.
The solution should:
- Have a readme
- Have a documented API
- Have docker-compose so it is easy to run
Should be easily configurable to run on non-localhost URLs.
Resources:
immudb Vault documentation: https://vault.immudb.io/docs/
API reference: https://vault.immudb.io/docs/api/v1# Setup
Run the following command to start the application
```bash
docker compose build
docker compose up
```Open browser and navigate to `http://localhost:5656`
# API
`GET /api/accounting` - returns accounting information
query params:```
{
"page": "int",
"perPage": "int"
}
````GET /api/accounting/count` - returns count of accounting information
`POST /api/accounting` - creates a new accounting information
body:```
{
"accountNumber": "string",
"accountName": "string",
"iban": "string",
"address": "string",
"amount": "int",
"type": "string"
}
```# Useful commands
Run the following command to create accounting collection
```bash
make install-wand && ./build/wand create-accounting-collection
```Run the following command to get accounting collection
```bash
make install-wand && ./build/wand get-accounting-collection
```Run the following command to drop accounting collection
```bash
make install-wand && ./build/wand drop-accounting-collection
```Run the following command to add random accounting document
```bash
make install-wand && ./build/wand add-accounting-document
```Run the following command to get the list of accounting documents
```bash
make install-wand && ./build/wand search-accounting-document | jq
```Run the following command to replace documents. Replace id with existing id
```bash
make install-wand && ./build/wand replace-accounting-document {id}
```