Skip to content

PatrykKaczmarek/Floofs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Floofs - exceptionally fluffy pets browser 🐾

Note

[flüf]. Noun. Definition: A pet with fluffy, cloudlike fur; the fur of an exceptionally fluffy pet

Authors

Tools & Services

Project Setup

Instalation

  1. Clone repository:
# over https:
git clone https://github.com/PatrykKaczmarek/Floofs.git
# or over SSH:
git clone [email protected]:PatrykKaczmarek/Floofs.git
  1. Go to {SRCROOT}/Floofs/App/ and duplicate AppConfig.sample.plist. Change its name to AppConfig.plist. Open it and use appropriate config values. Alternatively paste AppConfig.plist receivedby the author.

Important

AppConfig.plist is added to .gitignore so you won't accidentally push it to the repository.

Tip

You can obtain your own CatsAPIKey by signing up on the main site and getting one emailed to you for free.

  1. Open Floofs.xcodeproj file and build the project.

Coding guidelines

  • Respect Swift API Design Guidelines
  • The code must be readable and self-explanatory - full variable names, meaningful methods, etc.
  • Don't leave any commented-out code.

Technicalities

  • Separation of Concerns: API part has been divided into 3 parts: generic APILayer that is being used by DogsAPI and CatsAPI packages. It strongly separates API services' logic and, at the same time, removes a lot of repetitions. Additionally, it allows using open and public access control modifiers to distinguish interface visibility even more.
  • Extendability: using a generic-first approach, Cat and Dog models conform to Pet protocol, so the app can display type-erased models leveraging the same UI components. So maybe the user will see more floofs in the future? Who knows...
  • Repetitions Reduction: leveraging caching mechanism, the app can remember and restore data without the neccessity of retrieving them from the API again:
    • Model Caching - Cat and Dog models are unique across the app. It means, when they change, old models are replaced by new models so the newly fetched data is stored for later usage.
    • Image Caching - Kingfisher framework takes care of memory and disk caches to reduce network usage.
  • Data Transfer Reduction: - the app uses pagination to obtain cats' images in chunks, to fetch only data that will be visible to the user. Unfortunately DogsAPI does not support pagination.
  • Reliably Performant and Responsive: multithreading allows to keep the app responsive and performant even when scrolling fast through the images gallery.
  • Launch Prerequisites Validation: the app during launch time, checks whether the project has been setup according to this README. If AppConfig is missing, then displays the appropriate error message by redirecting the user to AppLaunchFailureScene.

Roadmap

  • Search: find your Floof faster 🏎️
  • Favorite images: mark images you like the most ⭐️
  • Home Screen Widget: display Floofs on your Springboard 📱
  • Dark mode support: see better your Floofs in dim light situations, particularly at night 🌙
  • Error handling: be informed when something goes wrong 5️⃣0️⃣0️⃣
  • Zoom view: magnify the image 🔎 and share it
  • Increase test coverage: never be surprised by 🐛🐛🐛
  • SwiftUI support: see Floofs app written in the brand new, shiny UI framework ✨
  • Documentation: read well documented interfaces 📕📗📘
  • Security: improve security by changing a way how AppConfig.plist is stored 🔐

Credentials

API

Icons created by logisstudio - Flaticon

About

Exceptionally fluffy pets browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages