Skip to content

rishishAryal/Storelytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Storelytics

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.

Why This Project

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.

Core Features

Authentication & User Management

  • 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

Multi-Business & Team Access

  • 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

Offline-First Data + Sync

  • SwiftData as primary local store
  • Local writes first, then queued cloud sync
  • SyncQueue tracks create/update/delete operations
  • Background sync loop (interval + lifecycle-triggered sync)
  • Push + pull sync for all scoped business entities
  • Conflict handling based on updated_at style timestamps

Dashboard (Home)

  • Revenue/expense/profit overview
  • 7-day revenue trend chart
  • Week-over-week performance
  • Low-stock and out-of-stock warnings
  • Operational highlight cards

Stock Management

  • 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

Ledger

  • 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

Ledger Audit Trail

  • Audit records for ledger edits/deletes
  • Captures actor, before/after snapshots, reason
  • In-app Audit History view

CRM (Growth)

  • 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

Books & Accounting

  • 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

Auto-Ledger (Recurring Expenses)

  • Create recurring monthly rules (rent, salary, utilities, etc.)
  • Configurable posting day (1–28)
  • Active/pause recurring rules
  • Run Now action with user feedback
  • Automatic posting on app activity + sync cycle

Tech Stack

  • SwiftUI
  • SwiftData
  • Supabase (Auth + Postgres + RLS + RPC)
  • Cloudinary (profile image upload)
  • Charts (Apple Charts framework)

Project Structure

  • Storelytics/Core → sync, auth, accounting, services
  • Storelytics/Models → SwiftData models
  • Storelytics/Views → feature screens (Dashboard, Ledger, Stock, CRM, Profile)
  • SQL migration files at repo root

Supabase Tables Used

  • profiles
  • businesses
  • business_members
  • business_invites
  • products
  • transactions
  • inventory_logs
  • customers
  • loyalty_events
  • digital_receipts
  • accounts
  • journal_entries
  • journal_lines
  • ledger_audit_logs
  • recurring_expenses
  • plus auth.users (managed by Supabase)

Setup

  1. Clone repository
git clone https://github.com/rishishAryal/Storelytics.git
cd Storelytics

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors