โ† Back to list
rustfs

domain-fintech

by rustfs

๐Ÿš€2.3x faster than MinIO for 4KB object payloads. RustFS is an open-source, S3-compatible high-performance object storage system supporting migration and coexistence with other S3-compatible platforms such as MinIO and Ceph.

โญ 20,125๐Ÿด 866๐Ÿ“… Jan 23, 2026

SKILL.md


name: domain-fintech description: "Use when building fintech apps. Keywords: fintech, trading, decimal, currency, financial, money, transaction, ledger, payment, exchange rate, precision, rounding, accounting, ้‡‘่ž, ไบคๆ˜“็ณป็ปŸ, ่ดงๅธ, ๆ”ฏไป˜"

FinTech Domain

Layer 3: Domain Constraints

Domain Constraints โ†’ Design Implications

Domain RuleDesign ConstraintRust Implication
Audit trailImmutable recordsArc, no mutation
PrecisionNo floating pointrust_decimal
ConsistencyTransaction boundariesClear ownership
ComplianceComplete loggingStructured tracing
ReproducibilityDeterministic executionNo race conditions

Critical Constraints

Financial Precision

RULE: Never use f64 for money
WHY: Floating point loses precision
RUST: Use rust_decimal::Decimal

Audit Requirements

RULE: All transactions must be immutable and traceable
WHY: Regulatory compliance, dispute resolution
RUST: Arc<T> for sharing, event sourcing pattern

Consistency

RULE: Money can't disappear or appear
WHY: Double-entry accounting principles
RUST: Transaction types with validated totals

Trace Down โ†“

From constraints to design (Layer 2):

"Need immutable transaction records"
    โ†“ m09-domain: Model as Value Objects
    โ†“ m01-ownership: Use Arc for shared immutable data

"Need precise decimal math"
    โ†“ m05-type-driven: Newtype for Currency/Amount
    โ†“ rust_decimal: Use Decimal type

"Need transaction boundaries"
    โ†“ m12-lifecycle: RAII for transaction scope
    โ†“ m09-domain: Aggregate boundaries

Key Crates

PurposeCrate
Decimal mathrust_decimal
Date/timechrono, time
UUIDuuid
Serializationserde
Validationvalidator

Design Patterns

PatternPurposeImplementation
Currency newtypeType safetystruct Amount(Decimal);
TransactionAtomic operationsEvent sourcing
Audit logTraceabilityStructured logging with trace IDs
LedgerDouble-entryDebit/credit balance

Code Pattern: Currency Type

use rust_decimal::Decimal;

#[derive(Clone, Debug, PartialEq)]
pub struct Amount {
    value: Decimal,
    currency: Currency,
}

impl Amount {
    pub fn new(value: Decimal, currency: Currency) -> Self {
        Self { value, currency }
    }

    pub fn add(&self, other: &Amount) -> Result<Amount, CurrencyMismatch> {
        if self.currency != other.currency {
            return Err(CurrencyMismatch);
        }
        Ok(Amount::new(self.value + other.value, self.currency))
    }
}

Common Mistakes

MistakeDomain ViolationFix
Using f64Precision lossrust_decimal
Mutable transactionAudit trail brokenImmutable + events
String for amountNo validationValidated newtype
Silent overflowMoney disappearsChecked arithmetic

Trace to Layer 1

ConstraintLayer 2 PatternLayer 1 Implementation
Immutable recordsEvent sourcingArc, Clone
Transaction scopeAggregateOwned children
PrecisionValue Objectrust_decimal newtype
Thread-safe sharingShared immutableArc (not Rc)

WhenSee
Value Object designm09-domain
Ownership for immutablem01-ownership
Arc for sharingm02-resource
Error handlingm13-domain-error

Score

Total Score

90/100

Based on repository quality metrics

โœ“SKILL.md

SKILL.mdใƒ•ใ‚กใ‚คใƒซใŒๅซใพใ‚Œใฆใ„ใ‚‹

+20
โœ“LICENSE

ใƒฉใ‚คใ‚ปใƒณใ‚นใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+10
โœ“่ชฌๆ˜Žๆ–‡

100ๆ–‡ๅญ—ไปฅไธŠใฎ่ชฌๆ˜ŽใŒใ‚ใ‚‹

+10
โœ“ไบบๆฐ—

GitHub Stars 1000ไปฅไธŠ

+15
โœ“ๆœ€่ฟ‘ใฎๆดปๅ‹•

1ใƒถๆœˆไปฅๅ†…ใซๆ›ดๆ–ฐ

+10
โœ“ใƒ•ใ‚ฉใƒผใ‚ฏ

10ๅ›žไปฅไธŠใƒ•ใ‚ฉใƒผใ‚ฏใ•ใ‚Œใฆใ„ใ‚‹

+5
โ—‹Issue็ฎก็†

ใ‚ชใƒผใƒ—ใƒณIssueใŒ50ๆœชๆบ€

0/5
โœ“่จ€่ชž

ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐ่จ€่ชžใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+5
โœ“ใ‚ฟใ‚ฐ

1ใคไปฅไธŠใฎใ‚ฟใ‚ฐใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+5

Reviews

๐Ÿ’ฌ

Reviews coming soon