A mobile-first web app for tracking warehouse goods in and out using AI-powered document extraction.
- Create a new organization in Supabase (free tier allows 2 projects per org)
- Create a new project
- Note your project URL and anon key
npm install -g supabase
supabase link --project-ref YOUR_PROJECT_REF
supabase db pull # Downloads remote schemaCreate .env.local:
VITE_SUPABASE_URL=https://YOUR_PROJECT.supabase.co
VITE_SUPABASE_ANON_KEY=YOUR_ANON_KEY
supabase functions deploy extract-delivery-noteSet the OPENAI_API_KEY secret in Supabase dashboard:
supabase secrets set OPENAI_API_KEY=sk-...In Supabase dashboard → Storage, create a bucket named documents with public access disabled.
In Supabase dashboard → Auth:
- Create a test user (Email/Password)
- For production, configure your preferred auth method
npm install
npm run dev├── src/
│ ├── components/ # React components (Camera, Confirm, Log, Auth)
│ ├── lib/
│ │ ├── supabase.ts # Supabase client & functions
│ │ └── auth.ts # Auth helpers
│ ├── App.tsx # Main app flow
│ └── main.tsx
├── supabase/
│ ├── migrations/ # Database schema
│ ├── functions/
│ │ └── extract-delivery-note/ # Vision extraction function
│ └── config.toml
└── index.html
- Capture: User takes a photo of a delivery note
- Extract: Edge function calls OpenAI GPT-4V with the image
- Match: System searches for matching open "in" records by delivery/order number
- Confirm: User reviews extracted data and confirms/edits
- Save: Document and items are saved; if it's an "out", it's linked to matching "in"
- Mobile-first UI: Large buttons, camera integration, simple navigation
- Bi-lingual documents: Handles Onninen, Ahlsell, and other Finnish supplier formats
- In/Out matching: Automatic candidate matching with user confirmation
- Editable extraction: User can fix OCR/extraction errors before saving
- Document log: Recent in/out events displayed on home screen
- Multi-user roles and permissions
- Reporting and inventory dashboards
- CSV export
- Partial delivery handling
- Barcode scanning fallback