Skip to content

Commit

Permalink
docs: New release (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
flemzord authored Sep 28, 2023
1 parent 872de8e commit e93ab9f
Show file tree
Hide file tree
Showing 64 changed files with 27,839 additions and 11,089 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions .moon/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ projects:
- 'libs/go-libs'
- 'tests/*'
- 'helm'
- 'release'

# Configures the version control system to utilize within the workspace. A VCS
# is required for determining touched (added, modified, etc) files, calculating file hashes,
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ COPY --from=wallets /usr/bin/wallets /usr/bin/wallets
COPY --from=webhooks /usr/bin/webhooks /usr/bin/webhooks
COPY --from=benthos /benthos /usr/bin/benthos
COPY --from=control /app /app
COPY ./config /etc/formance
COPY .local /etc/formance
COPY ./components/search/benthos /benthos
WORKDIR /app
COPY process-compose.yaml /running/process-compose.yaml
COPY .local/process-compose.yaml /running/process-compose.yaml
CMD ["process-compose", "up", "--config", "/running/process-compose.yaml", "--tui=false", "-p", "9090"]
102 changes: 0 additions & 102 deletions Taskfile.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion components/orchestration/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ services:
- "8082:8080"
volumes:
- ./deploy/proxy:/config
working_dir: /config
working_dir: /.local
command: caddy run

wallets:
Expand Down
2 changes: 1 addition & 1 deletion components/search/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
- "4195:4195/tcp"
volumes:
- ./benthos:/config
working_dir: /config
working_dir: /.local
command:
- -w
- --log.level
Expand Down
2 changes: 1 addition & 1 deletion components/wallets/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ services:
- "8082:8080"
volumes:
- ./deploy/proxy:/config
working_dir: /config
working_dir: /.local
command: caddy run

app:
Expand Down
8 changes: 8 additions & 0 deletions docs/docs/api.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: API Reference
hide_table_of_contents: true
---

import ApiDocMdx from '@theme/ApiDocMdx';

<ApiDocMdx id="api-v1" />
2 changes: 1 addition & 1 deletion docs/docs/cloud/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Authentication
description: How to configure Formance Platform Authentication
---
import CloudToken from '../fctl/partials/_cloud_token.mdx';
import CloudToken from '@site/docs/partials/_cloud_token.mdx';

Formance Cloud exposes the same authentication types as Open Source Formance Platform. You can use the same authentication types in your Formance Cloud application as you would in a self-hosted Formance Platform, as described in the [Formance Platform Authentication](/stack/authentication) documentation.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/getting-started/fctl-quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Installing FCTL
description: How to get started with the Formance Platform
---
import Install from '../fctl/partials/_install.mdx';
import Install from '@site/docs/partials/fctl/_install.mdx';

# Installing the Formance CLI

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/newSandbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Creating a sandbox
description: How to create a sandbox in Formance Platform.
---
import Install from '../fctl/partials/_install.mdx';
import Install from '@site/docs/partials/fctl/_install.mdx';

The fastest way to get started with Formance Platform is to create a sandbox on Formance Cloud. Sandboxes are free, fully functional Formance Platform instances that you can use to design and develop your applications. Sandboxes are available to all users.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/ledger/advanced/publisher.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The following events types are available:
An HTTP publisher is available out of the box since 1.3.x. It allows you to push ledger events to an http server of your choice, in a webhook-like fashion. It can be enabled by setting the [configuration variables](/ledger/operations/env-vars) PUBLISHER_HTTP_ENABLED and PUBLISHER_TOPIC_MAPPING.

:::info
For HTTP publishing on Formance Cloud, please refer instead to the [webhooks section](/stack/webhooks/) of The Formance Platform.
For HTTP publishing on Formance Cloud, please refer instead to the [webhooks section](/webhooks/) of The Formance Platform.
:::

### Example
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/ledger/api/sdks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: SDKs
This page is on its way to be deprecated, as the SDKs listed below are only compatible with the ledger API and not the entirety of The Formance Platform. Please refer to the [SDKs](/stack/sdk) page for the latest information.
:::

Beyond the [HTTP API](/api/stack/v1.0), you can use one of these libraries to communicate with a Formance instance:
Beyond the [HTTP API](/api), you can use one of these libraries to communicate with a Formance instance:

## Officialy supported

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/ledger/get-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
title: Quick Install
description: How to install Formance Ledger for development.
---
import Install from '../../fctl/partials/_install.mdx';
import CreateStack from '../../partials/_create_stack.mdx';
import Install from '@site/docs/partials/fctl/_install.mdx';
import CreateStack from '@site/docs/partials/_create_stack.mdx';

# Installation

Expand Down
6 changes: 3 additions & 3 deletions docs/docs/ledger/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Introduction to Formance Ledger
title: Introduction to Formance Ledger v2
pagination_next: null
pagination_prev: null
# hide_table_of_contents: true
Expand All @@ -10,7 +10,7 @@ toc_min_heading_level: 3

import {DocCardGrid,DocCard} from '@site/src/components/DocCard';

# Formance Ledger
# Formance Ledger v2

## What is Ledger?

Expand All @@ -30,7 +30,7 @@ Formance Ledger is a real-time money tracking microservice that lets you model a

</DocCardGrid>

import GettingHelp from '../partials/_getting_help.mdx';
import GettingHelp from '@site/docs/partials/_getting_help.mdx';

<GettingHelp />

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/ledger/numscript/currencies/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: How does Numscript handle different currencies, and how do you spec
---

import { NumscriptBlock } from 'react-numscript-codeblock';
import Prerequisites from '/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '/docs/ledger/partials/numscript/_prereq_warning.mdx';
import Prerequisites from '@site/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '@site/docs/ledger/partials/numscript/_prereq_warning.mdx';

Formance Ledger has robust support for working in different currencies. Let's go a little deeper into how that works.

Expand Down
12 changes: 6 additions & 6 deletions docs/docs/ledger/numscript/http/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ description: You can also execute Numscript with the Formance API.
import { NumscriptBlock } from 'react-numscript-codeblock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Prerequisites from '/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '/docs/ledger/partials/numscript/_prereq_warning.mdx';
import CloudToken from '../../../fctl/partials/_cloud_token.mdx';
import Prerequisites from '@site/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '@site/docs/ledger/partials/numscript/_prereq_warning.mdx';
import CloudToken from '@site/docs/partials/_cloud_token.mdx';


The `fctl` command line is not the only way to execute Numscript. Formance Platform also exposes an HTTP API that accepts Numscript. This makes it much easier to integrate Numscript into your existing codebase.

Indeed, Formance's HTTP API is very powerful, and lets you accomplish more than just executing Numscript. You can check account balances, verify transactions, and more. For now, let's focus on executing transactions using Numscript. If you want to learn more about the full range of functionality, consult the [Formance Ledger API reference documentation](/api/stack/v1.0).
Indeed, Formance's HTTP API is very powerful, and lets you accomplish more than just executing Numscript. You can check account balances, verify transactions, and more. For now, let's focus on executing transactions using Numscript. If you want to learn more about the full range of functionality, consult the [Formance Ledger API reference documentation](/api).

<Prerequisites />

Expand Down Expand Up @@ -122,7 +122,7 @@ We're using the `default` ledger, and we're executing a bit of Numscript with th
https://randomstuff-wxyz.sandbox.formance.cloud/api/ledger/default/script
```

You can learn more about the available endpoints in the [guide to the Formance Ledger API](/api/stack/v1.0) in the reference docs.
You can learn more about the available endpoints in the [guide to the Formance Ledger API](/api) in the reference docs.

### The API request

Expand Down Expand Up @@ -166,5 +166,5 @@ There is also a `details` field with a URL. When there is an error parsing Numsc
This guide has just been a small taste of what's possible using the Formance Ledger API to execute Numscript. And of course the API lets you do so much more.

:::tip Dig deeper
Want to learn more about the Formance Ledger API? The [guide to the Formance Ledger API](/api/stack/v1.0) has you covered!
Want to learn more about the Formance Ledger API? The [guide to the Formance Ledger API](/api) has you covered!
:::
2 changes: 1 addition & 1 deletion docs/docs/ledger/numscript/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Mastering Numscript
import {DocCardList} from '@site/src/components/DocCard';
import {useCurrentSidebarCategory} from '@docusaurus/theme-common';

Have you worked through the [Hello World tutorial](../get-started/hello-world), and now you're ready to do more with Numscript? In this series of guides, we walk you through specific use cases to help you understand how to get the most out of Numscript and Formance Ledger.
Have you worked through the [Hello World tutorial](/ledger/get-started/hello-world), and now you're ready to do more with Numscript? In this series of guides, we walk you through specific use cases to help you understand how to get the most out of Numscript and Formance Ledger.

:::tip
Before you begin on any of them, be sure that you're set up properly: [Read through the prerequisites first!](/ledger/numscript/prerequisites).
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/ledger/numscript/kept/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: Sometimes you need to transfer only a portion of a full transaction
---

import { NumscriptBlock } from 'react-numscript-codeblock';
import Prerequisites from '/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '/docs/ledger/partials/numscript/_prereq_warning.mdx';
import Prerequisites from '@site/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '@site/docs/ledger/partials/numscript/_prereq_warning.mdx';

Sometimes you have a transfer that requires processing, but you want to move only a portion of the specified amount. For example:

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/ledger/numscript/metadata/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: You can add custom metadata to transactions in Numscript, which can
---

import { NumscriptBlock } from 'react-numscript-codeblock';
import Prerequisites from '/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '/docs/ledger/partials/numscript/_prereq_warning.mdx';
import Prerequisites from '@site/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '@site/docs/ledger/partials/numscript/_prereq_warning.mdx';


Sometimes you need to include more information with a transaction. For example:
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/ledger/numscript/multi-destination/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: Sometimes you need to split a payment across multiple destinations.
---

import { NumscriptBlock } from 'react-numscript-codeblock';
import Prerequisites from '/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '/docs/ledger/partials/numscript/_prereq_warning.mdx';
import Prerequisites from '@site/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '@site/docs/ledger/partials/numscript/_prereq_warning.mdx';


Sometimes you need to split a payment across multiple destinations. For example:
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/ledger/numscript/multi-source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: Sometimes you need to split a payment across multiple sources. Lear
---

import { NumscriptBlock } from 'react-numscript-codeblock';
import Prerequisites from '/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '/docs/ledger/partials/numscript/_prereq_warning.mdx';
import Prerequisites from '@site/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '@site/docs/ledger/partials/numscript/_prereq_warning.mdx';

Sometimes you need to split a payment from multiple sources. For example:

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/ledger/numscript/overdraft/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: To better represent your flows, it can be useful to allow overdraft
---

import { NumscriptBlock } from 'react-numscript-codeblock';
import Prerequisites from '/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '/docs/ledger/partials/numscript/_prereq_warning.mdx';
import Prerequisites from '@site/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '@site/docs/ledger/partials/numscript/_prereq_warning.mdx';

Sometimes we need a transaction to put an account in deficit, i.e. overdraft. For example if you have $100 in your bank account and you buy a $200 item, you will have a negative balance of $100 until you get your next paycheck. This is where overdrafts in Numscript come in.
Another situation likely to happen is linked to refunds, penalties or even coupons. The way you can represent some of these flows is by allowing some accounts to have negative balances, to represent your loss.
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/ledger/numscript/templates/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ description: Reuse the same transaction structure with Numscript templates.
import { NumscriptBlock } from 'react-numscript-codeblock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Prerequisites from '/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '/docs/ledger/partials/numscript/_prereq_warning.mdx';
import Prerequisites from '@site/docs/ledger/partials/numscript/_prerequisites.mdx';
import Prereqwarn from '@site/docs/ledger/partials/numscript/_prereq_warning.mdx';

Oftentimes transactions will use the same structure over and over again, and you don't want to use hard-coded values in your Numscript. In these cases, you can use a Numscript template to describe a general kind of transaction, and then fill in the template variables at execution time.

Expand Down
10 changes: 5 additions & 5 deletions docs/docs/ledger/operations/installation.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: Installation
---
import HomebrewInstall from '../partials/installation/_install_homebrew.mdx';
import DockerInstall from '../partials/installation/_install_docker.mdx';
import DockerComposeInstall from '../partials/installation/_install_docker_compose.mdx';
import APTInstall from '../partials/installation/_install_apt.mdx';
import RPMInstall from '../partials/installation/_install_rpm.mdx';
import HomebrewInstall from '@site/docs/ledger/partials/installation/_install_homebrew.mdx';
import DockerInstall from '@site/docs/ledger/partials/installation/_install_docker.mdx';
import DockerComposeInstall from '@site/docs/ledger/partials/installation/_install_docker_compose.mdx';
import APTInstall from '@site/docs/ledger/partials/installation/_install_apt.mdx';
import RPMInstall from '@site/docs/ledger/partials/installation/_install_rpm.mdx';

Formance Ledger can be used either as a standalone microservice, or as part of The Formance Platform. The standalone versions is a good choice if you don't need yet the full Formance offering, and want to keep things simple. The installation instructions below will guide you through the process of installing Formance Ledger in a standalone mode.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Control Dashboard
---

:::caution
This former ledger control dashboard is deprecated in favor of The Formance Platform control dashboard, and will be removed in a future major release. Please refer to the [Formance Platform](/stack/reference/docker) documentation for more information.
This former ledger control dashboard is deprecated in favor of The Formance Platform control dashboard, and will be removed in a future major release. Please refer to the [Formance Platform](/deployment/introduction) documentation for more information.
:::

Formance Ledger ships with a minimal [dashboard](https://github.com/formancehq/control) that lets you easily see transactions and accounts in your ledgers.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/ledger/reference/concurrency-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ We recommended to use the Redis-based shared pre-commit lock using the [redis fl

Also, you can find a complete docker-compose example using 3 instances of the ledger, and a simple reverse proxy to handle traffic [there](https://github.com/formancehq/ledger/blob/main/examples/multi-node/docker-compose.yml).

Should the optimistic locking prevent a conflict on commit, it will surface it to the API consumer with a ([Response 409](/api/stack/v1.0#tag/transactions/operation/createTransaction)) - it is the responsibility of the client to retry the transaction in this case.
Should the optimistic locking prevent a conflict on commit, it will surface it to the API consumer with a ([Response 409](/api#tag/transactions/operation/createTransaction)) - it is the responsibility of the client to retry the transaction in this case.
Loading

1 comment on commit e93ab9f

@vercel
Copy link

@vercel vercel bot commented on e93ab9f Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.