Skip to content

Instantly share code, notes, and snippets.

@JuanSierra
Last active August 15, 2017 01:19
Show Gist options
  • Save JuanSierra/e9355131844a09716bc918b6edcc8dc7 to your computer and use it in GitHub Desktop.
Save JuanSierra/e9355131844a09716bc918b6edcc8dc7 to your computer and use it in GitHub Desktop.

Cloud Fluffy Hamster

Features

  • Enter application

    1. User types his name
    2. Ham looks for the user
      1. If User exists Ham returns recent activities
      2. If User DOESN'T exist Ham returns a notification
  • Check recent Facts

    1. User enters the application
    2. Ham shows the last ten Facts
  • Create Category

    1. User press "New Category" button
    2. Ham shows input to set a name
    3. User types a name and accepts or cancel the process
    4. Ham validates non existent categories with that name and store it on DB
    5. Ham notifies the user a new Activity was created
  • Start a log Fact

    1. User could select a Category
    2. User selects an Activity and writes a description and presses "Start Fact" button
    3. Ham creates a new Fact with the current time
    4. Ham notifies the user a new Fact was started
  • Stop a log Fact

    1. User presses stop button
    2. Ham updates the end time and finishes current activity
    3. Ham notifies the user the current Fact was ended
  • Show current Fact

    1. Ham shows current activity's name

Entities

  • Category

    • Name
  • Activity

    • Name
    • Category
    • Deleted
  • Tag

    • Name
  • Fact

    • Activity
    • Start
    • End
    • Description
    • Tags
  • User

    • Name
    • Facts

API

Route HTTP Verb Description
/api/categories GET Get all categories
/api/categories POST Create a category
/api/categories/:category_name DELETE Delete a category
/api/activities GET Get all activities
/api/activities POST Create an activity
/api/activities/:activity_id GET Get a single activity
/api/tags GET Get all tags
/api/tags POST Create a tag
/api/facts GET Get all facts
/api/facts POST Create a fact
/api/fact/:fact_id GET Get a single fact
/api/fact/:fact_id PUT Update a single fact
/api/user/fact/ GET Get current fact
/api/user/facts/ GET Get last 10 facts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment