Modern, AI-powered inventory management built with React Native (Expo), TypeScript, and SQLite. This README is the single source of truth for setup, architecture, features, workflows, build, troubleshooting, and operational details.
- Overview
- Features (Product, POS, Suppliers, AI, Reports)
- Architecture & Directory Reference
- Data Model (SQLite schema)
- Services (database, AI, vector store, analytics cache, reports)
- App Screens & UX
- Environment & Configuration
- Development (run, debug, test-like checks)
- Build & Release (Expo/EAS, Android)
- Performance & Size Optimization
- Security & Privacy
- Troubleshooting & FAQ
- Maintenance & Contribution
InVo helps small businesses track products, sales, and suppliers, with AI-assisted insights and weekly reporting. It is offline-first and stores data locally using SQLite.
- Dashboard: KPIs, low/out-of-stock signals, quick actions
- Products: CRUD, unit, expiry, pricing, image URI
- POS (Explore): Cart, stock checks, sales posting, QR payment flow
- Suppliers: Directory, order builder, call/WhatsApp actions
- AI Chat: Gemini-backed insights using semantic context (RAG)
- Weekly Report: In-app generated PDF summary
- Settings: Business profile and QR payment image
- Real-time analytics: inventory metrics, sales performance, insights
- Interactive charts and customizable metrics
- Low stock alerts and out-of-stock tracking
- Complete lifecycle: add, edit, delete, track
- Image support, expiry dates, buying/selling price, units, stock levels
- Bulk operations and fast search/filter
- Cart with quantity controls and stock validation
- QR code payment flow, sales processing, basic receipt concept
- Tracks payment completion and updates inventory + sales
- AI insights, demand forecasting, stock optimization, alerts
- Profitability analysis and simple business intelligence
- Natural language queries powered by Gemini
- Supplier directory and contact details
- Order builder with chips/suggestions
- Call and WhatsApp actions
- Weekly report generation with charts and alerts (PDF via Expo)
- Sales analytics and inventory reports
- Business profile
- QR payment image configuration
app/: Screens via Expo Router (tabs + standalone screens)components/: Reusable UI (icons, charts, cards)services/: Core logic and data accessdatabase.ts: SQLite access, schema, CRUD, sales trackinggemini.ts: AI chat orchestration, RAG, prompt shapingvector-store.ts: Lightweight embeddings + semantic searchanalytics-cache.ts: Cached KPIs with TTLweekly-report.ts: PDF report generator (Expo Print/Sharing)
assets/: Images and fontsandroid/: Native Android config and build output (Gradle)
Key screens
app/(tabs)/dashboard.tsxβ metrics and quick actionsapp/(tabs)/products.tsxβ product managementapp/(tabs)/explore.tsxβ POS/cart and payment modalapp/supplier-order.tsxβ supplier order builder with searchapp/weekly-report.tsxβ weekly analyticsapp/ai-chat.tsxβ AI assistant (Gemini)
Main Tabs
- Dashboard β Overview of business metrics and quick actions
- Products β Product management interface
- Explore β POS and cart
- Settings β App configuration
Additional Screens
- AI Chat β Assistant for insights
- Suppliers β Management and orders
- Weekly Report β Analytics
- Onboarding β First-time setup
Tables are created automatically on first run.
products(id, name, buyingPrice, sellingPrice, quantity, unit, expiryDate, imageUri, addedDate)sales(id, productId, quantitySold, totalAmount, saleDate)suppliers(id, name, phoneNumber, whatsappNumber, email, addedDate)cart_items(id, name, qty, price)
Indexes
idx_products_nameonproducts(name)idx_products_addedDateonproducts(addedDate)
Migrations
unitcolumn auto-added when missing.DatabaseServiceincludes retries, health checks, and aresetDatabase()utility for schema mismatches.
- Database (
services/database.ts)- Robust init with retries; CRUD for products and suppliers
- Sales tracking (
recordSale, listing, daily totals) - Health + stats helpers, bulk insert, search
- AI (
services/gemini.ts)- Uses
EXPO_PUBLIC_GEMINI_API_KEY - Builds enhanced prompts with: semantic context, cached analytics, and sales
- Read-only assistant; includes backoff/retry for 503s and streaming simulation
- Uses
- Vector Store (
services/vector-store.ts)- Simple 128-dim embeddings persisted in
AsyncStorage - Regeneration on version change; cosine similarity search
- Simple 128-dim embeddings persisted in
- Analytics Cache (
services/analytics-cache.ts)- TTL-based cache for KPIs (products, stock, value, margins)
- Weekly Report (
services/weekly-report.ts)- Generates a polished PDF with metrics, charts, and alerts via Expo Print/Sharing
- POS safeguards inventory: prevents adding over stock, validates at payment, updates inventory and records sales, stores a daily summary in
AsyncStorage(@daily_sales_data)for dashboard. - Supplier Order includes a header search toggle and suggestion chips to quickly add items.
- Payment Modal supports a QR image from Settings; nice success animation and Done button.
Create .env with:
EXPO_PUBLIC_GEMINI_API_KEY=your_gemini_api_key
Other storage keys
@invo_settings: JSON withbusinessName,qrPaymentImageUri@daily_sales_data: array used by dashboard/analytics
Prerequisites
- Node 18+, npm
- Expo CLI
- Android Studio (emulator) or a device with Expo Go
Install & Run
npm install
npx expo start
Useful scripts
- Dev:
npx expo start -c(clean cache) - Android:
npm run android(if defined) or pressain Expo CLI
TypeScript & Lint
- TS config at
tsconfig.json; ESLint ateslint.config.js
Using EAS (recommended)
# Login once
eas login
# Configure
eas build:configure
# Production Android build (APK/AAB per eas.json)
eas build --platform android --profile production
Artifacts appear in the EAS dashboard. Native Gradle project is present under android/ for advanced configuration (ProGuard/R8 enabled by default in release).
Pre-built Applications
- Android APK: Download Latest APK
- iOS App: Coming soon
- Expo Go: Try in Expo Go
Direct Downloads
- Latest Release: Releases
- All Releases: All Downloads
- R8/ProGuard code shrinking and obfuscation for Android release
- Asset trimming and compression; avoid unused images
- UI rendering optimized with React hooks and memoization where needed
- Lightweight vector store and cached analytics to reduce DB load
- All business data is stored locally on-device (SQLite/AsyncStorage)
- No cloud dependency required for core features
- API key is public-scope (Expo) and used client-side for Gemini; treat accordingly
- App opens but data doesnβt appear
- Try clearing Metro cache:
npx expo start -c - Reinstall app to reset local DB
- Try clearing Metro cache:
- Database schema errors (e.g., missing columns)
- Call
dbService.resetDatabase()from a temporary button/handler in dev
- Call
- Gemini errors / overloaded
- Service retries with backoff; ensure
EXPO_PUBLIC_GEMINI_API_KEYis valid
- Service retries with backoff; ensure
- Android build too large
- Ensure release build with R8; remove unused assets
Branching
masteris stable; feature branches via PRs
Code Style
- TypeScript-first; clear variable names; shallow control flow; meaningful error logs
PR Checklist
- Focused changes, TS-safe, no linter errors, tested on device/emulator
License
- MIT (add a LICENSE file if distributing)
β
InVo β Effortless Inventory Mastery
Efficiency Gains
- Faster inventory ops, real-time insights, automated alerts, AI recommendations
Cost Savings
- Reduce waste via expiry tracking, optimize pricing, prevent overstocking
Growth Support
- Scalable architecture, advanced analytics, supplier management, professional reporting
We welcome contributions. Suggested flow:
- Fork repository
- Create feature branch
- Implement and test changes
- Open a pull request
- Expo Team
- React Native Community
- Google Gemini
- Open Source contributors
