Skip to content

baubrey91/LibraryAPI

Repository files navigation

LibraryAPI

First project using SwiftUI to get books from openlibrary.org

Features

  • Search for works
  • Authofill and suggestions in search
  • Show details
  • Chaching for offline mode

Search To Details

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-01-28.at.14.44.00.mp4

Autofill

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-01-28.at.14.44.20.mp4

Pagination

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-01-28.at.14.45.57.mp4

Error State

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-01-28.at.14.46.57.mp4

Localization

Image Cover Detail View
Simulator Screenshot - iPhone 16 Pro - 2025-01-29 at 07 15 58 Simulator Screenshot - iPhone 16 Pro - 2025-01-29 at 07 16 04

Data Persistence

  • Used simple HTTP Caching as it was simple to implement. Another option would have been CoreData of SwiftData but this seemed unnecessary as we are just read JSON from the server and not manipulating the data

Architecture

  • Used a simple MVVM as I think it goes well with SwiftUI and keeps all the business logic in the view models.

Testing

  • Added Unit tests to TechTestCore framework to check decoding
  • Added tests to check network calls, searching, etc. Basically wanted to test all viewModels business logic
  • Added one UI tests for a quick run through

Additional functionality added

  • Localization is set up (Separate Target added for testing)
  • Custom font added for description text
  • Custom flip view added (code for this is found online and sourced)
  • Moved Models into own framework incase it is needed for a different project (separate unit tests here for decoding)
  • Added autocomplete/ suggestions for searches

Style

Follows Rey Wenderlich style guide https://github.com/raywenderlich/swift-style-guide

Credited Work

Card flip taken from https://www.youtube.com/watch?v=v2Xf1gwcQSA

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published