๐ DetectKit
DetectKit is a lightweight, open-source mobile toolkit for image-based detection using any AI model. Built with React Native + Expo, it supports real-time image upload and response rendering from customizable backend APIs. Use it with zero-shot models like CLIP, object detectors like YOLO, or even your own ML pipelines.
๐ฑ Features
- ๐ธ Capture or upload image from mobile
- ๐ง Send to any backend for inference (REST API)
- ๐ Read out the response via device text-to-speech
- ๐งฉ Modular and backend-agnostic design
- ๐ Works in tunnel, LAN, or cloud environments
- ๐งช Built with React Native and Expo SDK
๐ธ Screenshots
Note: Add your screenshots to the screenshots directory
๐ง Backend API Contract
Your backend must expose the following endpoints:
GET /health - Health check endpoint
- Returns:
{ "status": "ok" }
POST /upload - Image upload endpoint
- Accepts:
multipart/form-data with a single field: file (the image)
- Returns JSON response in this format:
{
"confidence": number,
"message": string
}
๐ Project Structure
/
โโโ components/ # Reusable UI components
โโโ screens/ # Screen components
โโโ utils/ # Utility functions
โโโ assets/ # Static assets
โโโ config/ # Configuration files
โโโ screenshots/ # App screenshots
โโโ App.js # Main application entry
๐จ Branding
The app's branding can be easily customized by modifying the config/branding.js file:
export const BRANDING = {
title: 'Assistive AI',
subtitle: 'Take a picture or choose from gallery',
};
๐ Prerequisites
Before getting started, make sure you have the following installed:
You can verify your installations with:
node --version
pnpm --version
npx expo --version
๐ Environment Setup
Create a .env file in the root directory with the following variables:
# Required: Your backend API URL
EXPO_PUBLIC_API_URL=http://localhost:3000 # Replace with your actual API URL
Example values for different environments:
# Development
EXPO_PUBLIC_API_URL=http://localhost:3000
# Production
EXPO_PUBLIC_API_URL=https://api.yourdomain.com
# Using ngrok tunnel
EXPO_PUBLIC_API_URL=https://your-tunnel.ngrok.io
The app will use this URL to:
- Check server health at
${EXPO_PUBLIC_API_URL}/health
- Upload images at
${EXPO_PUBLIC_API_URL}/upload
๐ Quick Start
# 1. Clone the repo
git clone https://github.com/iAnisDev/detectkit.git
cd detectkit
# 2. Install dependencies using pnpm
pnpm install
# 3. Start the app
pnpm expo start
๐ฑ Development
Running the App
After starting the app, you'll see the Expo development server interface with the following options:
โบ Metro waiting on exp://192.168.1.5:8081
โบ Scan the QR code above with Expo Go (Android) or the Camera app (iOS)
โบ Web is waiting on http://localhost:8081
โบ Using Expo Go
โบ Press s โ switch to development build
โบ Press a โ open Android
โบ Press i โ open iOS simulator
โบ Press w โ open web
โบ Press j โ open debugger
โบ Press r โ reload app
โบ Press m โ toggle menu
โบ shift+m โ more tools
โบ Press o โ open project code in your editor
โบ Press ? โ show all commands
Mobile Setup
iOS
- Install Xcode from the Mac App Store
- Install Expo Go from the App Store
- Scan the QR code with your iPhone's camera app
Android
- Install Expo Go from the Play Store
- Scan the QR code with Expo Go app
Development Tools
| Command |
Description |
i |
Open iOS simulator (requires Xcode) |
a |
Open Android emulator (requires Android Studio) |
w |
Open web version |
r |
Reload the app |
j |
Open the debugger |
m |
Toggle the developer menu |
Troubleshooting
Common Issues
Port Already in Use
# Kill the process using port 8081
kill $(lsof -t -i:8081) 2>/dev/null || true
Watchman Warning
watchman watch-del '/path/to/project' ; watchman watch-project '/path/to/project'
Network Issues
- Ensure your mobile device and computer are on the same network
- Check if your firewall is blocking the connection
- Try using a different port with
expo start --port 19000
iOS Specific
- Ensure you're signed in to your Apple ID in Xcode
- Check if your device is trusted in Xcode
- Verify that the development team is selected in Xcode
Android Specific
- Ensure you have an emulator set up in Android Studio
- Check if USB debugging is enabled on your device
- Verify that the correct Android SDK is installed
๐ Community & Contributions
Have a feature request or model idea? Open a pull request or start a discussion!
๐ License
MIT License ยฉ 2024 [Anis]