Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClientLens

Platform Swift License: MIT Built with DesignFoundation

ClientLens is an open-source SwiftUI CRM app for iOS and macOS — a full-source, production-quality example of a small-business client/pipeline manager, universal across iPhone, iPad, and Mac, built from real, reusable components instead of throwaway demo code. It's a companion to AICompleteChat and BudgetLens, applying the same DesignFoundation / DesignFoundation Pro design system and on-device Apple Intelligence stack to a sales/CRM use case.

The entire Command Center / Pipeline / Contacts / Analytics shell comes from DesignFoundation Pro's CRM vertical (DFCRMRootView) — nothing hand-rolled — wired up with real SwiftData-backed clients and deals. An "AI Follow-Up" feature generates internal call-prep notes for any client entirely on-device via Apple's Foundation Models framework, no server round-trip, no API key.

Looking for a real-world SwiftUI CRM app template, a working sales pipeline SwiftData example, or a buildable reference for LanguageModelSession and @Generable structured output on iOS 26? This is a full app, not a snippet.

Built With

  • DesignFoundation — the free, open-source SwiftUI design system behind every button, text field, list row, and theme in this app.
  • DesignFoundation Pro — the premium SwiftUI CRM UI kit (DFCRMRootView and its Command Center / Pipeline / Contacts / Analytics screens) that ClientLens's entire shell is assembled from wholesale.
  • Apple Foundation Models — on-device Apple Intelligence for AI-drafted call-prep notes, via LanguageModelSession and @Generable.
  • SwiftData — local persistence for clients, deals, notes, and tasks.

Screenshots

iPhone

Command Center Pipeline Contacts
Command Center Pipeline Contacts
Analytics Add Client AI Follow-Up
Analytics Add Client AI Follow-Up

Mac

The same SwiftUI codebase, unmodified, running natively on macOS — DesignFoundation's cross-platform theming adapts DFCRMRootView's shell into a NavigationSplitView sidebar automatically, no #if os(macOS) needed in app code.

Command Center Pipeline
macOS Command Center macOS Pipeline
Contacts Analytics
macOS Contacts macOS Analytics

What it does

  • A full CRM shell built from a real design systemDFCRMRootView's Command Center (urgent deals, quota ring, due tasks, live activity), Pipeline (Kanban board by stage), Contacts (searchable, filterable roster), and Analytics (forecast, win-rate trend) — all fed real SwiftData-backed data instead of a hand-built layout, on both a tab bar (iPhone/iPad) and a NavigationSplitView sidebar (Mac).
  • On-device AI call-prep notes via LanguageModelSession and @Generable structured output (Apple Intelligence, iOS 26+ / macOS 26+) — pick a client, get a short internal summary and a suggested next step, generated locally and gracefully degrading to a clear error state on devices/OS versions without Apple Intelligence.
  • SwiftData persistence for clients, deals, notes, and follow-up tasks. Deliberately no CloudKit sync in this example — that's a natural production extension left out here to keep the demo reliably buildable and runnable in Simulator without iCloud container provisioning.
  • Add Client / Add Deal built from DesignFoundation's core components (DFTextField, DFPicker, DFDatePicker), surfaced via a floating "+" menu since DFCRMRootView is a self-contained shell that doesn't expose its own add-record hooks.

Requirements

  • iOS 18+ or macOS 15+ (the AI Follow-Up feature additionally requires iOS 26+ / macOS 26+ with Apple Intelligence enabled to actually generate on-device; the rest of the app works fully on the iOS 18 / macOS 15 baseline)

  • Xcode 26+

  • xcodegen (brew install xcodegen) — this repo has no committed .xcodeproj; regenerate it from project.yml

  • A DesignFoundationPro license. This is the one intentional gate: the source here is meant to be read and learned from by anyone, but it only actually builds for someone with access to DesignFoundationPro, since the entire shell is assembled from its CRM vertical rather than built from scratch.

    Without access, package resolution fails outright — you'll see something like this during xcodegen generate + build, or from Xcode's own package resolution:

    error: Failed to clone repository https://github.com/NerdSnipe-Inc/DesignFoundationPro.git:
        remote: Repository not found.
        fatal: repository 'https://github.com/NerdSnipe-Inc/DesignFoundationPro.git/' not found
    

    That's expected, not a bug in this repo: it means your GitHub account isn't on DesignFoundationPro's access list. Grab a license to fix it.

