---
# System prepended metadata

title: Original App Design Project - README Template

---

Original App Design Project - README Template
===

# Sportify

## Table of Contents
1. [Overview](#Overview)
3. [Product Spec](#Product-Spec)
4. [Wireframes](#Wireframes)
5. [Schema](#Schema)

## Overview
### Description
App that will provide info on teams, stats, and stadiums of different sports around the world.

### App Evaluation
[Evaluation of your app across the following attributes]
- **Category:** Sports
- **Mobile:** IOS App
- **Story:** Allows user to learn more and get updated with different sports teams and players around the world.
- **Market:** Anyone who enjoys sports would enjoy this app. Allows sports fans to stay up to date with sports information.
- **Habit:** User can use a search feature to look up their favorite teams. Tabs below will let users see different categories of sports and leagues.
- **Scope:** App will begin as more of a wiki of info but will expand to more daily stats.

## Product Spec

### 1. User Stories (Required and Optional)

**Required Must-have Stories**

* User can use search feature to look up your favorite team/player
* User will be able to favorite a team to see it on homefeed
* User can login
* User can create an account
* User can view stadium picture
* User can view team logo
* User can read description of team
* User can view team player is currently in
* User can read description of player

**Optional Nice-to-have Stories**

* User will get daily stats on favorite team
* User will be able to see social media of teams
* User will be able to see recent game highlights/youtube

### 2. Screen Archetypes

* Login Screen
   * User can login
   * User can create account
* Homefeed Screen
   * User can use search feature to look up your favorite team/player
   * User will be able to favorite a team to see it on homefeed
* Team Screen
   * User can view stadium picture
   * User can view team logo
   * User can read description of team
* Player Screen
    * User can view team player is currently in
    * User can read description of player
### 3. Navigation

**Tab Navigation** (Tab to Screen)

* Basketball League
* Soccer League
* Baseball League

**Flow Navigation** (Screen to Screen)

* Login Screen
   * Homefeed Screen
* Homefeed Search Screen
   * Team Screen
   * Player Screen
* Team Screen
   * Stadium Screen
   * Player Screen
* Player Screen
   * Team Screen
## Wireframes
<img src="https://i.imgur.com/Todoiiv.jpg" width=800><br>


### [BONUS] Digital Wireframes & Mockups

### [BONUS] Interactive Prototype

## Schema 
[This section will be completed in Unit 9]
### Models
Teams
| Property        | Type               | Description                  |
| -------------   | ------------------ | ---------------------------- |
| Team Name       | String             | Team Name                    |
| Team Logo       | Image              | Image of team logo           |
| Team Description| String             | Description of team          |
| Stadium Name    | Pointer to Stadium | Leads user to Stadium screen |

Stadium
| Property           | Type               | Description                  |
| ------------------ | ------------------ | ---------------------------- |
| Stadium Name       | String             | Name of Stadium              |
| Stadium Image      | Image              | Image of Stadium.            |
| Stadium Description| String             | Description of Stadium       |

Player
| Property           | Type               | Description                  |
| ------------------ | ------------------ | ---------------------------- |
| Player Name        | String             | Name of Player               |
| Player Image       | Image              | Image of Player              |
| Team Name          | Pointer to Team    | Leads user to Team screen    |
| Stadium Name       | Pointer to Stadium | Leads user to Stadium screen |
| Player Description | String             | Description of Player        |

### Networking
- Player Screen
    - (Read/GET) Query all player information by the player's name
     ``` swift
     let url = URL(string: "https://www.thesportsdb.com/api/v1/json/1/searchplayers.php?p=Danny%20Welbeck")!
    let request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: 10)
    let session = URLSession(configuration: .default, delegate: nil, delegateQueue: OperationQueue.main)
    let task = session.dataTask(with: request) { (data, response, error) in
         // This will run when the network request returns
         if let error = error {
                print(error.localizedDescription)
         } else if let data = data {
                let dataDictionary = try! JSONSerialization.jsonObject(with: data, options: []) as! [String: Any]
                print(dataDictionary)
         }
    }
    ```
- League Screen (bottom tab options)
    - (Read/GET) Query all teams from a single league... Example League: Premier League
    ``` swift
    let task = URLSession.shared.dataTask(with: URL(string: url)!, completionHandler: {data, response, error in
            guard let data = data, error == nil else{
                print("something went wrong")
                return
            }
            // have data
            var result: Response?
            do{
                result = try JSONDecoder().decode(Response.self, from: data)
            }
            catch{
                print("failed to connect \(error.localizedDescription)")
            }
            guard let json = result else {
                return
            }
            // Testing
            // print(json.teams[1].strTeam)
        })
        task.resume()

    ```
- Team Screen
    - (Read/GET) Query all team information by the team's name
     ``` swift
     let url = URL(string: "https://www.thesportsdb.com/api/v1/json/1/searchteams.php?t=Arsenal")!
        let request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: 10)
        let session = URLSession(configuration: .default, delegate: nil, delegateQueue: OperationQueue.main)
        let task = session.dataTask(with: request) { (data, response, error) in
             // This will run when the network request returns
             if let error = error {
                    print(error.localizedDescription)
             } else if let data = data {
                    let dataDictionary = try! JSONSerialization.jsonObject(with: data, options: []) as! [String: Any]
                 
                 print(dataDictionary)

             }
        }
        task.resume()
    ```
    ...

# Completed User Stories
  [x] Set up project
  
  [x] User can navigate different leagues using bottom tabs
  
  [x] User can create account
  
  [x] User can login
  
  [x] User can view all teams in a selected league
  
  [x] User can view team logo

# App Walkthrough GIF

![](https://i.imgur.com/DFyqdep.gif)


![](https://i.imgur.com/GK4x1Lb.gif)
<img src='https://i.imgur.com/GK4x1Lb.gif' title='Video Walkthrough' width='' alt='Video Walkthrough' /
     
>![](https://i.imgur.com/FHHbQ5Y.gif)
