A decentralized harvest invoice financing protocol built on Stellar. InvoiceFi Stellar enables smallholder farmers to tokenize future crop yields as on-chain invoices and access instant working capital from DeFi liquidity providers via Soroban smart contracts.
The protocol transforms agricultural future yields into tradable financial assets, improving liquidity access for farmers while providing transparent yield-backed opportunities for investors.
website rediflow-stellar-capital.lovable.app
- Mint crop yield invoices as NFTs
- Represent future harvests as on-chain assets
- Store invoice metadata and valuation data
- Discounted invoice financing mechanism
- Liquidity pool funding for invoices
- Instant working capital for farmers
- Risk-adjusted financing rates
- Yield-based repayment verification
- Automated smart contract settlement
- Transparent repayment tracking
- On-chain fund distribution
- XLM
- USDC
- AQUA
- Farmer dashboard for invoice creation and tracking
- Investor dashboard for financing and portfolio management
- Real-time funding analytics
- Soroban (Rust smart contracts)
- Stellar Blockchain
- Next.js 14 (Frontend)
- NestJS (Backend API)
- PostgreSQL (Database)
- Prisma ORM
Frontend (Next.js)
|
v
Backend API (NestJS)
|
v
PostgreSQL Database
|
v
Soroban Smart Contracts
|
v
Stellar Blockchain
git clone https://github.com/Christopherdominic/InvoiceFi-Stellar.git
cd InvoiceFi-Stellarnpm installnpm run dev- Docker ≥ 24
- Docker Compose v2 (bundled with Docker Desktop)
# 1. Copy environment template
cp .env.example .env
# Edit .env with your secrets before proceeding
# 2. Start the full stack
docker compose up --build| Service | URL |
|---|---|
| Frontend (Next.js) | http://localhost:3000 |
| Backend (NestJS) | http://localhost:4000 |
| Horizon API | http://localhost:8000 |
| Soroban RPC | http://localhost:8001 |
| PostgreSQL | localhost:5432 |
# Stop containers (keep data volumes)
docker compose down
# Full teardown – removes containers AND volumes
docker compose down -vmake up # docker compose up --build
make down # docker compose down
make clean # docker compose down -v
make logs # tail all service logs
make ps # show running containers
make staging # start staging stackdocker compose -f docker-compose.yml -f docker-compose.staging.yml up --buildThe staging override switches the Stellar node to testnet, sets NODE_ENV=staging, and removes host-port exposure for the database and Stellar services.
Handles:
- Invoice minting
- Metadata storage
- Ownership tracking
Handles:
- Liquidity provision
- Invoice funding
- Discount logic
Handles:
- Repayment processing
- Yield verification
- Fund distribution
AgroLedger/
├── contracts/
│ ├── invoice/
│ ├── financing-pool/
│ └── settlement/
│
├── frontend/
│ ├── app/
│ ├── components/
│ ├── hooks/
│ └── lib/
│
├── backend/
│ ├── src/
│ ├── modules/
│ ├── prisma/
│ └── queues/
│
└── README.md
- Oracle-based crop yield verification
- Insurance layer for harvest risk
- DAO governance for liquidity pools
- Cross-chain invoice financing
- AI-based credit risk scoring
- Mobile farmer onboarding application
- Fork the repository
- Create a feature branch
- Commit your changes
- Push and open a Pull Request
MIT License
InvoiceFi Stellar aims to unlock agricultural liquidity by transforming future harvests into verifiable on-chain financial instruments, connecting farmers to global decentralized capital markets.