GithubHelp home page GithubHelp logo

starwars's Introduction

Star Wars Planets Viewer

This project is a simple iOS app that fetches and displays information about planets from the Star Wars API swapi.dev. It allows users to view a list of planets, click on a planet to see its details, and even see sample images of each planet.

Table of Contents

Features

  • Fetches and displays a list of planets from the Star Wars API.
  • Allows users to click on a planet to see its details.
  • Displays Planet Name, Climate, Orbital Period, and Gravity information.
  • Displays sample images (optional feature).

Requirements

  • iOS 14.0+
  • Xcode 12.0+
  • Swift 5.3+

Installation

  1. Clone the repository:
git clone https://github.com/SahanNagoda/StarWars
  1. Open the project in Xcode:
cd StarWars
open StarWars.xcodeproj
  1. Build and run the project using the iOS Simulator or a physical device.

Usage

  1. Upon launching the app, you will see a list of planets from the Star Wars universe.

  2. Click on a planet to view its details, including Planet Name, Orbital Period, and Gravity.

  3. If available, a sample image of the planet is displayed (if time permits - see acknowledgments).

Project Structure

The project follows a structured directory layout to organize its components:

.
├── StarWars
│   ├── App
│   ├── Assets.xcassets
│   │   ├── AccentColor.colorset
│   │   └── AppIcon.appiconset
│   ├── Coordinators
│   ├── Helpers
│   ├── Models
│   ├── Preview Content
│   │   └── Preview Assets.xcassets
│   ├── Resource
│   ├── Services
│   │   ├── API
│   │   ├── Network
│   │   └── Providers
│   └── Views
│       ├── PlanetDetailView
│       │   └── CustomViews
│       └── PlanetsView
│           └── CustomViews
└── StarWars.xcodeproj

Design Decisions

  • The project uses SwiftUI for the user interface to provide a clean and maintainable codebase.
  • A ViewModel (PlanetsViewModel) is used to handle data fetching and processing. It also manages the loading state.
  • Navigation between the views is achieved using a coordinator pattern.

Dependencies

  • Alamofire: Used for networking tasks (optional feature).
  • Lottie: Used to display loading animations (optional feature).
  • Moya: Used for network requests.
  • Combine: Used for handling asynchronous operations.

Acknowledgments

  • Functional reactive programming (FRP) is encouraged in the project, and you can explore using Combine for handling asynchronous operations.
  • The project is designed with a focus on clean, maintainable code rather than a polished user interface. Further UI enhancements and optimizations can be made as needed.

Thank you for considering this project. If you have any questions or need further clarification, please feel free to reach out.

starwars's People

Contributors

sahannagoda 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.