k4
Examples
Star on GitHub
Repository
Implementation Library
8 foundational backend patterns implemented in Web2 and Solana.
Filter
PATTERN_01
DeFi
Escrow Engine
The foundation of trustless swaps. Centralized arbitrator vs. Programmatic vault.
Web2
Node.js
Python
Go
Web3
Solana
Rust
PATTERN_02
Payments
Subscription Billing
Recurring payments. Active cron jobs vs. Passive permissionless cranks.
Web2
Node.js
Python
Go
Web3
Solana
Rust
PATTERN_03
DeFi
Order Matching Engine
High-performance CLOB. Centralized matching vs. On-chain distributed book.
Web2
Node.js
Python
Go
Web3
Solana
Rust
PATTERN_04
Security
Access Control (RBAC)
Permission management. Database roles vs. Cryptographic PDA existence proofs.
Web2
Node.js
Python
Go
Web3
Solana
Rust
PATTERN_05
Infrastructure
Rate Limiter System
Throttling and spam prevention. Infrastructure protection vs. Economic protection.
Web2
Node.js
Python
Go
Web3
Solana
Rust
PATTERN_06
Infrastructure
On-chain Job Queue
Background task processing. Managed infrastructure vs. Market-driven bounty hunting.
Web2
Node.js
Python
Go
Web3
Solana
Rust
PATTERN_07
Security
API Key Management
Provable access tokens. Secret bearer strings vs. Verifiable ledger accounts.
Web2
Node.js
Python
Go
Web3
Solana
Rust
PATTERN_08
Gaming
Leaderboard Engine
Global high scores. Pliable server databases vs. Rigid immutable state machines.
Web2
Node.js
Python
Go
Web3
Solana
Rust
Pattern 09 Under Construction