Automated crop & weather insurance for underserved markets, powered by Soroban smart contracts and oracle data.
"Safi" means clean/pure in Swahili — SafiGuard delivers clean, transparent, trustless insurance to the people who need it most.
1.7 billion people in Africa and Latin America have zero insurance coverage. Traditional insurance fails them because:
- Claims processing takes weeks or months
- Paperwork and bureaucracy exclude rural populations
- Premiums are too high for micro-coverage
- Fraud and denial rates destroy trust
Meanwhile, a single bad rainy season can push an entire farming community into poverty.
SafiGuard is a parametric micro-insurance platform where:
- Farmers purchase weather insurance policies by paying small premiums in USDC/XLM
- Oracle feeds deliver real-time weather data (rainfall, temperature, drought indices)
- Smart contracts automatically trigger payouts when weather conditions breach policy thresholds
- No claims process — if rainfall drops below 40mm in your region, you get paid. Automatically.
Farmer buys policy ──► Premium enters Risk Pool ──► Oracle reports weather data
│
▼
Threshold breached?
│ │
YES NO
│ │
▼ ▼
Auto-payout Policy expires
to farmer safely
| Layer | Technology |
|---|---|
| Frontend | React 18, TypeScript, TailwindCSS |
| State Management | Zustand + React Query |
| Smart Contracts | Soroban SDK (Rust) |
| Backend API | Node.js, Express, TypeScript |
| Database | PostgreSQL + Redis (caching) |
| Oracle Layer | Custom oracle bridge + Chainlink (future) |
| Blockchain SDK | stellar-sdk, soroban-client |
| Weather Data | Open-Meteo API, NASA POWER, CHIRPS |
| Payments | USDC on Stellar, native XLM |
| Notifications | SMS (Africa's Talking), Email, Push |
| Testing | Vitest, Playwright, Rust test suite |
| CI/CD | GitHub Actions |
safiguard/
├── src/
│ ├── components/ # React UI components
│ │ ├── wallet/ # Wallet connection & management
│ │ ├── dashboard/ # User dashboard views
│ │ ├── policies/ # Policy browsing, purchase, management
│ │ ├── claims/ # Claim status & payout tracking
│ │ ├── pools/ # Risk pool management & staking
│ │ ├── oracle/ # Oracle data feeds & status
│ │ ├── analytics/ # Charts, risk metrics, portfolio
│ │ ├── settings/ # User preferences
│ │ └── common/ # Shared UI primitives
│ ├── hooks/ # Custom React hooks
│ ├── utils/ # Helper functions
│ ├── services/ # API & blockchain service layer
│ ├── types/ # TypeScript type definitions
│ ├── styles/ # Global styles & theme
│ ├── contexts/ # React context providers
│ ├── pages/ # Route-level page components
│ ├── contracts/ # Soroban smart contracts (Rust)
│ │ ├── weather-policy/ # Parametric weather insurance contract
│ │ ├── risk-pool/ # Pooled capital & risk management
│ │ ├── oracle-consumer/ # Oracle data bridge contract
│ │ ├── payout-engine/ # Automated payout settlement
│ │ └── governance/ # DAO governance for pool params
│ ├── api/ # Backend API server
│ │ ├── routes/ # API route handlers
│ │ ├── middleware/ # Auth, rate limiting, logging
│ │ ├── models/ # Database models
│ │ └── services/ # Business logic & oracle feeds
│ └── tests/ # Test suites
├── scripts/ # Deployment & utility scripts
├── docs/ # Documentation
└── .github/ # GitHub config & CI/CD
- Node.js >= 18
- Rust & Cargo (for Soroban contracts)
- Stellar CLI (
stellar) - PostgreSQL 15+
- Redis 7+
# Clone the repo
git clone https://github.com/Tetech-Labs/safiguard.git
cd safiguard
# Install dependencies
npm install
# Set up environment
cp .env.example .env
# Start development server
npm run dev
# Run tests
npm test# Build all contracts
cd src/contracts
cargo build --release --target wasm32-unknown-unknown
# Run contract tests
cargo test
# Deploy to testnet
stellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/weather_policy.wasm \
--network testnet| Phase | Vertical | Oracle Source | Target Market |
|---|---|---|---|
| v1 | Crop / Rainfall | Open-Meteo, CHIRPS | West & East Africa |
| v2 | Drought Index | NASA POWER, NDVI satellite | Sub-Saharan Africa |
| v3 | Flight Delay | FlightAware API | Pan-African travelers |
| v4 | Livestock Mortality | Temperature + NDVI | Pastoral communities |
| v5 | Flood / Excess Rainfall | Open-Meteo, river gauges | Coastal West Africa |
| v6 | Health Event Triggers | WHO data feeds | Community health pools |
We welcome contributors at every level! This project is part of the Stellar Community Fund ecosystem.
- Browse open Issues and find one that interests you
- Comment on the issue to get assigned
- Fork the repo and create a branch:
git checkout -b feat/your-feature - Make your changes and write tests
- Submit a Pull Request
| Label | Description |
|---|---|
good first issue |
Great for newcomers |
enhancement |
New feature or improvement |
soroban |
Smart contract work (Rust) |
frontend |
React/TypeScript UI |
backend |
Node.js API & services |
oracle |
Oracle data feeds & integration |
actuarial |
Risk modeling & premium calculation |
testing |
Test coverage |
documentation |
Docs, guides, API specs |
mobile |
Mobile responsiveness & SMS |
accessibility |
A11y & internationalization |
See CONTRIBUTING.md for full guidelines.
MIT License — see LICENSE for details.
- Stellar Documentation
- Soroban Documentation
- Open-Meteo Weather API
- CHIRPS Rainfall Data
- NASA POWER
- Africa's Talking SMS API
Built with ❤️ for the 1.7 billion uninsured — powered by Stellar 🌟