💡 摘要
N8ture AI 应用程序使用人工智能从照片中识别野生动物、植物和真菌,提供安全性和可食用性信息。
🎯 适合人群
🤖 AI 吐槽: “看起来很能打,但别让配置把人劝退。”
风险:Medium。建议检查:是否执行 shell/命令行指令;是否发起外网请求(SSRF/数据外发);API Key/Token 的获取、存储与泄露风险;文件读写范围与路径穿越风险。以最小权限运行,并在生产环境启用前审计代码与依赖。
🌿 N8ture AI App - Wildlife & Plant Identification
📋 Table of Contents
- Overview
- Features
- Project Structure
- Tech Stack
- Getting Started
- Development
- Implementation Status
- Business Model
- API Integration
- Documentation
- Contributing
- License
🎯 Overview
N8ture AI App is a cross-platform mobile application that uses advanced AI to identify species from photos. Whether you're a nature enthusiast, forager, or outdoor adventurer, this app helps you safely identify plants, animals, and fungi with confidence.
Why N8ture AI?
- 🤖 AI-Powered: Google Gemini Vision API for accurate species identification
- 🔒 Safety First: Clear safety indicators for edibility and toxicity
- 📱 Cross-Platform: Native iOS & Android apps using Kotlin Multiplatform
- 🌐 Web Prototype: React-based web version for testing and development
- 💰 Freemium Model: 3 free identifications, with premium subscriptions available
✨ Features
🆓 Free Tier
- 3 lifetime identifications
- Basic species information
- Safety warnings (edible/poisonous)
- Confidence scoring
- Common and scientific names
💎 Premium ($4.99/month or $39.99/year)
- ✅ Unlimited identifications
- 📸 High-resolution image capture
- 📍 Location tracking and mapping
- 🗺️ Detailed habitat information
- 🌿 Medicinal and herbal benefits
- 👨🍳 Cooking methods and recipes
- 📴 Offline mode (50 species cache)
- 📊 Export identification history
- 🔔 Priority support
🔍 Identification Categories
- 🌱 Plants: Trees, flowers, shrubs, grasses
- 🦌 Wildlife: Mammals, birds, reptiles, amphibians
- 🍄 Fungi: Mushrooms, lichens, molds
- 🐛 Insects: Butterflies, beetles, spiders
🛡️ Safety Indicators
- 🟢 Safe/Edible: Confirmed safe for consumption
- 🟡 Caution: Edible with proper preparation/cooking
- 🔴 Dangerous/Poisonous: Toxic or harmful
- ⚪ Unknown: Insufficient data for determination
📁 Project Structure
This repository contains two parallel implementations:
N8ture-AI-App/
│
├── Walker App/KAppMakerExtended-main/ # 📱 Production: Kotlin Multiplatform Mobile
│ ├── composeApp/ # Main app module
│ │ ├── src/commonMain/ # Shared Kotlin code
│ │ │ ├── domain/ # Business logic & models
│ │ │ ├── data/ # Repositories & data sources
│ │ │ └── presentation/ # UI screens & components
│ │ ├── src/androidMain/ # Android-specific code
│ │ └── src/iosMain/ # iOS-specific code
│ ├── iosApp/ # iOS native wrapper
│ └── designsystem/ # Shared design system
│
├── AI App for.../wildlife-id-app-complete/ # 🌐 Web Prototype: React + Flask
│ └── wildlife-id-app/
│ ├── src/ # React frontend
│ │ ├── components/ui/ # shadcn/ui components
│ │ └── App.jsx # Main app logic
│ └── backend/ # Flask backend (mock AI)
│ └── app.py # API endpoints
│
├── CLAUDE.md # 🤖 Developer guide for Claude Code
├── README.md # 📖 This file
├── N8ture AI App_MVP_PRD.md # Product requirements
├── N8ture AI App_Implementation_Guide.md # Technical implementation details
└── AppStructure_PRD.md # API migration guide (Replicate → Gemini)
🛠️ Tech Stack
Kotlin Multiplatform Mobile (Production App)
| Component | Technology | |-----------|-----------| | Platform | Kotlin Multiplatform Mobile (KMM) | | UI Framework | Compose Multiplatform + Material Design 3 | | Backend | Firebase (Auth, Firestore, Storage, Analytics, Crashlytics) | | AI Engine | Google Gemini Vision API | | Database | Room (SQLite) with multiplatform support | | Networking | Ktor Client | | Dependency Injection | Koin | | Subscriptions | RevenueCat (StoreKit 2 for iOS, Google Play Billing 5 for Android) | | Image Loading | Coil (Compose) | | Serialization | Kotlinx Serialization |
Platform Targets:
- Android: Min SDK 24 (Android 7.0), Target SDK 35
- iOS: Min iOS 14.0, Target iOS 17.0
React Web Prototype
| Component | Technology | |-----------|-----------| | Frontend | React 19 + Vite | | UI Library | shadcn/ui (Radix UI primitives) | | Styling | Tailwind CSS v4 | | Routing | React Router v7 | | Forms | React Hook Form + Zod validation | | Backend | Flask (Python 3) | | Package Manager | pnpm 10.4.1 |
🚀 Getting Started
Prerequisites
For Kotlin App:
- ☕ JDK 17 or higher
- 🤖 Android Studio Hedgehog (2023.1.1) or later
- 🍎 Xcode 15+ (for iOS development, macOS only)
- 🔧 kdoctor (for system verification)
For React Prototype:
- 📦 Node.js 18+
- 🔥 pnpm 10.4.1
- 🐍 Python 3.8+
📱 Kotlin Multiplatform Setup
1. Navigate to Project Directory
cd "Walker App/KAppMakerExtended-main"
2. Configure API Keys
Copy the template and add your credentials:
cp local.properties.template local.properties
Edit local.properties:
sdk.dir=/path/to/Android/sdk # Google Gemini API (https://ai.google.dev/) GEMINI_API_KEY=your_gemini_api_key # Firebase Web Client ID GOOGLE_WEB_CLIENT_ID=your_client_id.apps.googleusercontent.com # RevenueCat API Keys (https://revenuecat.com/) REVENUECAT_ANDROID_API_KEY=your_android_key REVENUECAT_IOS_API_KEY=your_ios_key # AdMob IDs (optional) ADMOB_APP_ID_ANDROID=ca-app-pub-xxx ADMOB_BANNER_AD_ID_ANDROID=ca-app-pub-xxx ADMOB_INTERSTITIAL_AD_ID_ANDROID=ca-app-pub-xxx ADMOB_REWARDED_AD_ID_ANDROID=ca-app-pub-xxx ADMOB_BANNER_AD_ID_IOS=ca-app-pub-xxx ADMOB_INTERSTITIAL_AD_ID_IOS=ca-app-pub-xxx ADMOB_REWARDED_AD_ID_IOS=ca-app-pub-xxx
3. Firebase Configuration
- Create a Firebase project at console.firebase.google.com
- Add Android app with package
com.measify.kappmaker - Add iOS app with bundle ID
com.measify.kappmaker - Download configuration files:
google-services.json→ Place incomposeApp/GoogleService-Info.plist→ Place iniosApp/iosApp/
4. RevenueCat Setup (Optional)
- Create account at revenuecat.com
- Configure products:
wildid_premium_monthly- $4.99/monthwildid_premium_annual- $39.99/year
- Add API keys to
local.properties
5. Build the App
Android:
# Build debug APK ./gradlew :composeApp:assembleDebug # Output: composeApp/build/outputs/apk/debug/composeApp-debug.apk # Run on connected device ./gradlew :composeApp:installDebug # Run tests ./gradlew :composeApp:connectedDebugAndroidTest
iOS (macOS only):
cd iosApp pod install open iosApp.xcworkspace
Or use the Kotlin Multiplatform Mobile plugin in Android Studio.
🌐 React Web Prototype Setup
1. Navigate to Project Directory
cd "AI App for Identifying Wildlife, Plants, and Edibility/wildlife-id-app-complete/wildlife-id-app"
2. Install Dependencies
# Frontend pnpm install # Backend cd backend pip3 install -r requirements.txt cd ..
3. Start Development Servers
Terminal 1 - Backend:
cd backend python3 app.py # Backend runs at http://localhost:5000
Terminal 2 - Frontend:
pnpm dev # Frontend runs at http://localhost:5173 # For network access: pnpm dev -- --host
4. Build for Production
pnpm build pnpm preview
🔨 Development
Cleaning & Troubleshooting
# Clean build artifacts ./gradlew clean # Clean and rebuild ./gradlew clean :composeApp:assembleDebug # Verify system setup kdoctor # Check JDK version (must be 17+) java -version
Testing Commands
# Run common tests (shared code) ./gradlew :composeApp:commonTest # Run Android instrumented tests ./gradlew :composeApp:connectedDebugAndroidTest # Run iOS simulator tests ./gradlew :composeApp:iosSimulatorArm64Test # Get signing certificate SHA1 (for Firebase) ./gradlew :composeApp:signingReport
Code Architecture
Domain Layer (Business Logic)
// Species identification use case val result = identifySpeciesUseCase( imageData = capturedImage, category = SpeciesCategory.PLANT, isSubscribed = user.isPremium ) result.onSuccess { identification -> val confidence = identification.primaryMatch.getConfidencePercentage() // 85% val species = identification.primaryMatch.species val safety = species.edibility // EDIBLE, POISONOUS, etc. }
Trial Management
val trialState = trialManager.getTrialState() // TrialState(remainingIdentifications=3, isTrialExpired=false) if (trialManager.canIdentify()) { trialManager.useTrialIdentification(
优点
- 基于人工智能的准确识别
- 可食用性安全警告
- 跨平台可用性
- 提供免费和高级功能的商业模式
缺点
- 免费识别数量有限
- 设置需要 API 密钥
- 某些功能依赖于互联网
- 上传图像可能存在隐私问题
相关技能
免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。
版权归原作者所有 kelvincushman.
