Meowtropolis is a SwiftUI + Firebase pet care app that combines everyday pet workflows in one place: authentication, pet profiles, grooming bookings, vet requests, marketplace browsing, cart and checkout, account management, map-based nearby search, and pet-friendly blog content.
This repository contains the iOS app source, test targets, Firebase data contract docs, and demo/validation artifacts.
- Sign up, log in, log out
- Password reset
- Session restore on app start
- User-friendly auth error handling
- Personal information update
- Profile image upload with optimization/compression
- Password change and account delete with reauthentication safeguards
- Local activity history with noise filtering for meaningful events
- Create, edit, list, and delete pet profiles
- Grooming booking flow
- Vet request flow
- Product listing and detail views
- Search and sort/filter controls
- Add-to-cart and cart quantity management
- Checkout flow with stock-safe order placement (no real payments)
- Cart recommendations and savings summary
- One-time Firestore auto-seeding from bundled product JSON when products collection is empty
- Built-in pet blog section with featured cards, list view, and detail pages
- Google Places-backed nearby place search flow (loading, empty, error, retry states)
- iOS: Swift, SwiftUI
- Backend: Firebase Authentication, Cloud Firestore
- Maps/Places: Google Maps SDK and Google Places SDK
- Testing: XCTest (unit + UI tests)
The project follows a clean layered structure:
- Models: Codable app/domain models
- Services: Firebase, maps, and data access logic
- State: Observable state orchestration and screen-level data flow
- Views: SwiftUI screens and reusable UI components
Design principle:
- Keep UI in Views, side effects in Services, and flow orchestration in State.
Meowtropolis/
Meowtropolis/
Assets.xcassets/
Firestore/
Models/
SampleData/
products.json
Services/
State/
Views/
Auth/
Common/
Main/
Shared/
MeowtropolisApp.swift
ContentView.swift
MeowtropolisTests/
MeowtropolisUITests/
FIRESTORE_STRUCTURE.md
docs/
- macOS with Xcode (latest stable recommended)
- iOS Simulator or physical iPhone
- Firebase project configured for Authentication + Firestore
- Google Maps/Places API key
- Clone this repository.
- Open Meowtropolis.xcodeproj in Xcode.
- Create/select a Firebase project.
- Enable:
- Authentication (Email/Password)
- Cloud Firestore
- Download GoogleService-Info.plist.
- Add it to the app target (Meowtropolis) in Xcode.
Current baseline rule in this repo allows authenticated users to read/write. Adjust rules for production hardening before release.
- Enable Google Maps SDK and Places API in Google Cloud.
- Add GOOGLE_MAPS_API_KEY to app configuration (Info.plist based setup used by MapsService).
- Build and run.
Primary Firestore collections:
- users
- pets
- bookings
- products
- orders
- vetRequests
Reference contract:
- FIRESTORE_STRUCTURE.md
Important product fields:
- id
- name
- price
- category
- imageURL
- stock (optional, defaults handled in model)
On first product fetch:
- App checks whether products collection is empty.
- If empty, app uploads bundled entries from SampleData/products.json.
- A local one-time seed flag prevents repeated uploads on the same installation.
This behavior is implemented in ProductSeedService and integrated into ProductService.
Use Xcode test runner for both targets:
- MeowtropolisTests
- MeowtropolisUITests
You can also run from command line on macOS:
xcodebuild test \
-project Meowtropolis.xcodeproj \
-scheme Meowtropolis \
-destination 'platform=iOS Simulator,name=iPhone 15'- Ensure user is still authenticated.
- Large images are automatically resized/compressed before save.
- If Firestore errors still occur, verify network and Firestore permissions.
- Open marketplace once while signed in to trigger one-time auto-seeding.
- If one manual product already exists, seeding is skipped by design.
- Confirm API key exists and required APIs are enabled.
- Confirm key restrictions allow your iOS bundle/app setup.
- Verify GoogleService-Info.plist belongs to the same Firebase project you are inspecting in console.
The repository includes both implementation and validation documents for MVP/demo readiness, including:
- integration signoff
- validation report
- checklist and demo script
- marketplace enhancement planning artifacts
See LICENSE for project license details.