# 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 β¦