Skip to content
/ CV Public

A showcase project, which fetches data and renders my CV. It is also my playground project, where I like to play with architecture, design patterns, and technics.

License

Notifications You must be signed in to change notification settings

gwikiera/CV

Repository files navigation

CV

Build Status Build Status codecov

Logo

A showcase project, which fetches data and renders my CV.
It is also my playground project, where I like to play with architecture, design patterns, and technics.

About The Project

AppPreview

A simple iOS app is written in Swift.

UI was created using the UIKit framework. SwiftUI is used only to enable previews of the views. New views will be created in SwiftUI.

The app is not built using only one architecture, but each view uses only one of them. Currently used architectures:

  • Clean Swift
  • MVVM

All the code is written in a testable way. Unit tests are written using XCText, Quick, and Nimble frameworks.

Bitrise and Travis CI are used for CI, Codecov for measuring code coverage.

SwiftLint is used for linting the Swift source code. It is added to the project as a build phase.

Getting Started

To run the project only Xcode is needed (version 13+). All the project dependencies will be fetched automatically by the Swift Package Manager.

Installation

  1. Clone the repo
    git clone https://github.com/gwikiera/CV.git
  2. Open the CV Xcode project
    cd CV
    open CV.xcodeproj

Technical description

Architecture

The app is not based on only one architecture. Different screens were built using different approaches. Currently used architectures:

Modularization

The app is modularized into many small modules using Swift Package Manager. Each module is standalone and designed to deliver specific functionality. Some modules have dependencies on other local or remote modules. Tests for modules are written in the dedicated test targets. The main advantages of using modularization are the ability to build each module in a separation, speed up the process of testing and previewing SwiftUI code, and the potential to extract some modules into separate repositories.

Dependency injection

Dependencies in the app were constructed using the pointfree.io style. Instead of using protocols to define abstraction, it uses structs initialized with closures for each dependency functionality, APIClient is an example. It allows tp define many static objects which creates live, mock or failing implementations of this struct, like in APIClientLive. Using vars allows to easily change one of the closures of failing implementation for tests purposes (those vars are not public so the client app or module cannot change them).

The app dependencies are grouped inside the AppEnvironment struct. It allows changing the app environment based on the passed launch arguments. Due to that, the project contains two schemas: live CV and CV-Mock, which operate on the hardcoded data.

Testing

The app target contains only CVUITest target because all of the testable code was moved to the modules. Testable modules are unit tested, code coverage level is passed to the codecov to visualize it. Unit tests are written using third party modules like Quick and Nimble, and also internal TestsHelpers module.

Snapshot testing

CV-UIKit target contains snapshot tests written using the swift-snapshot-testing framework. Tests can be found in the SnapshotTests.swift file, reference snapshots are stored in the SnapshotTests directory.

CI

For each PR and the main branches the project is built and tested by two separate providers: bitrise and [travis-ci]. All unit tests for all modules are triggered, and the code coverage report is attached to each PR.

License

Distributed under the Apache License. See LICENSE for more information.

About

A showcase project, which fetches data and renders my CV. It is also my playground project, where I like to play with architecture, design patterns, and technics.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published