Coder Social home page Coder Social logo

surveyapp's Introduction

SurveyApp

SurveyApp is a SwiftUI application designed to provide an interactive survey experience. Users can navigate through various survey questions, submit their answers, and receive immediate feedback. The app is built using the Composable Architecture to ensure a modular, testable, and maintainable codebase.

Table of Contents

Description

SurveyApp aims to provide a seamless and engaging survey experience. Users can:

  • Load and view multiple survey questions.
  • Submit answers and receive immediate feedback.
  • Navigate through questions easily.
  • Handle errors gracefully with informative banners.

Architecture

SurveyApp is built using the Composable Architecture (TCA), which promotes a clear separation of concerns and ensures the app is both scalable and maintainable. Key components include:

  • Views: SwiftUI views that render the user interface.
  • State: Centralized state management using TCA's Store and Reducer.
  • Actions: Define the events that can happen in the app.
  • Reducers: Pure functions that describe how the state should change in response to actions.
  • Effects: Asynchronous work, such as network requests, handled in a testable way.

Packages

SurveyApp integrates several packages to enhance its functionality:

Setup

To set up the project on your local machine, follow these steps:

  1. Clone the repository:

    git clone https://github.com/GabrielSilveiraa/SurveyApp.git
    cd SurveyApp
  2. Install dependencies: Open the project in Xcode and ensure that Swift Package Manager resolves all dependencies.

  3. Open the project: Open SurveyApp.xcodeproj in Xcode.

Running the App

To run the app:

  1. Select the target device or simulator in Xcode.
  2. Press Cmd + R or click the Run button in Xcode.

Tests

SurveyApp includes unit tests to ensure the reliability of the app's core functionality. The tests are written using Quick and Nimble in a behavior-driven development (BDD) style.

To run the tests:

  1. Select the SurveyApp target in Xcode.
  2. Press Cmd + U or go to Product > Test.

Snapshot Tests

In addition to unit tests, SurveyApp includes snapshot tests for SwiftUI views using the swiftui-preview-snapshots package. Snapshot tests help ensure the visual correctness of your views by comparing the current appearance of a view with a previously recorded snapshot.

To run the tests:

You will see that the snapshot tests are disabled due to some issues with the CI's runner version available (xcode and macos). I would have to invest more time to investigate the issue and fix it. So just change xit to it in the snapshot test file to be able to run it.

Demo

Here is a demo of SurveyApp in action:

SurveyApp Demo

Contributing

Contributions to SurveyApp are welcome. If you would like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes.
  4. Ensure all tests pass and add new tests if needed.
  5. Submit a pull request with a detailed description of your changes.

License

SurveyApp is released under the MIT License. See LICENSE for details.

surveyapp's People

Contributors

gabrielsilveiraa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.