项目 / hoophq/sequence

hoophq/sequence

行业候选
语言 Clojure标签 ledgerbookkeepingfintechdouble-entry-accountingmerkle-treehash-chain数据更新 2026-11-13 19:42:00 · 仓库 2026-09-21

一段话介绍

用于存储、校验和报告资产变动的账本服务 API。源文说明它是不可变、可水平扩展且使用方式较简单的分类账。可按[仓库 README](https://github.com/hoophq/sequence)克隆后用 docker-compose 启动本地 DynamoDB 与服务;接口说明见 [Sequence 文档](https://decimals.stoplight.io/docs/sequence/),介绍页见 [decimals.app/sequence](https://decimals.app/sequence)。

本站整理,非 GitHub 官方 description。

官方 description(GitHub API 原样)
Immutable, scalable, and easy to use ledger service.
512累计星
32Fork
—峰值日增
0上榜次数
总榜
暂未入榜
日榜
暂未入榜
周榜
暂未入榜
月榜
暂未入榜

官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。

行业与场景 金融 暂无可用场景

更多信息

以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。

我的用法
该项目的用法包括克隆仓库后使用 docker-compose 启动 DynamoDB local 和 Sequence,也可分别用 docker run 启动两者。
特点或设计要点
支持多种资产单位(从普通币种到货架商品),并可在同一套基础设施上配置多个租户、使用不同 API 密钥。底层使用 NoSQL 数据库,设计上通过追加记录而不是更新字段来保持余额一致。账户在首次转入时会自动创建。资产变动事件也可发送到外部目的地,供分析等用途使用。配置通过环境变量加载,包括 DynamoDB 地址、租户密钥和 CORS 来源。
星标走势还差一天的数据,明天就能看到曲线
每天 10:30 记一次星标,连续两天后自动生成曲线
首次发现 — · 最近在榜 2026-07-21 · 语言 Clojure · 贡献者 —
clojure

GitHub 项目主页介绍

来自 GitHub 仓库 README / 主页介绍正文,原样摘录,共 4,322 字节。

Sequence
==========

![Sequence CI](https://github.com/decimals/sequence/workflows/Clojure%20CI/badge.svg)

- Website: https://decimals.app/sequence
- Community: [Decimals Slack](https://docs.google.com/forms/d/1K_X6VlnNufptkRqc3oqg0GqzBH7NXb6AAhCd3ITjstU)
- Documentation: [https://decimals.stoplight.io/docs/sequence/](https://decimals.stoplight.io/docs/sequence)

<img alt="Sequence" src="https://decimals.app/dist/images/sequence.png" width="600px">

Sequence is an API that store validate and reports asset movements. Also known as a Ledger. Sequence is immutable, scalable, and easy to use.

The key features of Sequence are:

- **Multi-Currency**: Store, move and analyse any asset, from regular currencies like USD, to shelf items. 

- **Multi-Tenant**: Run multiple ledgers using the same infrastructure. Simply setup multiple tenants in the configurations and use the different API keys.


- **No-SQL powered**: Sequence runs on top of a No-SQL database. It is horizontally scalable from the 12-factors container to the persistency layer.

- **Immutable**: Most existing ledger use database updates. This is bad for a ledger. Sequence is immutable. The design of the database allows for consistency of balances without a single field using updateds.

- **API simplicity**: Sequence creates things as you use them. When you send value to an account, it is gets created if it does not exist. It gets out of the way. Use it, and things will work.

- **Analytics**: Send asset movement events to multiple destinations. Use it for analytics, fraud-detection, anything.

## Getting Started

### docker-compose

1. Clone and cd into the repository
2. Use docker-compose to bring up DynamoDB local and Sequence

```
git clone https://github.com/decimals/sequence.git

cd sequence

docker-compose up
```

### Docker

1. Start the DynamoDB local container
2. Start the Sequence container

```
docker run -p 8000:8000 amazon/dynamodb-local

docker run -p 8910:8910 docker.pkg.github.com/decimals/sequence/sequence:0.0.1
```

## Configurations

All configurations are loaded from environment variables. The available configurations are:

| environment variable | configuration                                                                                   | dev profile                                                                                                                                                    |
|----------------------|-------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `DYNAMODB_ENDPOINT`  | The host for the DynamoDB instance. Mostly used for local development.                          | `http://localhost:8000`                                                                                                                                        |
| `SEGMENT_KEY`        | Optional Segment.io key to generate analytics events.                                           |                                                                                                                                                                |
| `KEYS`               | A string with a list of tenants and their `sha256` API keys digests. In json format.            | `[{ "name": "test","email": "test@decimals.app", "public-key": "abc", "secret-key-hash": "a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3"}]` |
| `ALLOWED_ORIGINS`    | A list of accepted CORS hosts. Example:  `ALLOWED_ORIGINS= '["https://decimals.stoplight.io"]'` |                                                                                                                                                                |

Configurations can also be loaded from the `profiles.clj` file, where the dev configurations are setup.

## Developing Sequence

1. Start a new REPL: `lein repl`
2. Start Sequence in dev-mode: `(def dev-serv (start-dev))`
3. Connect your editor to the running REPL session.
   Re-evaluated code will be seen immediately in the service.

## Links
* [Sequence design](https://decimals.substack.com/p/things-i-wish-i-knew-before-building)
* [Open-source ledgers](http://decimals.app)
↑