Skip to content

Commit

Permalink
doc: add some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Oct 23, 2024
1 parent 686bc14 commit f5fb88f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 28 deletions.
1 change: 1 addition & 0 deletions DEV.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Dev
31 changes: 8 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,14 @@ Formance Ledger works as a standalone binary, the latest of which can be downloa

```SHELL

ledger server start
docker compose up -d

# Submit a first transaction
echo "
send [USD/2 599] (
source = @world
destination = @payments:001
)
send [USD/2 599] (
source = @payments:001
destination = @rides:0234
)
send [USD/2 599] (
source = @rides:0234
destination = {
85/100 to @drivers:042
15/100 to @platform:fees
}
)
" > example.num

ledger exec quickstart example.num
curl -X POST \
http://localhost:3068/quickstart/transactions -d '{"postings": [{"source": "world", "destination": "bank", "amount": 100, "asset": "USD"}]}'

# Get the balances of drivers:042
curl -X GET http://localhost:3068/quickstart/accounts/drivers:042
curl -X GET http://localhost:3068/quickstart/accounts/bank

# List transactions
curl -X GET http://localhost:3068/quickstart/transactions
Expand All @@ -53,3 +34,7 @@ You can find the complete Numary documentation at [docs.formance.com](https://do
# Community

If you need help, want to show us what you built or just hang out and chat about ledgers you are more than welcome on our [Slack](https://bit.ly/formance-slack) - looking forward to see you there!

# Contributing

See [dev](./DEV.md) page to contribute.
6 changes: 1 addition & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,4 @@ services:
POSTGRES_URI: "postgresql://ledger:ledger@postgres/ledger?sslmode=disable"
DEBUG: "true"
ENABLE_PPROF: "true"
OTEL_TRACES_BATCH: "true"
OTEL_TRACES_EXPORTER_OTLP_INSECURE: true
OTEL_TRACES_EXPORTER_OTLP_MODE: grpc
OTEL_TRACES_EXPORTER: true
OTEL_TRACES_EXPORTER_OTLP_ENDPOINT: localhost:4317
GOWORK: off
10 changes: 10 additions & 0 deletions test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Tests

This directory contains global ledger tests.

It's split in different scopes :
* [e2e](./e2e) : End to end test. Those tests are mainly api tests, and app lifecycle tests. It checks than the ledger endpoint works as expected.
* [migrations](./migrations) : Migrations tests. Tests inside this package allow to import an existing database to apply current code migrations on it.
* [performance](./performance) : Performance tests. Tests inside this package test performance of the ledger.
* [stress](./stress) : Stress tests. Tests inside this package ensure than ledger state stay consistent under high concurrency.

0 comments on commit f5fb88f

Please sign in to comment.