monica
monica copied to clipboard
Relationship Graphs
Imagine I Added person X, added person Y, added Child Z.... I'd love to be able to link there people together automatically as people
then have them displayed as as graph.
also, you cannot link existing people
Doesn't seem to actually link the people.. just added the text field?
This is the lowest hanging fruit in my opinion. Having this feature would do the most in making Monica a complete product, for me.
yes was very dissapointed that I could not have a significant other listed as a separate person instead of basically a note on the person.
The linking of contacts is now implemented and working, this issue should be (and remain?) only for the graph part :) Would also love to see this!
:D
Are you aware of a tool that would help me build those relationship graphs?
https://github.com/lazychaser/laravel-nestedset I'm not up to date with the PHP scene, but that looks pretty helpful! Maybe at least a good an example to work from.
Edit: Although, the above seems more suited for family relationships and not so great for work, friend networks. Maybe this? https://github.com/clue/graph
And if you wanna get really into it: https://en.wikipedia.org/wiki/Graph_theory
I guess it really depends on how your database is setup. Network graphs and d3.js seem like the things to google. http://bl.ocks.org/jose187/4733747
@djaiss The graph part of this interests me. I am willing to find the tool and build them. I just need some guidance on what we are looking for visually.
@turtles2 It's been a while since I've looked at this project, but I'd be willing to play around with the current ui for a few days and come up with a UI/UX mockup if any code contributors are interested. I can't remember what my line of thinking was in my last comment, but GraphQL comes to mind now. Wonder if that could make things easier.
@dancyfits imho GraphQL is unrelated with the relationship graph concept. GraphQL is an alternative to traditional REST APIs, and the work to implement it in Monica would take months and months.
@turtles2 @dancyfits before finding out how it should look like, we should define what it would do, considering the current structure of the relationships between contacts. Also I need to be convinced that we need this feature, because I'm not sure what it would bring 😀
@djaiss My interest in implementing this is due to the technical nature of it. I was hoping for guidance from you and others on what it should do precisely
@djaiss This type of problem is one of the main reasons GraphQL was built in the first place: https://dev-blog.apollodata.com/explaining-graphql-connections-c48b7c3d6976#de1c
GraphQL is not an alternative for REST APIs: http://graphql.org/blog/rest-api-graphql-wrapper/
Here's a video of a guy implementing GraphQL over Django, Rails, and Node in 30 minutes: https://www.youtube.com/watch?time_continue=900&v=UBGzsb2UkeY
Here's the GraphQL spec written for PHP: https://webonyx.github.io/graphql-php/
Here's a GraphQL wrapper for Laravel: https://github.com/rebing/graphql-laravel
I'd also like to be able to tag people into groups.. I have social circles.. like a workplace or hobby or group of friends.
@cybershambles That you can do. On a contact's page, "Edit tag" under their name. Tags will show up on the right of the contact list, clicking on one will filter the list to just the people with that tag.
Agree that GraphQL is not relevant to this issue -- it's a tool for building APIs, but this issue is about visualizing a graph.
I've used this front-end graph framework in the past, and it's pretty solid and well-maintained: http://js.cytoscape.org/
If Monica already has API endpoints to get all contacts and all relationships, then visualizing such a graph isn't a very large task. Do these endpoints exist?
Just visualizing the social graph is the MVP, but other neat feature could be:
- Dragging a line between people on the graph, then getting a small popup to select the relationship type. This'd be a fast way to enter relationships!
- The ability to filter nodes by tag, so you can view only people tagged with "family" for a family-tree-like view
Maybe this script will be somehow helpful in implementing a built-in feature: https://github.com/jmcker/monica2neo4j