https://github.com/iannil/code-ledge-x
CODE-LEDGE-X is a universal distributed business reconciliation engine that supports automatic reconciliation and difference reporting across multiple data sources (CSV, PostgreSQL, etc.).
https://github.com/iannil/code-ledge-x
analyzer code edge
Last synced: 9 days ago
JSON representation
CODE-LEDGE-X is a universal distributed business reconciliation engine that supports automatic reconciliation and difference reporting across multiple data sources (CSV, PostgreSQL, etc.).
- Host: GitHub
- URL: https://github.com/iannil/code-ledge-x
- Owner: iannil
- License: apache-2.0
- Created: 2026-01-25T06:54:40.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2026-01-25T10:06:13.000Z (5 months ago)
- Last Synced: 2026-01-25T23:08:13.310Z (5 months ago)
- Topics: analyzer, code, edge
- Language: Go
- Homepage: https://zhurongshuo.com/products/code-ledge-x/
- Size: 8.33 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# CODE-LEDGE-X
> Data Design Over Code Logic — Eliminating code complexity through strategic data redundancy
[English](README.md) | [中文](README.zh-CN.md)
---
## Overview
CODE-LEDGE-X is a project that combines architectural philosophy with open-source practice, consisting of two parts:
1. "[Data as the Boundary: Refactoring Software Complexity](https://zhurongshuo.com/practices/season-4/data-as-the-boundary/)" — A practical book on system architecture
2. CODE-LEDGE-X — A universal distributed business reconciliation engine based on the book's theory
---
## Quick Start with CODE-LEDGE-X
CODE-LEDGE-X is a universal distributed business reconciliation engine that supports automatic reconciliation and difference reporting across multiple data sources (CSV, PostgreSQL, etc.).
### Installation
```bash
# Clone the repository
git clone https://github.com/iannil/code-ledge-x.git
cd code-ledge-x
# Build
make build
# Or build directly with Go
go build -o bin/ledgex ./cmd/ledgex
```
### Usage
```bash
# Run reconciliation with example config
./bin/ledgex run --config ./configs/example.yaml
# Check version
./bin/ledgex version
# Initialize config file
./bin/ledgex init
```
### Configuration Example
```yaml
job: "order_vs_payment"
output: "./report.html"
source_left:
type: "csv"
path: "./testdata/left.csv"
mapping:
biz_id: "order_id"
amount: "total_fee"
state: "status"
source_right:
type: "csv"
path: "./testdata/right.csv"
mapping:
biz_id: "payment_id"
amount: "amount"
state: "status"
rules:
- type: "existence"
- type: "amount_match"
- type: "state_match"
```
### Reconciliation Results
After running, an HTML difference report will be generated containing:
- Record statistics (left/right record counts, matches, differences)
- Difference details (left-only, right-only, amount mismatch, state mismatch)
### Development
```bash
# Run tests
make test
# Format code
make fmt
```
---
## Core Philosophy
> "The storage cost of adding one more field is far less than the cognitive cost of maintaining if/else logic."
The Concept Decompression Theory proposed in this book:
| Level | Meaning | Example |
|-------|---------|---------|
| Micro | Field Decomposition | `order_type` → `fulfillment_type` + `promotion_type` + `payment_terms` |
| Meso | Table Structure Separation | Business tables vs Audit tables (snapshot pattern) |
| Macro | System Boundary | Dual ledger: Intent (inbound events) vs Result (business state) |
---
## Navigation
### LedgeX Open Source Project
- [Proposal](docs/ledgex/proposal.md) — Product positioning and design philosophy
- [Architecture](docs/ledgex/architecture.md) — Four-layer architecture details
- [Tech Stack](docs/ledgex/tech-stack.md) — Technology choices and rationale
- [Implementation Phases](docs/ledgex/phases.md) — Three-phase roadmap
- [API Documentation](docs/ledgex/api.md) — Core interface definitions
### About Development
- [Development Guide](docs/development.md) — Contributor guidelines
- [Progress Tracking](docs/progress/status.md) — Development status and todos
- [Roadmap](docs/progress/roadmap.md) — Project milestones
---
## Target Audience
- Senior Software Engineers / Technical Experts
- System Architects
- Technical Managers / CTOs
---
## License
This project is licensed under [Apache 2.0](LICENSE).