selynung
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # BLENDR ## Table of Contents 1. [Overview](#Overview) 1. [Product Spec](#Product-Spec) 1. [Wireframes](#Wireframes) 2. [Schema](#Schema) 3. [Milestones](#Milestones) ## Overview ### Description Blendr is an app that allows a user to view a feed of nearby restaurants and favorite them. The favorited restaurants will be sorted in a list. This list can be filtered depending on the type of food the user is hungry for. Users may also see reviews of other users and chat with them and may potentially become a food Tinder app. ### App Evaluation - **Category:** Food - **Mobile:** The app would be developed for mobile users, but could potentially be used on a computer. - **Story:** Gives user a feed of restaurants in the area. Allows user to favorite restaurants and look at reviews of other users too. Users can choose to chat with other reviewers to gain more insight about a particular restaurant too. - **Market:** Any person could choose to use this app, especially those who have a difficult time deciding on where they/their group wants to eat. - **Habit:** This can be used as little or as often as somebody would like. - **Scope:** First we would start with allowing users to favorite restaurants, then it could evolve to a food-review app that allows reviewers to chat with each other. This app could have potential collaborations with UberEats in the future. ## Product Spec ### 1. User Stories (Required and Optional) **Required Must-have Stories** * User can register and log in. * User can see a list of restaurants and favorite restaurants. * User can see the list of restaurants favorited. * User can update their profile. **Optional Nice-to-have Stories** * User can leave a review. * User can add filter to restaurants. * User can chat with another person who left a review. * User can follow another user. * User can look at the map view for restaurants. ### 2. Screen Archetypes * Login/Register * User can register/login. * Restaurants Stream (Home Screen) * User can see a list of restaurants and favorite restaurants. * Favorites Stream (Favorite Tab) * User can see the list of restaurants favorited. * Profile * User can update their profile. Optional: * Detailed Restaurants Stream * User can see details of a particular restaurant. * Chat Screen * User can chat with another person who left a review. ### 3. Navigation **Tab Navigation** (Tab to Screen) * Home Tab * Favorites Tab * Profile Tab Optional: * Chat Tab * Settings Tab **Flow Navigation** (Screen to Screen) * Log-in -> Directs to Home Tab * Home Tab -> (Optional) Jumps to Detailed Restaurants. ## Wireframes ![](https://i.imgur.com/Z9kIbER.jpg) ### [BONUS] Digital Wireframes & Mockups ![](https://i.imgur.com/KNJrSWH.png) ### [BONUS] Interactive Prototype ![](https://i.imgur.com/qg8bApp.gif) ## Schema ### Models #### Restaurants | Property | Type | Description | | ------------- | -------- | ------------| | restaurantId | Number | unique id for the restaurant | | restName | String | the name of the restaurant being shown | | miles | Number | number of miles away the restaurant is from the user | | restImage | File | the image of the restaurant in the feed | | category | String | the category of the restaurant | #### Favorites | Property | Type | Description | | ------------- | -------- | ------------| | restaurantId | String | the name of the restaurant being shown | | user | Pointer to User | the person who favorited the restaurant | | favoritedOn | DateTime | date when a restaurant is favorited | | restImage | File | the image of the restaurant in the feed | #### Profile | Property | Type | Description | | ------------- | -------- | ------------| | user | Pointer to User | the person who is using the app | | profilePic | File | image that user picks as their account photo | | email | String | the email that the user uses to log in with | | joinedOn | DateTime | date when user makes their account | #### Reviews | Property | Type | Description | | ------------- | -------- | ------------| | reviewId | String | unique id for the review | | user | Pointer to User | the person who made the review | | caption | String | caption by the author | | rating | Number | rating given by user from a scale of 1-5 | ### Networking #### List of network requests by screen - Login Screen - (Read/GET) Allow user to login ```swift @IBAction func onLogin(_ sender: Any) { let username = usernameField.text! let password = passwordField.text! PFUser.logInWithUsername(inBackground: username, password: password) {(user, error) in if user != nil { print("Successfully logged in user.") self.performSegue(withIdentifier: "loginSegue", sender: nil) } else { print(error.localizedDescription) } } } ``` - Register Screen - (Create/POST) Register new user ```swift @IBAction func onRegister(_ sender: Any) { let user = PFUser() user.username = usernameField.text user.email = emailField.text user.password = passwordField.text user.SignUpInBackground { (success, error) in if success { print("Successfully registered user.") self.performSegue(withIdentifier: "loginSegue", sender: nil) } else { print(error.localizedDescription) } } } ``` - Home Feed Screen - (Read/GET) Query all posts where user views a list of restaurants ```swift let query = PFQuery(className:"Restaurant") query.findObjectsInBackground { (restaurants: [PFObject]?, error: Error?) in if let error = error { print(error.localizedDescription) } else if let restaurants = restaurants { print("Successfully retrieved \(restaurants.count) restaurants.") } } ``` - (Create/POST) Create a new like(favorite) on a restaurant. ```swift let restaurantArray = [NSDictionary]() @IBAction func onFavorite (_ sender: Any) { let favorite = PFObject(className: "Favorites") favorite["restaurantId"] = restaurantArray[indexPath.row]["restaurantId"] favorite["user"] = PFUser.current()! favorite["favoritedOn"] = Date() favorite["restImage"] = restaurantArray[indexPath.row]["restImage"] favorite.saveInBackground {(success, error) in if (success) { print("Successfully favorited restaurant.") } else { print(error.localizedDescription) } } ``` - Favorites Screen - (Read/GET) Query all restaurants user favorited ```swift let query = PFQuery(className:"Favorites") query.whereKey("user", equalTo: currentUser) query.order(byDescending: "favoritedAt") query.findObjectsInBackground { (favorites: [PFObject]?, error: Error?) in if let error = error { print(error.localizedDescription) } else if let favorites = favorites { print("Successfully retrieved \(favorites.count) favorites.") } } ``` - (Delete) Delete a favorited restaurant ```swift let restaurantArray = [NSDictionary]() @IBAction func onUnfavorite (_ sender: Any) { restaurant = restaurantArray[indexPath.row]["restaurantId"] let query = PFQuery(className: "Favorites") query.whereKey("user", equalTo: currentUser) query.whereKey("restaurantId", equalTo: restaurant) query.findObjectsInBackground { (favorite: [PFObject]?, error: Error?) in if let error = error { print(error.localizedDescription) } else if let favorite = favorite { favorite.deleteInBackground() print("Successfully deleted favorite.") } } } ``` - Profile Screen - (Read/GET) Query logged in user object ```swift let query = PFQuery(className:"Profile") query.whereKey("user", equalTo: currentUser) query.findObjectsInBackground { (user: [PFObject]?, error: Error?) in if let error = error { print(error.localizedDescription) } else if let user = user { print("Successfully retrieved user \(user).") } } ``` - (Update/PUT) Update user profile image ```swift let query = PFQuery(className:"Profile") query.getObjectInBackground(withId: PFUser.current()!) {(profile: PFObject?, error: Error?) in if let error = error { print(error.localizedDescription) } else if let profile = profile { let imageData = imageView.image!.pngData() profile["profilePic"] = PFFileObject(name: "image.png", data: imageData!) profile.saveInBackground() } } ``` #### [OPTIONAL:] Existing API Endpoints ##### Yelp API - Base URL - [https://api.yelp.com/v3](https://api.yelp.com/v3) HTTP Verb | Endpoint | Description ----------|----------|------------ `GET` | /businesses | gets all businesses/restaurants `GET` | /businesses/search?location=location | return businesses in the specific location ##### Google Maps API - Base URL - [https://maps.googleapis.com/maps/api/place/nearbysearch](https://maps.googleapis.com/maps/api/place/nearbysearch) HTTP Verb | Endpoint | Description ----------|----------|------------ `GET` | /json?types=restaurant | gets all nearby restaurants ## Milestones ### Milestone 1 #### User Stories - [x] User sees an app icon on the home screen and a styled launch screen - [x] User can register, login, and logout. - [x] User can see their credentials and add a profile picture on the profile screen. - [x] User sees a list of restaurants on the home screen. #### Other Features - [x] Setup Parse server - [x] Setup API #### App Walkthrough GIF <img src="https://i.imgur.com/cnXzDJc.gif" width=250><br> ### Milestone 2 #### User Stories - [x] User can see a detailed view when tapping on a restaurant. - [x] User can favorite a restaurant. - [x] User can see the list of restaurants they've favorited. - [x] User can add a review and see other reviews. - [x] User can see a map of where the restaurant is located. #### App Walkthrough GIF <img src="./blendr2.gif" width=250><br> ### Milestone 3 #### User Stories - [x] User gets an alert message when entering an incorrect password, creating account that already exists, or when there are empty fields. - [x] User can only favorite a restaurant once. - [x] User can see their profile picture saved. #### Other Features - [x] Setup/cleaned constraints. - [x] Cleaned code. #### App Walkthrough GIF <img src="./Blendr3.gif" width=250><br> ### Milestone 4 #### User Stories - [x] User can chat with other users on the app. - [x] User receives an error message when empty message is entered. - [x] User can remove a restaurant from their favorites. #### App Walkthrough GIF <img src="./blendr4.gif" width=250><br>

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully