Skip to content

Files

Latest commit

author
Ryan Mitchell
Mar 15, 2015
55dd346 · Mar 15, 2015

History

History
35 lines (22 loc) · 1.83 KB

20150314.md

File metadata and controls

35 lines (22 loc) · 1.83 KB

What did you do yesterday?

Yesterday I

  • setup token generation and expiration management on the server side (heavily inspired by devise_token_auth)
  • experimented more with neo4j setup
  • added Recipe and FlavorProfile models (with tests), and experimented connecting these to existing models
  • added roles to the User class (admin?, registered?, visitor?), as well as a User::NullUser class for visitors
  • installed and began setting up Pundit. I only plan to return to this after the first MVP.
  • worked on expanding test suite, especially with thorough testing for token management
  • added automatically generated Swagger documentation for the API (see server/README.md)

What are you going to do today?

Yesterday I hoped to work on setting up the Grape API more, but I didn't get around to it.

My main goals today are to:

  • start adding API endpoints, and
  • flesh out the server-side models, especially Recipe and its properties and relationships.
  • Use the Neo4j DSL to write some basic "related to" queries based e.g. on common ingredients or tags.

As part of this, I need to learn:

  • how to use Neo4j::ActiveRel to represent relationships between Neo4j::ActiveNode.

What's in your way?

I keep having problems with Neo4j, since some parts of it are very different from ActiveRecord (and Mongoid, which takes over at least the ActiveRecord DSL). For instance, there are a lot of oddities with Neo4j node ids and finding, searching, etc. that took me about an hour to figure out why my test was failing.

I'm also having problems conceptualizing certain parts of the data modeling. Example:

A Recipe has Ingredients (this makes sense). You need some way to represent quantity here.

Should quantity be a property of the relationship (using ActiveRel)? If so, how do you handle the varying sorts of quantities (3 eggs vs. 2 cups of water vs 2 tsp salt)?