Co-Pilot / 辅助式
更新于 24 days ago

n8ture-ai-app

Kkelvincushman
0.0k
kelvincushman/n8ture-ai-app
80
Agent 评分

💡 摘要

N8ture AI 应用程序使用人工智能从照片中识别野生动物、植物和真菌,提供安全性和可食用性信息。

🎯 适合人群

自然爱好者觅食者户外探险者植物学家学习生物的学生

🤖 AI 吐槽:看起来很能打,但别让配置把人劝退。

安全分析中风险

风险:Medium。建议检查:是否执行 shell/命令行指令;是否发起外网请求(SSRF/数据外发);API Key/Token 的获取、存储与泄露风险;文件读写范围与路径穿越风险。以最小权限运行,并在生产环境启用前审计代码与依赖。

🌿 N8ture AI App - Wildlife & Plant Identification


📋 Table of Contents


🎯 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

  1. Create a Firebase project at console.firebase.google.com
  2. Add Android app with package com.measify.kappmaker
  3. Add iOS app with bundle ID com.measify.kappmaker
  4. Download configuration files:
    • google-services.json → Place in composeApp/
    • GoogleService-Info.plist → Place in iosApp/iosApp/

4. RevenueCat Setup (Optional)

  1. Create account at revenuecat.com
  2. Configure products:
    • wildid_premium_monthly - $4.99/month
    • wildid_premium_annual - $39.99/year
  3. 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(
五维分析
清晰度8/10
创新性8/10
实用性9/10
完整性8/10
可维护性7/10
优缺点分析

优点

  • 基于人工智能的准确识别
  • 可食用性安全警告
  • 跨平台可用性
  • 提供免费和高级功能的商业模式

缺点

  • 免费识别数量有限
  • 设置需要 API 密钥
  • 某些功能依赖于互联网
  • 上传图像可能存在隐私问题

相关技能

pytorch

S
toolCode Lib / 代码库
92/ 100

“它是深度学习的瑞士军刀,但祝你好运能从47种安装方法里找到那个不会搞崩你系统的那一个。”

agno

S
toolCode Lib / 代码库
90/ 100

“它承诺成为智能体领域的Kubernetes,但得看开发者有没有耐心学习又一个编排层。”

nuxt-skills

S
toolCo-Pilot / 辅助式
90/ 100

“这本质上是一份组织良好的小抄,能把你的 AI 助手变成一只 Nuxt 框架的复读机。”

免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。

版权归原作者所有 kelvincushman.