DesignFoundation (the free design-system core) is public and resolves automatically via Swift Package Manager.

Building

git clone https://github.com/NerdSnipe-Inc/ClientLens.git
cd ClientLens
xcodegen generate
open ClientLens.xcodeproj

Build and run the ClientLens scheme (iOS, on a simulator or device) or the ClientLensMac scheme (native macOS app). The app seeds a handful of sample clients and deals on first launch so the Command Center, Pipeline, Contacts, and Analytics screens have real data immediately, on either platform.

Architecture

ClientLens/
  ClientLensApp.swift        — SwiftData ModelContainer + sample-data seeding
  RootShell/
    RootShellView.swift      — wires SwiftData records into DFCRMRootView, adds the floating
                                "+" menu for actions the shell itself doesn't expose
  Models/
    ClientRecord.swift       — SwiftData model: name, title, company, status, priority
    DealRecord.swift         — SwiftData model: name, value, stage, expected close date
    NoteRecord.swift         — SwiftData model: note body + timestamp, linked to a client
    TaskRecord.swift         — SwiftData model: follow-up task
    SampleData.swift         — first-launch seed data
  Mapping/
    CRMDataMapper.swift      — pure conversion from SwiftData records to DesignFoundationPro's
                                CRM value types (CRMContact, CRMDeal, CRMQuota, …) — no
                                SwiftData/SwiftUI dependency, unit tested directly
    CurrencyFormat.swift
  AddSheet/                  — Add Client / Add Deal forms
  FollowUp/
    FollowUpEngine.swift     — LanguageModelSession + @Generable FollowUpDraft, iOS 26+
    FollowUpView.swift       — client picker, loading skeleton, generated notes card

The Command Center, Pipeline, Contacts, and Analytics screens all come straight from DesignFoundationPro's CRM vertical (DFCRMRootView and friends) — only the data mapping in CRMDataMapper and RootShellView is app-specific. See DesignFoundationPro's own docs for how that vertical is put together.

project.yml defines two application targets — ClientLens (iOS) and ClientLensMac (macOS) — that both build from the same ClientLens/ source folder. No platform-conditional code was needed beyond gating #if os(iOS) .keyboardType(.numberPad) on one numeric text field; DesignFoundation's theming and layout primitives (and DFCRMRootView's own adaptive shell) handle the rest of the cross-platform adaptation automatically, including swapping the iPhone/iPad tab bar for a NavigationSplitView sidebar on Mac.

Related Projects

  • DesignFoundation — the free SwiftUI design system this app (and its UI) is built on.
  • DesignFoundation Pro — the premium vertical UI kits (CRM, Analytics, AI Chat, E-commerce, and more) ClientLens's shell uses.
  • AICompleteChat — an on-device AI chat client example, built the same way.
  • BudgetLens — a universal iOS/macOS personal budget tracker example, built the same way.
  • ScanLens — a document scanning example app (in progress).
  • BookLens — a personal library/reading tracker example app (in progress).

License

MIT — see LICENSE. Note this only covers the code in this repo; DesignFoundationPro is licensed separately (see its own repo).


Keywords: SwiftUI CRM app, iOS and macOS client management app, small business CRM SwiftData, sales pipeline SwiftUI, on-device AI CRM, universal SwiftUI app, Apple Intelligence example, Foundation Models Swift example, LanguageModelSession @Generable, SwiftUI design system, cross-platform SwiftUI app iOS and macOS, open source iOS and macOS app example.

About

Full-source, production-quality SwiftUI CRM app for iOS — client pipeline, on-device AI follow-up drafting (Apple Intelligence Foundation Models), SwiftData, DesignFoundation/DesignFoundationPro UI. Requires a DesignFoundationPro license to build.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages