pull down to refresh

Looking for collaborators to build a WordPress plugin that replace the native commenting system with an alternative that provide the same experience but powered by the NOSTR protocol notes. I try to put together some features
Requirements,
  • Access with existing public key npub or generate a new one
  • Leave a comment providing the user same Ui/UX
  • A reference/link to learn more about the protocol as per images attached
In details:
For the nostr key, you can generate as many of you need from any nostr client. You can find a list here https://www.nostr.net/#clients . Generate or Retrieve Nostr Public Key: For users who already have a Nostr public key (npub), the plugin will need a way to store and access this information. The plugin will also need to support generating a new public key for users who don't have one yet. . Plugin Setup and Configuration: Within the WordPress admin dashboard for setting up and configuring the Nostr integration and relays links if needed. The plugin will also need to provide a user-friendly interface within the WordPress front-end for any template. So it could use the theme-style to define a personalized experience on any website. Each user will be allowed to set up and configuring the Nostr integration. Admins will just need to activate the plugin, and if needed associate/create a npub with their wordpress-profile. This interface will include options to enter or generate the Nostr public key and other relevant settings. The website http://bolt.fun is a great reference. . Comments Replacement: The core functionality of the plugin will be to replace the native WordPress commenting system with the Nostr notes. When a user submits a comment, the plugin will use the Nostr protocol to create a new note and store it on the Nostr network. . Retrieving and Displaying Comments: To maintain the same Ui/UX as the native WordPress comments, the plugin will need to retrieve notes from the Nostr relays network and display them in a threaded format similar to traditional comments. The display template should closely match the appearance of the default WordPress comment template. . Handling User Identity and Authentication: Since Nostr operates on a decentralized protocol, handling user identity and authentication might differ from traditional WordPress comments. The plugin will need to ensure that users can sign their comments securely and maintain their identity consistently. In this case, we'd like to allow the existing users (if any) to connect the wordpres-site account with the nostr one. So ideally in the edit-profile page, will be an option/input to associate with it the nostr npub or link one of the existing browser extensions (http://getAlby.com, flamingo or nos2x). . Error Handling and Logging: Robust error handling and logging mechanisms should be in place to track and report any issues that may arise during the integration with Nostr. . Testing: Extensive testing, both on development and staging environments, will be necessary to identify and fix any bugs or issues before the plugin is deployed to production. . Documentation and Support: A detailed documentation guide should be provided to assist users in setting up and using the plugin effectively. Additionally, support channels should be established to address any user queries or concerns. . Optimization and Performance: The plugin's performance should be optimized to ensure it doesn't introduce significant overhead on the WordPress site.
Another useful reference are this repository for http://bolt.fun website, the code is open source so ideally you could be able to use it to build the plugin. You'll just need to find the code relative to the commenting- system in this repository - https://github.com/peakshift/makers.bolt.fun
Live example is accessible https://bolt.fun
Another useful reusable comment system https://github.com/fiatjaf/nocomment
A reference to learn about the protocol https://nostr.com/ and https://github.com/nostr-protocol/nostr
I have another fundamental question:
Can we not build wordpress on top of the nostr protocol?
Wordpress is complex, open source but centralized.
Nostr is a protocol.
Wordpress is a content management system. A CMS. Very powerful. But centralized! People can hack it. All your data is in one place. You need woocommerce and all to receive payments.
Nostr has payments in it already.
How does a CMS on top of the nostr protocol look like?
We already got notes on nostr. We got payments.
Can we build a CMS on top of this layer 2? Layer 1 is Bitcoin. Layer 2 lightning.
What is needed on layer 3 to make this happen? Can we build Decentralized wordpress on layer 3, on top of nostr?
I don’t want to change your post. I can ask this question somewhere else. But that is my thought.
If I already have a communication protocol, nostr, I would evolve that protocol to create pages, posts, menus, styling and hold that in a space. And that would be my new “decentralized” wordpress.
reply
Mate, this is a totally different project. You could open another post about it. I'm focus on replacing the comments for now, not building another CMS alternative.
This is just a small replacement of a single functionality. It will help people discover nostr and nostr to expand its usage/users. The private commenting system for Wordpress websites.
Around 810 million websites use WordPress as of 2023, you do the math. It's a great open source marketing platform.
An alternative for wordpress/Medium on nostralready exists... https://Habla.news you do not need to install anything, ready to use. check it out!
You can definitely build your own instance and connect it with your own relay (not sure the effort is worth to have just an online blog)
reply
Ok thanks. I will open another post on this. You are right about wordpress being THE CMS of the world.
reply
Updates I want to go to my comment and update it. Can I do that in nostr?
This is the mvp, the minimum viable product in my opinion. It is the first big sprint that proves the thing works.
This already is a lot of work.
After this you could go to another sprint like.
I see a post on wordpress. But I do not have an npub.
What happens now?
I see a link below post saying “comment by creating an npub).
This is a whole new world!!!
Now wordpress has to let me create a nostr npub by going to nostr and creating an npub.
Where is my private key? NOT on wordpress!
Then I have to log in back on that website.
And then when I get home on another computer I need to have my private key to log into damus. And see my note and comment I just created on that website.
reply
your private key is in the browser extension that you safely use to access nostr applications...
Again, wordpress does NOT need to store any data. It will actually store less data, as we are basically deactivating wordpress-comments to implement the nostr-solution
Does it make sense?
reply
Ok Imagine I am a wordpress site.
And you want to put a comment on my post.
The second comment. If I don’t store anything about you, how am I going to be able to let you update your comment, delete your comment, add a new comment? Below this comment?
To what user do I add those comments?
Don’t I need to know your pub key?
Where are those comments stored? Not in my database. But on nostr.
So if those comments are on nostr and I as a wordpress site am refreshing my page and pulling out all the html the code and showing the post.
Where do I get all those comments of you from?
Don’t I need to store at least your pubkey so I can go to the nostr and pull those comments you created yesterday so I can show them on this page?
This might be too technical and I might just not have it right.
But you have to describe it like this for devs to code it.
Or somebody has to think this through.
Because as a website I might have all the other comments of all the regular users and guest users in my database and all the comments related to them. So I can show these on this page.
But your comments with your pubkey I don’t have because you day I don’t store anything sbout you.
So how am I the website supposed to pull the comments out? If I don’t know anything?
Just look at this comment I posted here. The stacker.news website has my username and knows that I put this comment for this post. So stacker.news has to have my username in their database to be able to link this specific comment to this post. And they also have your username connected to this post.
Every time this page gets refreshed wgat is happening is all this data is being pulled from stacker.news database and is displayed.
reply
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?
reply
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 doable
reply
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