Skip to content

Instantly share code, notes, and snippets.

@coreyfloyd
Created August 16, 2012 09:55
Show Gist options
  • Save coreyfloyd/3369006 to your computer and use it in GitHub Desktop.
Save coreyfloyd/3369006 to your computer and use it in GitHub Desktop.
LIOLI spec

#Summary This app is used to sign in to their loseitorloseit.com account and post weigh ins to a remote API. Data will be formatted as JSON. Only the user's credentials will be persited locally. All other data will be fetched from the API as needed.

###Sign In Users can sign in, but cannot create accounts.

###Pending Weigh In Users are required to post periodic weigh ins. The app will let the user know if they have a pending weigh in or not.

###Weigh Ins Weigh ins consist of a weight, an image and a comment. Users can only post weigh ins, they cannot view existing weigh ins.

###Weigh In Response Depending on the response from the API, the app will display a success/failure response for the weigh in or a success/failure response for the whole program.

###Other About view, Support view.

#Implementation

###Version Control Github - https://github.com/FlyingJalapeno/LIOLI

###Project Management Trello - https://trello.com/board/lioli/50213904a0ae50e4706b82cd

###Libraries Networking: AFNetworking - https://github.com/AFNetworking/AFNetworking/
JSON: JSONKit - https://github.com/johnezang/JSONKit/

##UX Mockup https://www.fluidui.com/editor/live/preview/p_MusI7n3stb6e0QUIt3RA51uTTpMPTl7e.1344863922314

#Authentication

  • Use HTTP Basic authentication (username/password) to authenticate the user while checking the pending weigh in API

#API Methods

Pending Weigh In

  • checks if user has a weigh in due
  • arguments: auth token
  • response: success (bool), weightTarget (float), dollarsAtStake (float)

Post Weigh In

  • submits a weigh in and receives result message info
  • arguments: weight (float), image (data), comment (string)
  • response: title (string), message(string)

#Launch Flow

  • on launch, verify auth
    • if auth failed, show LoginViewController
    • if auth succeeds, call Pending Weigh In API
      • if no pending weigh in, show NoPendingWeighInViewController
      • if pending weigh in, show PendingWeighInViewController

#Views

LoginViewController

  • login only, no account creation
  • textfields for username and password
  • login button
  • no validation needed
  • link to sign up URL in external browser
  • on successful login, persist auth token in user defaults

NoPendingWeighInViewController

  • static content

PendingWeighInViewController

  • textview with templated message, insert values for weight target and dollars at stake
  • button pushes WeighInViewController

WeighInViewController

  • image preview
    • "Add Photo" if no photo
      • action sheet: Take Photo, Choose From Library, Cancel
    • photo thumbnail if photo
    • required
  • textfield for weight
    • numbers only keyboard
    • validate numbers only (in case of copy)
    • required
  • multiline textfield for comment
    • optional
  • presenting keyboard will resize view and scroll focused textfield into view

WeighInResultViewController

  • textfield for header, set from API
  • multiline textfield for message, set from API
  • image???

logout?

  • delete auth token from user defaults
  • kill current view, show login view

#Unknowns

  • logout
  • rotate/crop
  • support & about not in fluidui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment