Skip to content

Latest commit

Β 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌍 Atlas Core - Precision Agriculture Platform

Transform agricultural data into actionable intelligence for African farmers through satellite imagery, AI plant diagnostics, and predictive analytics.

Status Build License


πŸ“‹ What is Atlas Core?

Atlas Core is an intelligent geospatial platform designed to empower African farmers with data-driven decision-making. It combines:

  • πŸ“Έ AI Plant Diagnostics - Photograph plants, get instant disease detection
  • πŸ›°οΈ Satellite Field Monitoring - NDVI-based crop health visualization
  • πŸ’‘ Smart Recommendations - AI-powered irrigation, fertilizer, pest control advice
  • 🌀️ Weather Intelligence - Agricultural forecasts and alerts
  • πŸ“ˆ Historical Analytics - Track field performance over time

Current Status: βœ… Phase 2 MVP - 75% Complete | Auth + Camera + Recommendations Working


πŸš€ Quick Start (2 Minutes)

1. Setup

npm install
cp .env.example .env.local
# Add Supabase credentials

2. Seed Test Data

npm run seed:test-data

3. Start

npm run dev
# Open http://localhost:5000

4. Test

Create account β†’ Click "Atlas Agri" β†’ Explore modules

πŸ“– Full setup guide: QUICKSTART.md


πŸ“š Documentation (Start Here!)

Document Purpose Read Time
QUICKSTART.md Setup + testing 10 min
PROJECT_STATUS.md Current progress + blockers 15 min
CLAUDE.md Architecture principles 20 min
CHANGELOG.md Commit history 10 min
CAMERA_SATELLITE_SETUP.md API integration guide 30 min

πŸ‘‰ New to this project? Start with QUICKSTART.md


πŸ“Š What's Working Now βœ…

  • βœ… Authentication - Login/signup with Supabase + VIP admin access code
  • βœ… Recommendations - Load real data from database, filter by category, mark complete
  • βœ… Plant Scanning - Camera capture + OpenAI Vision AI diagnosis (with mock fallback)
  • βœ… Sidebar Navigation - 6-section AgriModule with smooth animations
  • βœ… Test Data - npm run seed:test-data creates 2 farms + 4 parcels + 3 scans + 5 recommendations
  • βœ… Services Layer - All Supabase queries properly abstracted
  • βœ… State Management - Zustand stores for auth + agricultural data
  • βœ… TypeScript + Theme - Strict types, responsive design, professional animations

πŸ”„ What's In Progress ⏳

  • ⏳ Photo Upload - Camera captures images, NOT yet uploaded to Supabase storage (HIGH PRIORITY)
  • ⏳ Weather Forecast - UI 100% complete, API integration needs real OpenWeatherMap wiring
  • ⏳ Satellites/NDVI - Map UI ready, needs real Sentinel Hub data integration
  • ⏳ Dashboard - UI skeleton complete, needs real farm/parcel data binding
  • ⏳ Scan History - UI structure ready, needs data connection

Full details: PROJECT_STATUS.md | Audit: CODE_AUDIT_2026-05-28.md


πŸ—οΈ Architecture Overview

UI Components (React Native)
    ↓ calls store actions
Zustand Stores (authStore, agriStore)
    ↓ triggers service calls
Services Layer (Business logic + API calls)
    ↓ queries
External APIs (Supabase, OpenAI, Weather, Satellites)

Key Principles:

  • βœ… Services handle all API calls
  • βœ… Stores handle state + errors
  • βœ… Components display data only
  • βœ… Everything strictly typed

See CLAUDE.md for full architecture.


πŸ“± Module Status

Atlas Agri (Main MVP)

Module Status What It Does
Tableau de bord 50% Farm overview structure ready, needs real data binding
Carte du champ 55% Interactive NDVI grid UI ready, needs Sentinel Hub API
Scan de plante 85% βœ… Camera capture + AI diagnosis working, photo upload TODO
Recommandations 100% βœ… Load from DB, filter, mark complete β€” fully functional
MΓ©tΓ©o agricole 60% UI 100% complete, weather API needs real integration
Historique 50% UI structure ready, needs to load real scan history

πŸ”‘ Environment Setup

Minimal (Works with Mock Data)

EXPO_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=eyJhbGc...

Full (Real APIs)

# Required
EXPO_PUBLIC_SUPABASE_URL=...
SUPABASE_ANON_KEY=...

# Optional (falls back to mock if not provided)
OPENAI_API_KEY=sk-proj-...        # Plant diagnosis
EXPO_PUBLIC_WEATHER_API_KEY=...   # Weather forecast
EXPO_PUBLIC_SENTINEL_HUB_TOKEN=... # Satellite data (Sentinel Hub)
# Optional compatibility alias:
# SENTINEL_HUB_TOKEN=...          # Satellite data (legacy)

Get API keys:


πŸ§ͺ Test Data

Pre-seeded realistic data for demo:

npm run seed:test-data

Creates:

  • 2 Farms: Kayes (Mali) + Bamako (Mali)
  • 4 Parcels: Different crops + health scores
  • 3 Scans: Plant diagnostics with confidence scores
  • 5 Recommendations: Urgent to low priority

Perfect for testing without external APIs.


πŸ“ Development Workflow

Start a Task

# 1. Read current status
cat PROJECT_STATUS.md

# 2. Make changes
npm run typecheck  # Check types
npm run lint       # Check style

# 3. Test locally
npm run dev

# 4. Commit using conventional commits
git commit -m "feat: Add real satellite integration"
git commit -m "fix: Correct weather API"
git commit -m "docs: Update README"

# 5. Update docs
# - CHANGELOG.md (what changed)
# - PROJECT_STATUS.md (progress update)

Commands

npm run dev              # Start dev server (web)
npm run dev:ios          # iOS simulator
npm run dev:android      # Android emulator
npm run typecheck        # TypeScript validation
npm run lint            # Code style check
npm run seed:test-data  # Load test data
npm run build:web       # Production web build

πŸ› Known Issues

Issue Severity Timeline
Photos not uploading to Supabase storage Medium This week
Satellite NDVI currently mock data Medium This week
Weather not displayed in UI Low This week
Dashboard not showing live data Low Next week

See PROJECT_STATUS.md for details.


πŸš€ Next Priorities

This Week

  1. Real Satellite NDVI (3-4h)

    • Fetch from Sentinel Hub
    • Update map to show real grid
  2. Weather Display (1-2h)

    • Wire AgriMeteo to store
    • Show forecast
  3. Photo Upload (2h)

    • Store camera photos to Supabase

Next Week

  1. Dashboard Connections (2-3h)
  2. Performance Optimization (2h)
  3. Error Handling (2h)

Full roadmap: PROJECT_STATUS.md


πŸ“‚ Project Structure

atlas-core/
β”œβ”€β”€ app/                        # Expo Router navigation
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ agri/                   # Atlas Agri modules
β”‚   β”‚   β”œβ”€β”€ AgriScan.tsx        # Camera + AI diagnosis βœ…
β”‚   β”‚   β”œβ”€β”€ AgriRecommandations.tsx  # Real data βœ…
β”‚   β”‚   β”œβ”€β”€ AgriNDVIMap.tsx     # Satellite visualization
β”‚   β”‚   β”œβ”€β”€ AgriMeteo.tsx       # Weather
β”‚   β”‚   β”œβ”€β”€ AgriDashboard.tsx   # Dashboard
β”‚   β”‚   └── AgriHistorique.tsx  # History
β”‚   β”œβ”€β”€ auth/                   # Login/signup screens
β”‚   └── hub/                    # Module selection
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ auth.ts             # Supabase Auth
β”‚   β”‚   β”œβ”€β”€ plantDiagnosis.ts   # OpenAI Vision βœ…
β”‚   β”‚   β”œβ”€β”€ farms.ts, parcels.ts, scans.ts...
β”‚   β”‚   └── index.ts
β”‚   β”œβ”€β”€ stores/
β”‚   β”‚   β”œβ”€β”€ authStore.ts        # User auth state βœ…
β”‚   β”‚   └── agriStore.ts        # Agricultural data βœ…
β”‚   β”œβ”€β”€ types.ts                # TypeScript interfaces
β”‚   β”œβ”€β”€ theme.ts                # Design tokens
β”‚   └── env.ts                  # Environment validation
β”œβ”€β”€ scripts/
β”‚   └── seed.ts                 # Test data seeding βœ…
β”œβ”€β”€ supabase/
β”‚   └── migrations/             # Database schema
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ QUICKSTART.md           # Setup guide βœ…
β”‚   β”œβ”€β”€ PROJECT_STATUS.md       # Progress tracking βœ…
β”‚   β”œβ”€β”€ CAMERA_SATELLITE_SETUP.md # Integration guide βœ…
β”‚   └── CHANGELOG.md            # Commit history βœ…
β”œβ”€β”€ CLAUDE.md                   # Architecture βœ…
└── package.json

πŸ›  Tech Stack

  • Frontend: React Native 0.81 + Expo 54
  • Navigation: Expo Router
  • State: Zustand
  • Database: Supabase (PostgreSQL + Auth + Storage)
  • Language: TypeScript
  • Styling: React Native StyleSheet + theme tokens
  • Icons: Lucide React Native
  • Validation: Zod

πŸ”’ Security

  • βœ… Row-level security (RLS) on all tables
  • βœ… Secure token storage (encrypted on mobile + web)
  • βœ… Input validation + sanitization
  • βœ… Audit log for compliance
  • βœ… HTTPS-only Supabase
  • βœ… Environment variable validation

πŸ“ž Resources


πŸŽ“ For New Team Members

  1. Read (in order):

  2. Setup:

    npm install
    cp .env.example .env.local  # Add credentials
    npm run seed:test-data
    npm run dev
  3. Explore:

    • Click through UI
    • Open DevTools (F12)
    • Read the code (stores β†’ services β†’ components)
  4. Understand (in order):

    • How Zustand stores work
    • How services call Supabase
    • How components read stores
    • The architecture flow
  5. Build:

    • Start with small changes
    • Use conventional commits
    • Update docs after work
    • Test before pushing

πŸ“ˆ Phase Progress

Phase 1: Foundation βœ… COMPLETE
Phase 2: MVP πŸ”„ 75% COMPLETE (Current Sprint)
β”œβ”€ Auth βœ…
β”œβ”€ Recommendations βœ…
β”œβ”€ Camera + AI βœ…
β”œβ”€ Test Data βœ…
β”œβ”€ Satellites ⏳
β”œβ”€ Weather ⏳
└─ Dashboard ⏳

Phase 3: Backend Logic πŸ”œ
Phase 4: Testing & Deploy πŸ”œ
Phase 5: Other Modules πŸ”œ

🀝 Contributing

  1. Create a feature branch: git checkout -b feat/your-feature
  2. Make changes following CLAUDE.md guidelines
  3. Run checks: npm run typecheck && npm run lint
  4. Commit: git commit -m "feat: Your feature"
  5. Update docs before pushing
  6. Push: git push

πŸ“„ License

MIT License - see LICENSE for details


πŸ‘₯ Team


Building Africa's future, one field at a time. 🌾

Last Updated: 2026-05-28 | Phase: 2 MVP - 75% Complete

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages