Skip to content

Muyun2023/MetExplorer

Repository files navigation

Note: For privacy reasons, only partial code is displayed in this repository.

MetExplorer

MetExplorer is an iOS app that allows users to explore artwork from the Metropolitan Museum of Art (The Met) using their public REST API. Users can browse collections by department, view detailed artwork information, save favorite pieces, and organize their collections using custom tags.

📱 Features

  • Browse artworks by department using a NavigationStack interface
  • View detailed information for each artwork, including title, artist, culture,medium, and etc
  • Zoom in to view artwork images in full-screen mode with pinch gestures
  • Search and filter artworks by keywords,culture and medium
  • Mark artworks as favorites and organize them using custom tags
  • Create and manage custom tag categories stored locally using SwiftData
  • See your favorite collection in a dedicated My Collection tab
  • Search through your personal collection
  • Clean UI with error handling and user-friendly alerts

✅ Requirement Checklist

REST API

  • Uses URLSession to fetch data from The Met’s API
  • Decodes JSON into Swift model objects
  • Displays user-friendly messages when errors occur

NavigationStack

  • Department → ArtworkList → ArtworkDetail with NavigationStack
  • Titles reflect current content (e.g., department name as title)
  • Navigation behaves as expected (no glitches)

User Interaction

  • Searchable list (manual search bar used to workaround iOS 18.4 bug)
  • Filter artworks by medium or culture
  • Favorite artworks with one-tap tagging and removal
  • Tag management with real-time UI update
  • Full-screen zoomable image viewer for artwork

Data Storage (SwiftData)

  • Stores user’s favorites and custom tag categories locally
  • Reloads persisted data on launch

Tab Bar

  • TabView with “Find” and “Collection” sections
  • Clear labels and SF Symbols used

⚙️ Technical Details

  • Built using SwiftUI, Swift 6, and SwiftData
  • ViewModels use @Observable for Swift Concurrency compatibility
  • Async/await used exclusively for data fetching
  • Proper error messages shown using alerts and ContentUnavailableView
  • HTML in artwork titles is parsed and rendered using AttributedString

📁 Project Structure

MetExplorer/
├── Models/         // Artwork, Department, FavoriteItem, UserTag..
├── Views/          // DepartmentListView, ArtworkListView, CollectionView..
├── ViewModels/     // DepartmentViewModel, ArtworkListViewModel..
├── Networking/     // MetMuseumAPI, APIError
├── Resources/      // Assets, Preview Content

🚀 Run Instructions

  1. Open MetExplorer.xcodeproj in Xcode 16+
  2. Ensure the simulator is set to iOS 18.4 or higher
  3. Run the app on iPhone 16 simulator (recommended)

🧭 Planned Upgrades

  • My Collection: sorting, multi-tag filtering, visual tag indicators

  • Artwork sharing & export: PDF, social cards

  • Context enrichment: Wikipedia integration, ChatGPT AI-generated descriptions

  • Image pipeline: skeleton loading, caching, progressive loading

  • Accessibility: Dark Mode, Dynamic Type, VoiceOver support

  • System integration: WidgetKit, App Intents (Siri/Shortcuts), Core Spotlight

  • Collection insights: simple analytics with Swift Charts

  • Cross-device sync: iCloud / CloudKit for favorites and tags

  • Advanced features (optional): MapKit for artwork locations, ARKit for real-world previews, TipKit onboarding

    Code Stats

    Total Lines of Code

    2108

📸 App Screenshots


Department

Artwork List

Artwork Filter

Artwork Search

Artwork Information

Artwork Description

Artwork Image

Image Zoomable

Add to Collection

Custom Tag

My Collection Empty

My Collection

Tag Filter Artworks

Error View

Error View

App

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages