Example Proposal: Comments
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6.5k
- Forks
- 456
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 5
Description
I have an idea for a new example for ShareDB: Comments. This would be a simple interface that lets users add comments to a thread, similar to GitHub Issues.
The goal is to demonstrate how to do the following combination of things with ShareDB, which I have been struggling to do for some time now:
- Securely allow only certain queries, and deny all others (do not allow the client to execute arbitrary queries)
- Server-render the first query results
- Hydrate a Query client-side
- Ensure the query result set updates when a new comment is added or an existing comment is deleted
- Ensure each document in the query result set updates (e.g. when a comment is edited)
Would there be interest in adding such an example?
Related:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing examples/leaderboard/client/Leaderboard.jsx and the related issues #189 and #501, then compare the sharedb-server-query project. Define the example's server and client entry points from the requested behaviors. Done means a Comments example demonstrates restricted queries, server rendering, client hydration, and updates for added, deleted, and edited comments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- databases, full-stack
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100