# dira-core
**The Dira Africa Telegram Mini App**
Farmers and Data Agents capture climate observations and redeem rewards — all inside Telegram, with no wallet or crypto knowledge required.
---
## Overview
`dira-core` is the frontend for the Dira Africa platform — a decentralized climate-data verification network for African smallholder agriculture. It is a **Telegram Mini App** built with Next.js: farmers use it to submit geo-tagged crop photos and receive AI-generated health reports, and Data Agents use it to sync barometric-pressure readings and earn Climate Tokens. Tokens are redeemable for mobile money, airtime, farm-input vouchers, or Dira Circle community cash.
Identity comes from Telegram, and all blockchain activity happens server-side in `dira-api`. This is a **custodial** app: there is no on-chain wallet, no seed phrase, and no key management in the client. The experience is pure Web2.
## Features
- 📲 **Telegram-native onboarding** — sign in with Telegram; role-based flows for farmers and Data Agents.
- 📸 **Guided data capture** — camera capture, crop selection, automatic geolocation, and device-sensor (barometer) readings.
- 📊 **Reports & dashboards** — AI crop-health reports, historical submissions, and maps.
- 💚 **Custodial wallet** — Climate Token balance and one-tap redemption (mobile money, airtime, vouchers, community pool).
- 🌍 **Bilingual** — full English and Swahili support.
## Tech stack
| Layer | Choice |
| --- | --- |
| Framework | Next.js 14 (App Router), React 18, TypeScript |
| Telegram | `@twa-dev/sdk` (Telegram Web App SDK) |
| Maps & charts | Leaflet, Chart.js |
| Styling | Tailwind CSS — primary teal `#0A6E56`, secondary midnight `#1A1A6E` |
| Backend | `dira-api` over HTTPS |
## Project structure
```
app/
(auth)/onboarding/ Role, language, and profile onboarding
(farmer)/ Farmer home, submit (capture → details → upload), reports
(agent)/ Agent home and settings
(shared)/ Home, wall …