💡 My vision for this project is centered around a simple yet powerful way to create a user-friendly app that helps you find the best restaurant near you based on location, radius, and number of stars. Additionally, users can see details, like opening hours, address, reviews, or photos for each restaurant found and give a review. The app allows users to search directly for a restaurant and enables them to give a review right away.
- Motivation
- Installation Guide
- Demo Videos
- Tools
- Frameworks
- Concepts
- Architecture
- Overview
- Domain
- Networking
- Places
- API Infra
- Persistence
- Location
- Presentation
- UI
- Main
- Adding caching by intercepting network requests (
Decorator Pattern
) - Adding fallback strategies when network requests fail (
Composite Pattern
) - Handling navigation (flat and hierarchical navigation)
- Adding caching by intercepting network requests (
- Testing Strategy
- CI/CD
- Security
- Metrics
- Credits
- References
The initial spark of this project originated from my desire to dive deeper into SwiftUI
since I had already been using the framework for testing purposes and was intrigued to use it in a larger project.
Once I had completed the UI, I challenged myself to design the app in the best possible way using all the best practices in order to create a high-quality, polished project and sharpen my skills. At the same time, my interest in TDD
and modular design were emerging, that's the reason I only used TDD
for all modules besides the UI, which I later used for snapshot tests. 😀
Through this process, I was able to significantly improve my TDD
skills and acknowledge its value. First of all, it helped me understand better what I was trying to achieve and have a clear picture of what I wanted to test first before writing production code. On the other hand, the architecture seemed to materialize while I was writing the tests, and by using TDD
, I could further improve the initial design.
You can find below the entire process I've gone through while designing this project, the decisions and trade-offs regarding the architecture, testing pyramid and security issues. Additionally, I've included some really cool metrics about the evolution of the codebase.
Thank you for reading and enjoy! 🚀
- Download
FoodybiteServer
locally - Follow the instructions to run it
- Go to Google Maps Platform to create a project
- Create the
API_KEY
following the Use API Keys with Places API documentation page (make sure you restrict your key to only be used withPlaces API
) - Create a property list called
GooglePlaces-Info.plist
in theFoodybitePlaces
framework - Add a row with
API_KEY
and the value of your key
- run the following command in the terminal to install
swiftlint
brew install swiftlint
Test that everything is wired up correctly by running tests for the FoodybiteAPIEndtoEndTests
and CI
targets to check the communication with both backends and validate that all tests pass.
- ✅ Xcode 14.2
- ✅ Swift 5.7
- ✅ SwiftUI
- ✅ Combine
- ✅ CoreData
- ✅ CoreLocation
- ✅ MVVM, Clean Architecture
- ✅ Modular Design
- ✅ SOLID Principles
- ✅ TDD, Unit Testing, Integration Testing, Snapshot Testing
- ✅ Composite, Decorator Patterns
- ✅ Domain-Driven Design
This beautiful design was made available by Yagnesh P for free here: Foodybite Design. You can also find him on dribbble.com: Yagnesh P. Thank you, Yagnesh. 🙏
- The iOS Lead Essential Program
- Clean Architecture by Robert C. Martin
- Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin
- Dependency Injection Principles, Practices, and Patterns by Mark Seemann and Steven van Deursen
- Domain-Driven Design: Tackling Complexity in the Heart of Software
- Design It! : Pragmatic Programmers: From Programmer to Software Architect by Michael Keeling