pull down to refresh
0 sats \ 6 replies \ @Storyteller 5 Aug 2023 \ on: Let's build a plugin that replace WordPress Comments with Nostr notes nostr
You got a great plan!
I think that logging in to Wordpress with an npub is the first sprint you could take.
I would define your plan as sprints. Short agile steps you could take.
Why I think the first sprint would need to be logging in to wordpress as a user, is that once that is done, and you know you are logged in wordpress, you can pull all comments associated with this npub and this website and this post in.
I can imagine the highlevel data model is:
Nostr:
Npubs
Notes
Wordpress:
Websites
Posts
Comments
There is a link between notes and comments. A note can be a comment. But not all notes are comments on a worpress site. Only some!!
Relationships: between all these entities:
You got websites
Each website got one or more posts
Each post got zero or more comments
And on the Nostr side :
You got npubs
Each npub got 0 or more notes on nostr
What are the keys/relationships to make it work?
An npub can be logged in on 0 or more websites
And on each website can go to 0 or more posts
And on each post could have 0 or more comments.
Test cases
Once ready:
I got one npub
I got 10 website urls
I go to first website
I see a post I want to comment
I LOG in the website by clicking a link like (use npub to comment, below the post)
I’m in (I see my npub)
I create my first comment
On nostr that comment becomes a note
On nostr the link of website and the post url is somewhere put in a database
I log out of the website
I’m out.
I go to website 2. Do the same.
The next day the owner of website 1 DELETES the post. What happens now with my comments? This is an issue.
Because now I got a note on nostr without a parent post and post id (link) on some website. What happens now with that note on nostr? Does it need to be deleted?
Updates
I want to go to my comment and update it. Can I do that in nostr?
Yes correct somehow. The fact that we use
nostr
do not imply that we need to have a WordPress account. The user can access the comment section of that specific website now, on any page/post.it maybe could be a private group in Nostr? One private group for each link? Not sure... or maybe just a note thread in case. So the note will have as a main content the link to the article, and the user comment will be another note in response to that first note. If a new user respond, it will be responding to the note the first user wrote.
If a third user writes a new comment directly on the article/post it will generate again a main note with the link to the article + in response, the user comment. Make sense?
There's no need for the admin of the site to manage the comments, nor the spam.. Because no
wp_table
will be needed and the data will be in the relays the npub has already associated with.Regarding updates, will be probably not the first feature to build, nor the "delete comment"... but for a First beta I think it will be great to have the possibility to comment freely... maybe zapping too :)
however, will be interestingto see how the current solutions in
bolt.fun
and nocomment
are currently working + am not a dev so can not really guarantee 100% it's doablereply
deleted by author
reply
At a high level we need to create what is called an entity relationship model. Look it up on youtube.
That is the data model and relationships between the entities like npub, notes, posts, comments, websites, private keys.
We got at least two systems: nostr and wordpress.
But you need to create and entity relationship model and decribe the relationships first!
Then a php developper (wordpress) and a nostr developper (don’t know what programming lamguage nostr is coded in) can implement this ER model in a database!
The complexity might be: wordpress is a centralized database. Nostr is a decentralized one.
Focus on the MVP! This can work but needs to go step by step.
reply
however, will be interestingto see how the current solutions in bolt.fun and nocomment are currently working + am not a dev so can not really guarantee 100% it's doable
Appreciate all your feedback, ideas and structure, it make sense. I'd also like to hear a dev/engineer opinion
reply
Yep. I put my comments like that because I know Devs will ask you about these business rules and relationships before they start building.
You might need 2 devs. One who is specialized in the comments part of Wordpress. Maybe if you look at who built any comments plugin or improved it in Wordpress you could contact those devs.
Because they know that part of the code and they specialize in comments and they showed already they can do it.
And the other dev is the Nostr part. They need to understand nost maybe the system of I think they call it BIPS, the proposals of Nostr. Because probably someone needs to suggest adding some entities to nostr or maybe could use all the current features in nostr.
These both deva need to closely work together and integrate their code.
So I do not think you easily find one developer who knows both nostr and wordpress/comments.
Good luck.
reply
deleted by author