Offline-First Retail Finance Dashboard for iOS
Storelytics is a production-focused iOS app for small retailers to manage day-to-day operations in one place: inventory, ledger, CRM, recurring expenses, and accounting books.
It is designed with an offline-first architecture using SwiftData, with Supabase sync for multi-user and multi-business collaboration.
Small stores often use separate apps/sheets for sales, stock, and accounting. Storelytics combines all of that into one mobile workflow with reliable local-first performance and cloud sync.
- Supabase Auth sign up / sign in / sign out
- Local session restore on app launch
- User profile editing (name + avatar)
- Cloudinary image upload for profile photos
- Create multiple businesses per user
- Business switcher in dashboard
- Business member management (owner/admin/staff)
- Add members by email
- Invite flow for users who are not registered yet
- Role-based access patterns with Supabase RLS
- SwiftData as primary local store
- Local writes first, then queued cloud sync
SyncQueuetracks create/update/delete operations- Background sync loop (interval + lifecycle-triggered sync)
- Push + pull sync for all scoped business entities
- Conflict handling based on
updated_atstyle timestamps
- Revenue/expense/profit overview
- 7-day revenue trend chart
- Week-over-week performance
- Low-stock and out-of-stock warnings
- Operational highlight cards
- Product CRUD (add/edit/delete)
- Numeric quantity input (no stepper-only pain)
- Cost price + selling price + stock quantity
- Low-stock threshold highlighting
- Inventory log generation on stock-affecting actions
- Sale and expense entries
- Sale details: product, quantity, unit price, discount %
- Customer linkage for sales
- Edit and delete ledger entries
- Stock rollback on deleted sales
- Inflow/outflow summaries by date groups
- Audit records for ledger edits/deletes
- Captures actor, before/after snapshots, reason
- In-app Audit History view
- Customer profiles (name/phone/email/notes)
- Loyalty points tracking and event history
- Purchase history per customer
- Digital receipt generation and status tracking
- Receipt sharing payload support
- Embedded Books tab inside Ledger (Ledger/Books segmented view)
- Trial Balance
- Profit & Loss
- Balance Sheet
- Auto-generated journal entries from transactions
- Double-entry logic:
- Sale: Dr Cash/AR, Cr Sales Revenue
- Optional COGS layer for product-linked sales
- Expense: Dr Expense Account, Cr Cash
- Backfill of missing journals for existing transactions
- Create recurring monthly rules (rent, salary, utilities, etc.)
- Configurable posting day (1–28)
- Active/pause recurring rules
Run Nowaction with user feedback- Automatic posting on app activity + sync cycle
- SwiftUI
- SwiftData
- Supabase (Auth + Postgres + RLS + RPC)
- Cloudinary (profile image upload)
- Charts (Apple Charts framework)
Storelytics/Core→ sync, auth, accounting, servicesStorelytics/Models→ SwiftData modelsStorelytics/Views→ feature screens (Dashboard, Ledger, Stock, CRM, Profile)- SQL migration files at repo root
profilesbusinessesbusiness_membersbusiness_invitesproductstransactionsinventory_logscustomersloyalty_eventsdigital_receiptsaccountsjournal_entriesjournal_linesledger_audit_logsrecurring_expenses- plus
auth.users(managed by Supabase)
- Clone repository
git clone https://github.com/rishishAryal/Storelytics.git
cd Storelytics