Skip to content

nickmaccarthy/Sir-Tips-A-Lot

Repository files navigation

Sir Tips-A-Lot πŸŽ©πŸ’°

Sir Tips-A-Lot Logo

A beautiful, smart tip calculator app for iOS built with SwiftUI β€” featuring receipt scanning, sentiment-based tipping, and location-aware bill history.

This is my first iOS application.

iOS Swift License

✨ Features

Core Calculator

  • πŸ’΅ Quick Tip Calculation β€” Enter your bill and instantly see the tip
  • πŸ“ˆ Round Up Tip β€” Round your tip to the nearest dollar
  • πŸ‘₯ Split the Bill β€” Divide among any number of people with per-person breakdown
  • πŸ“· Auto scan your check β€” Scan your check with your camera to auto populate ammounts and reccomended tip. Auto detects checks that already have gratuity added as well!

🎭 Sentiment-Based Tipping

  • Emoji Selection β€” Rate service with 😒 (Meh), 😐 (OK), or 🀩 (Great)
  • Customizable Percentages β€” Set your own tip percentages for each sentiment
  • Custom Emojis β€” Change the emojis to whatever you prefer

πŸ“Έ Receipt Scanning

  • Camera OCR β€” Scan your receipt to auto-populate the bill amount
  • Smart Detection β€” Automatically detects subtotal, total, and gratuity
  • Pre-included Gratuity β€” Recognizes when tip is already on the bill

πŸ“ Location Intelligence

  • Venue Auto-Detection β€” Saves restaurant name with your bills automatically
  • Privacy-First β€” Location data stays on your device, never shared
  • Optional β€” Full control to enable/disable in settings

πŸ“œ Bill History

  • Detailed Records β€” View past bills with tip, total, location, and sentiment
  • Editable Entries β€” Modify saved bills anytime
  • Notes Field β€” Add personal notes to remember the occasion
  • Lifetime Stats β€” Track your total tips and spending over time

🌍 Multi-Currency Support

  • USD, EUR, GBP, CAD, AUD, JPY, CHF, MXN, INR
  • Easy switching in Settings

🎨 Beautiful Design

  • πŸŒ™ Dark UI β€” Modern glassmorphism with animated gradients
  • ✨ Smooth Animations β€” Polished transitions and haptic feedback
  • πŸš€ Splash Screen β€” Branded launch experience

Screenshots

Main Screen Bill Splitting Bill History

Main Screen Bill Splitting Bill History
Emoji-based tip selection Per-person breakdown with notes Lifetime stats & detailed records

App Store Screenshots

Pre-sized screenshots for App Store submission are available in screenshots/appstore/:

Size Dimensions Device
6.7" 1290 Γ— 2796 iPhone 14/15 Pro Max
6.5" 1284 Γ— 2778 iPhone 14/15 Plus

Requirements

  • iOS 17.0+
  • Xcode 15.0+
  • Swift 5.9+

Installation

  1. Clone the repository:

    git clone https://github.com/nickmaccarthy/sir-tips-a-lot.git
  2. Open the project in Xcode:

    cd sir-tips-a-lot
    open "TipCal/Tip Calculator/Tip Calculator.xcodeproj"
  3. Build and run on your device or simulator

Project Structure

TipCal/Tip Calculator/Tip Calculator/
β”œβ”€β”€ Tip_CalculatorApp.swift           # App entry point with launch flow
β”œβ”€β”€ ContentView.swift                 # Main calculator UI
β”œβ”€β”€ TipCalculatorViewModel.swift      # MVVM ViewModel with business logic
β”œβ”€β”€ Models/
β”‚   β”œβ”€β”€ SavedBill.swift              # Bill history data model
β”‚   └── Currency.swift               # Multi-currency support
β”œβ”€β”€ Views/
β”‚   β”œβ”€β”€ SettingsView.swift           # Settings & preferences
β”‚   β”œβ”€β”€ ScannerView.swift            # Receipt scanning UI
β”‚   β”œβ”€β”€ VisionScannerView.swift      # Enhanced Vision scanner
β”‚   β”œβ”€β”€ EditBillView.swift           # Edit saved bills
β”‚   β”œβ”€β”€ SplashScreenView.swift       # Launch animation
β”‚   β”œβ”€β”€ LocationOnboardingView.swift # Location permission flow
β”‚   └── LocationPickerView.swift     # Manual location selection
β”œβ”€β”€ Services/
β”‚   β”œβ”€β”€ LocationManager.swift        # CoreLocation integration
β”‚   β”œβ”€β”€ StoreManager.swift           # In-app purchases
β”‚   └── TipProduct.swift             # Tip jar products
β”œβ”€β”€ Assets.xcassets/                 # Images and colors
└── scripts/
    └── increment_build.sh           # Auto-increment build number

Architecture

This app follows the MVVM (Model-View-ViewModel) pattern:

  • View (ContentView.swift, Views/) β€” SwiftUI views and UI components
  • ViewModel (TipCalculatorViewModel.swift) β€” Business logic, state management, location services
  • Model (Models/) β€” Data structures for bills, currency, and persistence

Customization

Tip Percentages

Customize tip percentages for each sentiment in Settings (tap the knight icon):

  • 😒 Meh Service β€” Default 15%
  • 😐 OK Service β€” Default 18%
  • 🀩 Great Service β€” Default 22%

Payment Links (Tip Jar)

To use your own payment links, update the variables in TipJarView within ContentView.swift:

let venmoUsername = "YourVenmoUsername"
let cashAppUsername = "$YourCashTag"
let paypalUsername = "YourPayPalUsername"

App Icon

Replace the images in Assets.xcassets/AppIcon.appiconset/ with your own 1024x1024 icon.

Running Tests

xcodebuild test \
  -project "TipCal/Tip Calculator/Tip Calculator.xcodeproj" \
  -scheme "Tip Calculator" \
  -destination 'platform=iOS Simulator,OS=latest,name=iPhone 17 Pro'

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Nick MacCarthy

Acknowledgments

  • Built with SwiftUI
  • Icons from SF Symbols
  • Receipt scanning powered by Apple Vision framework
  • Location services via CoreLocation

"They like big tips and they cannot lie" 🍸

About

Sir Tips-A-Lot is a Tip Calculator and Restaurant Bill Splitter written in Swift

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors