GithubHelp home page GithubHelp logo

bookmarks's People

Contributors

cabe56 avatar fervarela28 avatar

Watchers

 avatar  avatar  avatar

Forkers

fervarela28

bookmarks's Issues

Authorize app to read user's Pocket items

Check out pocket_connect.py. Need to remove 'manual' step by redirecting user to pocket url and adding a redirect_uri to bring him back to our app.

  • Create route to receive user after pocket authorization (redirect_uri)
  • Send user to pocket url
  • Pass redirect uri to pocket request
  • Create user model (name, email, tokens required to access pocket data, etc)
  • Store access token in User model

User should see list of favorites from other users

After authorizing access to Pocket content, show list of items favorited by other users of the app.

  • Create route to show list of all bookmarks (show this view at /bookmarks)
  • Show only favorited bookmarks
  • Updated bookmarks should not be added again into db

Bookmarks should be paginated

There are too many of them even for small amount of users (I have ~2.5k).

  • Read up on how to paginate using App Engine (write findings in Wiki, useful so I can jump in quickly)
  • Add page numbers to /bookmarks view
  • Add page numbers to /users/ view
  • Implement pagination on routes that show bookmarks

Bookmarks should show users that have them

Should be able to see who has those bookmarks in their collection.

  • Create relation model for user and bookmark (many users may have the same bookmark)
  • Make a bookmark's users accesible through bookmark.users
  • Show emails on bookmark (should link to user page)
  • Separate bookmark view into partial (reuse this html in user's list of bookmarks so they look the same)
  • Exclude user's email from names shown if you are seeing bookmarks on his page

User should login/signup in the same page

  • Create input fields for email and password
  • Add a header (h3/h4 'home', 'bookmarks', etc)
  • Add button to submit form
  • Create user with inputs
  • Display error for invalid login
  • Pre-fill fields with inputs from submission on invalid login error
  • Redirect new user to pocket
  • Redirect successfully logged in user to /bookmarks
  • Redirect user with valid credentials (cookie) to /bookmarks

Check out sketch in milestone for guidance.

User page should show sorted bookmarks

Show user's favorited bookmarks first

  • Create function in Bookmark model: Bookmark.get_by_user(<user-from-cookie>)
  • Call function in user page route
  • Add index of user bookmarks sorted by favorite

Dev should be able to export bookmark dump file

To make it easier to test, we should be able to export Pocket bookmarks into a JSON file.

  • Avoid commiting dump to git
  • Add function to fetch all user bookmarks and record to file
  • Add function to load json dump

Organize code

  • Create users.py and insert validation and password encrypting functions.
  • Move User db model.
  • Move Sign up and Login logic into file.

Create Google Appengine project

  • Init project
  • Import modules worked on so far (pocket_connect.py, analyzer.py)
  • Create model to store user data
  • Create route to log in
  • Create route to receive user after Pocket use has been authorized

Retrieve user's Pocket items

After user has authorized access to pocket account, get all his pocket items and store in database.

  • Store items in model (remember: associate to user)
  • Paginate request for items (use API params count and offset)
  • Create cookie with user's key after request to Pocket is done
  • If user is on db, redirect directly to users page.
  • Create handler to show list of bookmarks
  • Create view (html/css) to see list of bookmarks
  • Update save_bookmarks function to only add new bookmarks (use API param since)
  • Redirect user to list of items once process ends

Task should handle fetching of user bookmarks

Can't wait for the process to be completed, delegate to task user can be redirected immediately.

  • Create route/handler for task to get bookmarks
  • Trigger task after saving access token on redirect from Pocket

Pocket authentication returns username or email

We need to save the user's email, do not get from pocket authorization since it may return a username.

  • Create home page view
  • Add input field to save email in form that POSTs to /users
  • Set user email attribute as unique to avoid repeated users
  • Save new user
  • Redirect user to Pocket auth page
    • Remember to pass /access as redirect uri
  • Redirect to /users/<new user key> when done getting pocket items

App should have navbar

  • Create reusable partial view
  • Add link to bookmarks page
  • Add link to 'my bookmarks' page

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.