Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ contact_links:
- name: Report a security vulnerability
url: https://github.com/KsiProgramming/RimBank/security/advisories/new
about: Please report vulnerabilities privately, never in a public issue.
- name: Ask a question or share an idea
url: https://github.com/KsiProgramming/RimBank/discussions
about: Questions about BIAN, the architecture or how to use RimBank belong in Discussions.
21 changes: 21 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Categories for GitHub's generated release notes, keyed on the type: labels (CONTRIBUTING.md#labels).
changelog:
exclude:
labels: [invalid, duplicate, wontfix]
categories:
- title: Security
labels: [type:security]
- title: Features
labels: [type:feature]
- title: Bug fixes
labels: [type:bug]
- title: Architecture decisions
labels: [type:adr]
- title: Documentation
labels: [type:docs]
- title: Dependencies
labels: [dependencies]
- title: Maintenance
labels: [type:chore]
- title: Other changes
labels: ["*"]
34 changes: 34 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Blocks pull requests that add a dependency with a known vulnerability (moderate or worse) or a
# strong copyleft licence. Policy: docs/adr/0005-ci-and-supply-chain-policy.md and ADR 0041.
# Dependency review needs the dependency graph, which is free only on public repositories, so the
# job is skipped while the repository is private (a skipped required check counts as passed).
name: dependency-review

on:
pull_request:

permissions:
contents: read

concurrency:
group: dependency-review-${{ github.ref }}
cancel-in-progress: true

jobs:
review:
name: dependency-review
if: ${{ !github.event.repository.private }}
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Check out
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Review dependency changes
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
with:
fail-on-severity: moderate
deny-licenses: AGPL-3.0-only, AGPL-3.0-or-later, GPL-2.0-only, GPL-2.0-or-later, GPL-3.0-only, GPL-3.0-or-later
show-patched-versions: true
53 changes: 53 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# OpenSSF Scorecard: grades the repository's supply-chain practices (pinned actions, branch
# protection, token permissions, code review, SAST, …), publishes the score for the README badge
# and uploads findings to Security > Code scanning. Policy: ADR 0005 and ADR 0041.
# Scorecard can only publish results for a public repository, so the job is skipped while private.
# Do not add top-level env or defaults, or other actions: publishing requires this minimal shape.
name: scorecard

on:
branch_protection_rule:
push:
branches: [main]
schedule:
- cron: "41 5 * * 2" # Tuesdays 05:41 UTC
workflow_dispatch:

permissions:
contents: read

jobs:
analysis:
name: scorecard
if: ${{ !github.event.repository.private }}
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
contents: read
actions: read
security-events: write # upload the SARIF to code scanning
id-token: write # sign the published results (OIDC)
steps:
- name: Check out
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Run Scorecard
uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
with:
results_file: results.sarif
results_format: sarif
publish_results: true

- name: Keep the results
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: scorecard-sarif
path: results.sarif
retention-days: 14

- name: Upload to code scanning
uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
sarif_file: results.sarif
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

All notable changes to RimBank are documented in this file. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Until 1.0.0, a minor version may contain breaking changes.

GitHub release notes are generated from merged pull requests and grouped by their `type:` label ([.github/release.yml](.github/release.yml)). This file keeps the summary that people read.

## [Unreleased]

### Added

- **Stage 0, Foundations:** solution skeleton, CI and CodeQL, the SharedKernel (`Result`/`Error`, typed ids, `Money`/`Currency`, decider and projection), architecture tests, the .NET Aspire AppHost and ServiceDefaults, RFC 9457 Problem Details, Marten and Wolverine wiring, idempotency keys, the authentication baseline, the BIAN conformance harness and MCP wiring.
- **Stage 1, Party Reference Data Directory:** the event-sourced `PartyReferenceDataDirectoryEntry` with its Demographics, Reference, Associations and BankRelations Behavior Qualifiers, every in-scope BIAN operation over HTTP and as MCP tools with parity, per-operation authorisation policies, and the published integration events.
- The public open-source repository set-up: governance, support, third-party notices, OpenSSF Scorecard and dependency review ([ADR 0041](docs/adr/0041-open-source-repository-governance.md)).

[Unreleased]: https://github.com/KsiProgramming/RimBank/commits/main
24 changes: 24 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
cff-version: 1.2.0
message: "If you use RimBank in research or teaching, please cite it as below."
title: "RimBank: an open-source core banking platform implementing BIAN v14"
type: software
authors:
- name: "RimBank contributors"
- family-names: "Said"
given-names: "LaBani"
alias: "KsiProgramming"
repository-code: "https://github.com/KsiProgramming/RimBank"
abstract: >-
RimBank is an open-source core banking platform built in .NET that implements the
BIAN Service Landscape v14 using Domain-Driven Design, event sourcing and hexagonal
architecture. Every capability is exposed both as a BIAN HTTP API and as a Model
Context Protocol tool for AI agents.
keywords:
- core banking
- BIAN
- domain-driven design
- event sourcing
- hexagonal architecture
- .NET
- Model Context Protocol
license: MIT
28 changes: 20 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ dotnet test --project tests/RimBank.Architecture.Tests

### What CI runs

Every push to `main` and every pull request runs two workflows (policy: [ADR 0005](docs/adr/0005-ci-and-supply-chain-policy.md)):
Every push to `main` and every pull request runs these workflows (policy: [ADR 0005](docs/adr/0005-ci-and-supply-chain-policy.md) and [ADR 0041](docs/adr/0041-open-source-repository-governance.md)):

- **`ci` / `build`**: the same commands you can run locally:

