We'd like to use this issue to capture how we can improve documentation.
From the discussion with @raymondfeng and @bajtos:
@loopback/openapi-v3 from docs, examples and CLI templates #5692Related: https://github.com/strongloop/loopback-next/issues/4717
@achrinza, would like to get your inputs on this. Thanks.
I think this is a great idea, and would possibly help users better find the information they're looking for. It'll also make the responsibilities of each LoopBack package clearer.
To add on, I think there's 2 main, overreaching user stories that we need the docs to cater towards:
I want to create an API using LoopBack 4
I want to use individual LoopBack 4 components (in an existing application)
So it may be a good idea to separate the docs as such.
To make it even clearer, the Overview page should show the users these 2 options and redirect them to the correct sections of the docs.
Both of these user stories want to reap some common benefits of LoopBack 4:
These separate docs may have an overlap of information, but they would cater more specifically towards their user story. For example, for the 2nd user story, the docs would be grouped based on the individual Node.js packages, with examples that can be used in isolation without the other LoopBack packages.
As another discussion point: I'm wondering if we should create a separate sidebar for the 2nd user story, as the current sidebar is quite cluttered as-is.
In the discussion with @raymondfeng and @bajtos, @raymondfeng also suggested to look in the different personas and different stage of the application development cycle (development, testing, deployment).
On that front, I was trying to capture the documentation pages that I might need to look up as a user when i'm trying to create my own app. Here is the working-in-progress version: https://github.com/dhmlau/learning-loopback/blob/master/loopback-for-beginners.md.
I agree that our current sidebar is already quite cluttered. I'm thinking whether it's better to have separate "user/developer guide", "deployment guide", etc, would be a good solution.
Thanks for the link @dhmlau, I'll feedback where possible.
Just throwing it into the discussion - I think it may help new users greatly if we can break down the docs by the lifecycle of a LoopBack application:
Right now, our docs are leaning heavily towards the "Developing" part of the lifecycle, and the rest (especially testing) are more of an afterthought.
By creating these well-defined sections in the docs, we can achieve 2 things:
These sections can be repeated for the package-specific docs too so that they can benefit from the same segmentation.
Quoting from https://github.com/strongloop/loopback-next/issues/5104#issuecomment-613371017:
I understand its a very difficult task to explain how works Authentication and Authorization with all these interfaces, providers, services, ... to implements.
If we can create an "Understanding" section, we can have an opportunity to tell users a story on the different core components of LoopBack 4 and their purpose, without needing to go into details of the implementation. Think of it like a low-altitude flight of these concepts.
This will allow users to build up their knowledge on the underlying fundamentals that LoopBack is built on top of.
Has anyone seen the documentation of rxjs? https://rxjs-dev.firebaseapp.com/guide/overview is beautiful I think loopback is a beautiful framework but it fails in the documentation, and i never saw something like this before https://rxjs-dev.firebaseapp.com/operator-decision-tree so cool
If we can create an "Understanding" section, we can have an opportunity to tell users a story on the different core components of LoopBack 4 and their purpose, without needing to go into details of the implementation. Think of it like a low-altitude flight of these concepts.
@achrinza, Your comment is spot on! I think the separation of "how to use it" and "let me explain how it works" is important.
@mdbetancourt, thanks for the link. Let me take a closer look. I like the API list: https://rxjs-dev.firebaseapp.com/api. :)
Not too sure if it's out-of-scope, but I think it's worth mentioning for reference (since we're doing a rather major docs refactoring):
We may benefit from redesigning the architecture from Jekyll to Gatsby.js.
Here's why:
There's some downsides that I can see:
@achrinza
I just wanted to recommend that, that type of documentation is also easier to navigate and you can even install it as an app and have it without internet access.
On my part i recommend:
Great discussion 馃憦
Let me add few more thoughts.
To add on, I think there's 2 main, overreaching user stories that we need the docs to cater towards:
- I want to create an API using LoopBack 4
- I want to use individual LoopBack 4 components (in an existing application)
As part of thinking about these two stories, I think it's important to identify different ways how developers are going to discover LoopBack packages and features.
For the first story, the user is already interested in LoopBack 4, so I would expect they start looking in our documentation.
For the second story, many users won't be aware of LoopBack at all, they will be searching the internet (perhaps npmjs.org) for a solution to their problem. Quite often, they will not care if a package like @loopback/http-server is a part of a larger framework, all they are looking for is docs showing how to solve their specific problem.
I think we should create a new _microsite_ for each package that's intended to be used outside of LoopBack. When I say _microsite_, I don't necessarily mean a full web site like https://loopback.io. A _microsite_ can have different forms, depending on how much docs we need to write.
For small packages like @loopback/http-server and @loopback/testlab, it's probably best to put all documentation into the main README file. This way the documentation is mirrored at npmjs.org, which makes it very easy & fast for potential users to assess what features the package offers and how easy the API is to use. The README is the _microsite_.
For larger packages, especially @loopback/context, we can create a new section (a new sidebar) on our main documentation site. IMO, there should be a dedicated sidebar for each package. This dedicated section of our docs is the _microsite_. The README file of a package with a dedicated docs microsite can be much shorter - provide enough teasers to make readers interested and then point them to loobpack.io docs to learn more.
This is pretty much the same as what @achrinza wrote:
As another discussion point: I'm wondering if we should create a separate sidebar for the 2nd user story, as the current sidebar is quite cluttered as-is.
We may benefit from redesigning the architecture from Jekyll to Gatsby.js.
Regarding switching from Jekyll to something else: we have already explored migration to VuePress in the past - see https://github.com/strongloop/v4.loopback.io/pull/45, but decided to keep using Jekyll.
I am often frustrated by Jekyll's long build times, it would be great to find a faster tool. It would be even better if the tool was able to source the doc files from different GitHub repositories and the npmjs.org registry, so that we don't have to run a CI/CD job to unpack every new version of @loopback/docs and commit it to loopback.io git history.
Having said that, such change looks like a non-trivial project to me, I don't know if it is the right task to spend our precious time now 馃し
In the past days, I was thinking quite a bit about our documentation and opened two issues to discuss how to overhaul our documentation structure for better, to give it an overarching vision and a strategy to follow.
Please let me know what you think!
In my opinion, the documentation problem is caused by what our user think LoopBack is, and what it actually is. My take on it - https://github.com/strongloop/loopback-next/issues/5551.
FYI - there are 3 more suggestions from community in #5759 #5760 #5761
Closing as done with the Q3 scope.
Most helpful comment
Not too sure if it's out-of-scope, but I think it's worth mentioning for reference (since we're doing a rather major docs refactoring):
We may benefit from redesigning the architecture from Jekyll to Gatsby.js.
Here's why:
There's some downsides that I can see: