---
# System prepended metadata

title: WORDLE

---

# WORDLE

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

## Overview
### Description
Wordle gives players six chances to guess a five-letter word. They can try playing unlimited version or a daily version. Users can share their achivements on their profile, follow others and compete.

### App Evaluation
- **Category:** Game
- **Mobile:** This app would be primarily developed for mobile but would perhaps be just as viable on a computer, such as tinder or other similar apps. Functionality wouldn't be limited to mobile devices, however mobile version could potentially have more features.
- **Story:** Wordle is a simple word game that gives players six attempts to guess a five-letter word.
- **Market:** Any individual could choose to use this 
- **Habit:** This app could be used as often or unoften as the user wanted
- **Scope:** We would pair people for competitions. They could share the invite link or wait in the lobby.

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

**Required Must-have Stories**

* User logs in to access profile
* User can play the puzzle game that is a daily or unlimited version
* After each guess, the color of the tiles will change to show how close your guess was to the word.
* User can compete with others by sharing competition link or wating in the lobby
* Profile pages for each user

**Optional Nice-to-have Stories**

* User can see others board while competing
* User can see time spent on the puzzle

### 2. Screen Archetypes

* Login 
* Register - User signs up or logs into their account
* Profile Screen 
   * Allows user to upload a photo and fill in information that is interesting to them and others and share achivements
* Game Selection Screen.
   * Allows user to be able to choose their desired version of game.
* Puzzle Screen
   * The actual game screen
* Feed Screen
   * Shows posts of the people you follow

### 3. Navigation

**Tab Navigation** (Tab to Screen)

* Profile
* Game selection
* Feed

**Flow Navigation** (Screen to Screen)
* Forced Log-in -> Account creation if no log in is available
* Game Selection -> Jumps to puzzle screen or to competition screen
* Feed Profile Selection -> Jumps to profile of selected or searched user


## Wireframes
<img src="https://cdn.discordapp.com/attachments/937773583084691516/960417830782767204/IMG_7832.jpg" width=800><br>

### [BONUS] Digital Wireframes & Mockups
<img src="https://i.ibb.co/2tc00sy/Screenshot-2022-04-04-at-9-46-19-AM.png" width=800>



## Schema 
### Models
#### Post

   | Property      | Type     | Description |
   | ------------- | -------- | ------------|
   | objectId      | String   | unique id for the user post (default field) |
   | author        | Pointer to User| image author |
   | image         | File     | image that user posts |
   | caption       | String   | image caption by author |
   | likesCount    | Number   | number of likes for the post |
   | createdAt     | DateTime | date when post is created (default field) |
   | updatedAt     | DateTime | date when post is last updated (default field) |
   | words used    | String Array | words that user enters to guess the correct one |
   
### Networking
#### List of network requests by screen
   - Home Feed Screen
      - (Read/GET) Query all posts where user is author
         ```swift
         let query = PFQuery(className:"Post")
         query.whereKey("author", equalTo: currentUser)
         query.order(byDescending: "createdAt")
         query.findObjectsInBackground { (posts: [PFObject]?, error: Error?) in
            if let error = error { 
               print(error.localizedDescription)
            } else if let posts = posts {
               print("Successfully retrieved \(posts.count) posts.")
           // TODO: Do something with posts...
            }
         }
         ```
      - (Create/POST) Create a new like on a post
      - (Delete) Delete existing like
      - (Create/POST) Create a new comment on a post
      - (Delete) Delete existing comment
   - Create Post Screen
      - (Create/POST) Create a new post object
   - Profile Screen
      - (Read/GET) Query logged in user object
      - (Update/PUT) Update user profile image