Expand All @@ -245,9 +245,15 @@ Every push to `main` and every pull request runs two workflows (policy: [ADR 000
```

- **`codeql` / `analyze (actions)` and `analyze (csharp)`**: static analysis of the workflows and the C# code (the `security-and-quality` suite). It also runs weekly.
- **`dependency-review`** (pull requests only): fails if the PR adds a dependency with a known vulnerability of moderate severity or worse, or a GPL/AGPL licence.
- **`scorecard`** (pushes to `main` and weekly): OpenSSF Scorecard grades the repository's supply-chain practices and uploads its findings to Security > Code scanning.

`dependency-review` and `scorecard` need public-repository features and are skipped while the repository is private.

Dependabot opens weekly PRs for NuGet packages, GitHub Actions and the .NET SDK.

Pull requests from forks run their workflows only after a maintainer approves the run. No workflow uses `pull_request_target`, and the default token is read-only.

When you change a workflow:

- Pin every action to a full commit SHA with a version comment, for example `uses: actions/checkout@<40-char sha> # v7.0.1`.
Expand Down Expand Up @@ -278,23 +284,29 @@ Every issue and pull request carries **one `type:`** label, any **`area:`** labe
| `stage:` | `stage:0` … `stage:8` | Which roadmap stage (synced) |
| | `roadmap-phase` | An issue mirrored from the roadmap (synced: edit the roadmap, not the issue) |
| | `dependencies` | Opened by Dependabot |
| | `good first issue`, `help wanted` | GitHub's community labels: small, well-scoped work for newcomers, and work the maintainer would welcome help with. Listed on the repository's `/contribute` page |

A new label is added to `LABELS` in a PR, never created by hand, so the taxonomy stays in one place. A new bounded context adds its `context:` label in the same PR as its BIAN mapping ADR.

### Branch protection (maintainers)

Configure a branch ruleset for `main` in the repository settings:
`main` is protected by the repository ruleset **`main`** ([ADR 0041](docs/adr/0041-open-source-repository-governance.md), Settings > Rules > Rulesets):

- A pull request is required, with one approval. Stale approvals are dismissed when new commits are pushed, and review threads must be resolved.
- Review from code owners ([.github/CODEOWNERS](.github/CODEOWNERS)) is required.
- These status checks must pass on a branch that is up to date with `main`: `build`, `analyze (actions)`, `analyze (csharp)`, `dependency-review`.
- History stays linear (squash merge only). Force pushes and deletion of `main` are blocked.
- **Bypass:** only the repository admin, and only inside a pull request. That lets the single maintainer merge their own green PR without a second approver. Nobody can push to `main` directly.

- Require a pull request before merging, with at least one approval, and dismiss stale approvals when new commits are pushed.
- Require review from code owners ([.github/CODEOWNERS](.github/CODEOWNERS)).
- Require these status checks to pass, and require branches to be up to date: `build`, `analyze (actions)`, `analyze (csharp)`.
- Block force pushes and branch deletion.
To check the live ruleset: `gh api repos/KsiProgramming/RimBank/rulesets`. When a second maintainer joins, remove the bypass (see GOVERNANCE.md).

## Commits and pull requests

- Write commit messages in the imperative mood ("Add Money arithmetic"), and keep each one focused.
- Work from a fork (or a branch, for maintainers) and open a pull request against `main`. Only the maintainer merges ([GOVERNANCE.md](GOVERNANCE.md)).
- Write commit messages in the imperative mood ("Add Money arithmetic"), and keep each one focused. PRs are squash-merged, so the PR title becomes the commit on `main`: make it imperative too.
- Fill in the pull request template, including the Definition of done checklist.
- At least one maintainer review is required before merging.
- A maintainer review is required before merging.
- New to the project? Start with an issue labelled [`good first issue`](https://github.com/KsiProgramming/RimBank/labels/good%20first%20issue), or ask in [Discussions](https://github.com/KsiProgramming/RimBank/discussions).

## Code of Conduct and security

Expand Down
27 changes: 27 additions & 0 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Governance

RimBank is a young project with a single maintainer. This document says who decides what, and how that will change as the community grows.

## Roles

| Role | Who | Can |
|---|---|---|
| **Maintainer** | [@KsiProgramming](https://github.com/KsiProgramming) | Merge pull requests, cut releases, accept ADRs, change the constitution in [`specs/`](specs/), triage and moderate |
| **Contributor** | Anyone who opens an issue, discussion or pull request | Propose changes from a fork. Every change reaches `main` through a reviewed pull request |

The maintainer is the only person who can merge into `main`. The `main` branch is protected by a ruleset (see [CONTRIBUTING.md](CONTRIBUTING.md#branch-protection-maintainers)): no direct pushes, no force pushes, no deletion, required status checks, and code-owner approval for every pull request.

## How decisions are made

- **Day-to-day changes** are decided in pull request review, against the [mission](specs/mission.md), the [tech stack](specs/tech-stack.md) and the [Definition of done](specs/roadmap.md#definition-of-done-every-phase).
- **Significant or BIAN-interpretation decisions** are recorded as an [architecture decision record](docs/adr/). Anyone can propose one in a pull request. The maintainer accepts or rejects it, and gives the reasons in the ADR.
- **The roadmap** ([specs/roadmap.md](specs/roadmap.md)) is changed only by pull request. Proposals start as a [feature or roadmap proposal](https://github.com/KsiProgramming/RimBank/issues/new?template=feature_request.yml) or a [discussion](https://github.com/KsiProgramming/RimBank/discussions).
- When the maintainer and a contributor disagree, the constitution in `specs/` is the tie-breaker. If it is silent, the maintainer decides and records the decision in an ADR.

## Becoming a maintainer

Contributors who have landed several substantial pull requests, reviewed others' work and shown they follow the constitution may be invited to become maintainers. When that happens, this file, [CODEOWNERS](.github/CODEOWNERS) and the `main` ruleset are updated in the same pull request. Decisions will then need agreement between maintainers.

## Code of Conduct

Everyone in the project follows the [Code of Conduct](CODE_OF_CONDUCT.md). The maintainer enforces it.
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

[![ci](https://github.com/KsiProgramming/RimBank/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/KsiProgramming/RimBank/actions/workflows/ci.yml)
[![codeql](https://github.com/KsiProgramming/RimBank/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/KsiProgramming/RimBank/actions/workflows/codeql.yml)
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/KsiProgramming/RimBank/badge)](https://scorecard.dev/viewer/?uri=github.com/KsiProgramming/RimBank)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![.NET 10](https://img.shields.io/badge/.NET-10-512BD4.svg)](global.json)
[![BIAN v14](https://img.shields.io/badge/BIAN-v14-0a7d6e.svg)](doc-0/release14.0.0/)
[![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)

**RimBank is an open-source, production-grade core banking platform built in .NET that implements the [BIAN](https://bian.org) Service Landscape v14 using Domain-Driven Design and hexagonal architecture.**

Expand All @@ -10,6 +15,14 @@ The code is meant to read like the business it serves. Every BIAN service domain
> **Status:** early development. Stage 0 (Foundations) and Stage 1 (Party Reference Data Directory) are done; Stage 2 (Product Directory) is next. See the [roadmap](specs/roadmap.md).
> RimBank is not a licensed bank and provides no regulatory certification.

## Highlights

- **BIAN v14, faithfully:** service domains, Control Records, Behavior Qualifiers and operations mapped one-to-one, checked by a BIAN conformance harness against the official OpenAPI and AsyncAPI files.
- **Event-sourced DDD core:** pure decisions, append-only events in PostgreSQL (Marten), read models rebuilt from each context's own event store, and optimistic concurrency and idempotency keys on every command.
- **HTTP and MCP, the same rules:** every BIAN operation is a REST endpoint *and* a [Model Context Protocol](https://modelcontextprotocol.io) tool for AI agents, with parity tests, per-operation OAuth scopes and RFC 9457 Problem Details on both.
- **Modular monolith, loosely coupled:** contexts integrate only through published integration events (Wolverine outbox), and architecture tests enforce the boundaries.
- **Production habits from day one:** .NET Aspire, OpenTelemetry, Testcontainers, warnings as errors, locked restore, SHA-pinned CI, CodeQL and OpenSSF Scorecard.

## How BIAN maps to the code

| BIAN concept | DDD / code concept | Example |
Expand All @@ -32,7 +45,7 @@ Namespaces follow `RimBank.<BusinessDomain>.<ServiceDomain>[.<Adapter>]` (adapte
├─ Directory.Packages.props # central package versions
├─ specs/ # the constitution: mission, tech stack, roadmap, phase plans
├─ docs/adr/ # architecture decision records
├─ doc-0/release14.0.0/ # BIAN v14 specifications (read-only input)
├─ doc-0/release14.0.0/ # BIAN v14 specifications (read-only input, Apache 2.0, see THIRD-PARTY-NOTICES.md)
├─ src/ # production code: RimBank.Core (every context's domain and application logic) and each context's adapters
└─ tests/ # test projects
```
Expand Down Expand Up @@ -60,8 +73,15 @@ To run RimBank (Docker required): `dotnet run --project src/RimBank.AppHost`, th

## Contributing

Contributions are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md). To report a vulnerability, see [SECURITY.md](SECURITY.md).
Contributions are welcome, from a typo fix to a whole BIAN service domain. Read [CONTRIBUTING.md](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md), then pick a [good first issue](https://github.com/KsiProgramming/RimBank/labels/good%20first%20issue) or a phase from the [roadmap](specs/roadmap.md).

- Questions and ideas: [Discussions](https://github.com/KsiProgramming/RimBank/discussions). See [SUPPORT.md](SUPPORT.md).
- Who decides and how: [GOVERNANCE.md](GOVERNANCE.md).
- What changed: [CHANGELOG.md](CHANGELOG.md).
- Vulnerabilities: report them privately, as described in [SECURITY.md](SECURITY.md).

If RimBank helps you learn BIAN, DDD or event sourcing, a ⭐ helps others find it.

## License

[MIT](LICENSE) © 2026 RimBank contributors
[MIT](LICENSE) © 2026 RimBank contributors. The BIAN specifications in `doc-0/` are © BIAN under the Apache License 2.0. See [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md). RimBank is not affiliated with BIAN. To cite RimBank, see [CITATION.cff](CITATION.cff).
13 changes: 13 additions & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Getting help

| You want to… | Go to |
|---|---|
| Ask how something works, or share an idea | [GitHub Discussions](https://github.com/KsiProgramming/RimBank/discussions) |
| Report a bug | [Bug report](https://github.com/KsiProgramming/RimBank/issues/new?template=bug_report.yml) |
| Propose a feature, a roadmap phase or a new BIAN service domain | [Feature or roadmap proposal](https://github.com/KsiProgramming/RimBank/issues/new?template=feature_request.yml) |
| Report a security vulnerability | **Privately**, as described in [SECURITY.md](SECURITY.md). Never in a public issue |
| Contribute code or documentation | [CONTRIBUTING.md](CONTRIBUTING.md), then pick a [good first issue](https://github.com/KsiProgramming/RimBank/labels/good%20first%20issue) |

Before asking, check the [architecture and business documentation](docs/README.md), the [ADRs](docs/adr/) and the [roadmap](specs/roadmap.md). Many "why is it like this?" questions are answered there.

RimBank is maintained by volunteers on a best-effort basis. There is no commercial support and no service-level agreement. RimBank is **not a licensed bank** and provides no regulatory certification.
Loading