Hello reviewers,
Welcome to my coding challenge project. Below, I will provide an overview of how to build and run the project, its architecture, configuration, validation methods, dependency injection, CI/CD setup, and optional features.
To get started with the project, follow these steps:
Install Ruby and Bundler:
Install Ruby:
After installing Ruby, install Bundler:
gem install bundler
Clone the repository to your local machine:
git clone <repository_url>
Navigate to the project directory:
cd MySurveyChallenge
Install dependencies:
bundle install
bundle exec pod install
Open the project in Xcode:
open MySurveyChallenge.xcworkspace
Build and run the project:
Run
button to build and run the project.By following these steps, you should be able to successfully checkout, install dependencies, and build the project on your local machine.
The project architecture is based on the principles outlined in this article. It follows a layered architecture pattern, adhering to the dependency rule of Clean Architecture. The layers include:
Regarding the Data layer, I consulted your company's Data layer at this repo and I really like it. It's really simple and looks pretty similar to what Moya did (Moya Target and Moya Provider). I've revised it a bit so it can work with the Combine API and use the Japx library to parse JSONAPI data. Forgive me if you are not satisfied with this issue.
For project configuration and secrets management, a simple xcconfig file is provided. While it's not recommended to store secrets in the repository, for the sake of convenience in this challenge, they are included. Ideally, secrets should be stored securely and shared internally within the team or injected during the build process.
OAuth authentication and token refreshing are implemented as per Alamofire's documentation. You can find the details here.
I've utilized Swinject for Dependency Injection, fostering loose coupling and enhancing testability.
An Azure Pipeline is set up for continuous integration and deployment. It automates build and deployment processes based on commits to specific branches (main, develop, release/*). While I've written similar pipelines for my company, it took some time to recall the specifics. Additionally, some Fastlane lanes are drafted but may need refinement.
Caching is implemented for the Surveys endpoint using the SurveyRepositoryWithCachingImpl
class.
I extend my gratitude to all reviewers for dedicating time to assess my coding challenge project. Thank you for your valuable feedback and consideration.