share / share/sharedb

Improve documentation

Open
#294 4 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
6.5k
Forks
456
Avg merge
1d 5h
Merged PRs (30d)
5

Description

We should potentially improve our documentation around some of the slightly "fuzzier" aspects of ShareDB. Some things that have come up recently are:

  • Doc lifecycle - how to properly get, fetch, and destroy documents; should also point out gotchas like the fact that there's a caching layer on the connection, so if I do connection.get twice, I don't have two independent instances of Doc (eg if I wanted to subscribe on one, but just fetch on the other, it's non-obvious that these two documents are secretly the same thing); also you can't doc.destroy and then doc.fetch, etc.
  • authentication - there's a short mention of a plugin in the README, but it doesn't address some of the weirder cases, like trying to authenticate rich-text (which doesn't have a logical place to store metadata on the document itself). We should also point out that things like ops should be secured as well as documents (which can be a bit non-obvious when coming from a more "traditional" data store)

In general, I kind of think we've out-grown the README, and it might be nice to throw together some sort of HTML documentation, with code snippets, etc., but obviously that'll be quite a lot of work.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the README's existing authentication plugin section and the documentation around the Doc lifecycle, connection.get, fetch, destroy, and rich-text authentication. Define the documentation scope before choosing between an expanded README and HTML pages; done means the lifecycle, caching, authentication, and operation-security cases are explained with useful code snippets.

Written by the indexing model from the issue text.

Assessment

Domain
authentication, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.