v6-docs
v6-docs copied to clipboard
New structure proposal
Hey there! ππ»
As discussed internally with the core team, I want to revamp how the documentation is structured.
I mainly took example on an internal proposal I made for AdonisJS 3 documentation, current AdonisJS 4 and 5 documentation and Laravel documentation.
The end goal is to have something simple for newcomers to go through, and even for recurring users without loosing any content. I believe we split a bit too much some information across many pages, so I merged a few sections together (like we had in AdonisJS 5 documentation)
A complete structure can be found at the end of this message.
On a side note, this structure has been made during a live stream in front of ~100 people. They also gave feedback and thought to build this new structure.
This proposal will go through each section, point by point, explaining its content and its goal.
Legend:
(From: *)- If the name has been changed, this will contain the old name OR it help to distinguish the content if we have the same name multiple time(+ *)- We are merging content(New)- New content we have to write(~New)- New content we have to gather from other pages(PR)- New content with a PR(Previously: *)- Proposal for a rename(?)- Not sure if needed here
Preface
βββ Introduction (From: Getting Started - Introduction)
βββ FAQ
βββ Governance
βββ Release Notes
βββ Contribution Guide
This section is ordered in a logical way.
The goal of this section is to provide all "meta" information about the framework. Its philosophy, faq, governance status, etc.
Getting Started
βββ Installation (From: Getting Started - Installation)
βββ Configuration
βββ Environment Variables
βββ Folder Structure
βββ Deployment (From: AdonisJS 4 - Deployment)
This section is ordered in a logical way.
The goal of this section is to have a Zero to Production information for a minimum setup. I believe all sub-sections are needed to have a minimum understanding of all the defaults boilerplate.
AdonisJS Concepts
βββ Application
βββ Application Lifecycle
βββ Config Providers
βββ RC Files
βββ Service Container
βββ Scaffolding
This section is ordered by alphabetical order.
The goal of this section is to explain concepts linked to AdonisJS and how we structured our and the application code.
Architecture Concepts
βββ Async Local Storage
βββ Dependency Injection (Previously: IoC Container )
βββ HMR (PR)
βββ Http Context
βββ Request Lifecycle (From: HTTP - Introduction)
βββ Service Providers
This section is ordered by alphabetical order.
The goal of this section is to explain common architectural concepts we may found in other frameworks.
Basics
βββ Routing (+ URL Building)
βββ Controllers
βββ Middleware
βββ Requests (+ BodyParser middleware)
βββ Response
βββ Validation
βββ File Upload
βββ Session
βββ Cookies
βββ Exception Handling
βββ Static Assets (Assets bundling + Static server)
This section is ordered in a logical way.
The goal of this section is to contain anything relative for building simple project. Nearly all of those features are needed for a standard SSR application.
Database
βββ Introduction (~New - From: SQL and ORMs)
βββ Lucid ORM (~New - From: SQL and ORMs)
βββ Redis
This section is ordered in a logical way.
The goal of this section is to contain anything related to database you may want to use with AdonisJS. In the feature, we may add Kysely or Prisma there for example.
Authentication
βββ Introduction (From: Authentication - Introduction)
βββ User Providers (+ Verifying user credentials)
βββ Auth Guards (+ all the guards doc)
βββ Social Authentication
This section is ordered in a logical way.
Another proposal for this section would be to keep all the auth guard separated:
βββ Session Guard
βββ Access Token Guard
βββ Basic Auth Guard
βββ Custom Auth Guard
The goal of this section is to contain anything related to authentication.
Security
βββ Introduction (New)
βββ Authorization
βββ Encryption
βββ Hashing
βββ Signed URLs (?)
βββ Web Security (+ CORS + Securing SSR apps)
βββ Rate Limiting
This section is ordered in a logical way.
The goal of this section is to contain anything related to securing an application.
Views & Templates
βββ Introduction (~New - From: HTTP - Views and Templates)
βββ EdgeJS (~New - From: HTTP - Views and Templates)
βββ InertiaJS (From: Experimental - InertiaJS)
This section is ordered in a logical way.
The goal of this section is to contain anything related to views and templates. We may add TSX or KitaJS in the future in this section.
Testing
βββ Introduction
βββ Http Tests
βββ Browser Tests
βββ Console Tests
βββ Database
βββ Mocks & Fakes
This section is ordered in a logical way.
The goal of this section is to contain anything related to testing. No real change from what we have right now.
Digging Deeper
βββ Ace Commands (+merge all doc)
βββ Caching (New)
βββ Emitter
βββ I18n
βββ Locks
βββ Logger
βββ Mail (+merge all doc)
βββ Transmit (PR)
βββ Extending the framework
This section is ordered by alphabetical order except the last point.
The goal of this section is to contain anything that is less used than the Basic section to make an application. The goal is keep one page per feature.
Also, Ace Commands will probably move to its own website.
API References
βββ NO CHANGE
No change for this section.
Internals
βββ Tooling Config
βββ TypeScript Build
This section is ordered by alphabetical order.
The goal of this section is to contain anything not directly related to people's application. Internal process.
Experimentals
βββ NO CHANGE
No change for this section.
FINAL SIDEBAR
Preface
βββ Introduction
βββ FAQ
βββ Governance
βββ Release Notes
βββ Contribution Guide
Getting Started
βββ Installation
βββ Configuration
βββ Environment Variables
βββ Folder Structure
βββ Deployment
AdonisJS Concepts
βββ Application
βββ Application Lifecycle
βββ Config Providers
βββ RC Files
βββ Service Container
βββ Scaffolding
Architecture Concepts
βββ Async Local Storage
βββ Dependency Injection
βββ HMR
βββ Http Context
βββ Request Lifecycle
βββ Service Providers
Basics
βββ Routing
βββ Controllers
βββ Middleware
βββ Requests
βββ Response
βββ Validation
βββ File Upload
βββ Session
βββ Cookies
βββ Exception Handling
βββ Static Assets
Database
βββ Introduction
βββ Lucid ORM
βββ Redis
Authentication
βββ Introduction
βββ User Providers
βββ Auth Guards
βββ Social Authentication
Security
βββ Introduction
βββ Authorization
βββ Encryption
βββ Hashing
βββ Signed URLs
βββ Web Security
βββ Rate Limiting
Views & Templates
βββ Introduction
βββ EdgeJS
βββ InertiaJS
Testing
βββ Introduction
βββ Http Tests
βββ Browser Tests
βββ Console Tests
βββ Database
βββ Mocks & Fakes
Digging Deeper
βββ Ace Commands
βββ Caching
βββ Emitter
βββ I18n
βββ Locks
βββ Logger
βββ Mail
βββ Transmit
βββ Extending the framework
API References
βββ NO CHANGE
Internals
βββ Tooling Config
βββ TypeScript Build
Experimentals
βββ NO CHANGE
What a great improvement! I'm pleased to see this proposal!
For the HMR page, I'd rather see it in the internal tooling section more than in the architecture concept since it's just a flag with the serve command and this does not impact how the dev will use Adonis.
For the HMR page, I'd rather see it in the internal tooling section more than in the architecture concept since it's just a flag with the serve command and this does not impact how the dev will use Adonis.
I place it here because it is a concept linked to Node.js (not AdonisJS). However, it could also go inside the Internal section since it is not something someone has to know.
Extending the framework could be a separate section since this could cover extentions for a module like the HTTP request, Vine, a new social auth AND having a page dedicated to how dev can create externals and sharables modules.
Customization is one of the strength of the framework and it should really be highlighted in the nav!
SGTM, I suggest to separate Auth Guards in to sub-pages
Authentication
βββ Auth Guards # generic information about auth guards, how to apply, and name them.
βββ Session Guard
βββ Access Token Guard
βββ Basic Auth Guard
βββ Custom Auth Guard
SGTM, I suggest to separate Auth Guards in to sub-pages
Authentication βββ Auth Guards # generic information about auth guards, how to apply, and name them. βββ Session Guard βββ Access Token Guard βββ Basic Auth Guard βββ Custom Auth Guard
Do you mean the second proposal or to have a third level in the sidebar? Because you mixed the two in your message.
First Proposal: merge all guard documentation under the same page Auth Guards
Authentication
βββ Introduction
βββ User Providers
βββ Auth Guards
βββ Social Authentication
Second Proposal: keep the guard documentation separated on their own page
Authentication
βββ Introduction
βββ User Providers
βββ Session Guard
βββ Access Token Guard
βββ Basic Auth Guard
βββ Custom Auth Guard
βββ Social Authentication
The goal was to replicate a schema I showed during meetup/talk.
+1 for me, I think is a great change! I think one thing we are missing as a community is more example projects.
+1 for me, I think is a great change! I think one thing we are missing as a community is more example projects.
This is planned as part of our "Bootcamp" project.
Nice one! The only thing I would change: Preface -> General. Feels like the word βGeneralβ gives a little bit more freedom to put inside it something more general about the framework. And I would not shy off from adding βDonationsβ section into it.
nit: in
Preface
βββ Introduction (From: Getting Started - Introduction)
βββ FAQ
βββ Governance
βββ Release Notes
βββ Contribution Guide
I would put FAQ and Release Notes closer (imho something not in the release note should be in the FAQ and vice versa)
while Contribution Guide should follow the Governance (gouvernance could impact the contrib policy imho)
Proposal
Preface
βββ Introduction (From: Getting Started - Introduction)
βββ FAQ
βββ Release Notes
βββ Contribution Guide
βββ Governance
This is really cool π 1+ for me
@RomainLanz
Do you mean the second proposal or to have a third level in the sidebar? Because you mixed the two in your message.
I mean have a third level in the sidebar
@RomainLanz
Do you mean the second proposal or to have a third level in the sidebar? Because you mixed the two in your message.
I mean have a third level in the sidebar
In my opinion, that will clutter the sidebar too much and it is not currently doable in our documentation software.
What do you think about make an "Auth Guards" or "Authentication Guards" section ?
Authentication
βββ Introduction
βββ User Providers
βββ Social Authentication
Auth Guards
βββ Introduction
βββ Session Guard
βββ Access Token Guard
βββ Basic Auth Guard
βββ Custom Auth Guard
If we do that, we are splitting the content again, which I want to avoid. What are your goals with this change?
better readability and discoverability, avoiding put too much content in a single page.
I think a section like tutorial or recipes will be great for newcomers. The current docs is more of an API reference, and if you want to implement something in your app, you have to watch videos (which are great, but doesn't cover cases where you need a quick look or prefer text content) or dig the docs and connect the puzzle pieces by yourself.
Something like: https://docs.strapi.io/dev-docs/quick-start https://nextjs.org/learn/dashboard-app
better readability and discoverability, avoiding put too much content in a single page.
Then you want the second solution. Otherwise, we are cluttering the sidebar too much, and people will be lost with too much section.
Also, having more content on the same page has never been an issue. It allows you to easily search and avoid switching back and forth on multiple pages. You want to learn about "Auth Guard"? Go to the "Auth Guard" section and start to read from here.
For example, this is done in AdonisJS 5 or Laravel for the Mail section, and it was fine.
I think a section like tutorial or recipes will be great for newcomers. The current docs is more of an API reference, and if you want to implement something in your app, you have to watch videos (which are great, but doesn't cover cases where you need a quick look or prefer text content) or dig the docs and connect the puzzle pieces by yourself.
This is not the goal of the documentation and is already planned in the Bootcamp project.
The documentation will not teach you how to build an app from scratch. For that, we plan to write step-by-step tutorials that teach you how to build a specific app using the framework.
We got an internal discussion today, here is the latest feedback and final structure we will use.
- We are going to merge
AdonisJS ConceptsandArchitecture Concepts - Rename
Request LifecycletoHttp Overview - We keep the
Bodyparsersection outside ofRequests - We don't merge
Assets BundlingandStatic File Server - We rename
Assets BundlingtoVite - We move the
Internalssection toConcepts - We move
Extending the frameworktoConcepts - We move
RepltoDigging Deeper
Final structure:
Preface
βββ Introduction
βββ FAQ
βββ Governance
βββ Release Notes
βββ Contribution Guide
Getting Started
βββ Installation
βββ Configuration
βββ Environment Variables
βββ Folder Structure
βββ Deployment
Concepts
βββ Async Local Storage
βββ Application
βββ Application Lifecycle
βββ Config Providers
βββ Container Services
βββ Dependency Injection
βββ Extending the framework
βββ HMR
βββ Http Overview
βββ Http Context
βββ RC Files
βββ Service Providers
βββ Scaffolding
βββ Tooling Config
βββ TypeScript Build
Basics
βββ Routing
βββ Controllers
βββ Middleware
βββ Bodyparser
βββ Requests
βββ Response
βββ Validation
βββ File Upload
βββ Session
βββ Cookies
βββ Exception Handling
βββ Vite
βββ Static Assets
Database
βββ Introduction
βββ Lucid ORM
βββ Redis
Authentication
βββ Introduction
βββ User Credentials
βββ Session Guard
βββ Access Token Guard
βββ Basic Auth Guard
βββ Custom Auth Guard
βββ Social Authentication
Security
βββ Introduction
βββ Authorization
βββ Encryption
βββ Hashing
βββ Signed URLs
βββ Web Security
βββ Rate Limiting
Views & Templates
βββ Introduction
βββ EdgeJS
βββ InertiaJS
Testing
βββ Introduction
βββ Http Tests
βββ Browser Tests
βββ Console Tests
βββ Database
βββ Mocks & Fakes
Digging Deeper
βββ Ace Commands
βββ Caching
βββ Emitter
βββ I18n
βββ Locks
βββ Logger
βββ Mail
βββ Transmit
βββ Repl
Ace Commands
βββ NO CHANGE
API References
βββ NO CHANGE
Experimentals
βββ NO CHANGE
Yup, looks good.
A few things to note.
User Credentialsshould beVerifying user credentialsbecause the term "User Credentials" does not convey anything.Release Notesshould beReleasesbecause we list the releases only here, and the notes are on Github.TypeScript Buildshould beTypeScript build processto complete the sentence.- In security, we are missing CORS.
- Again, I prefer "Securing SSR apps" over "Web security". Aligns more with the intent of the doc.
- There won't be
Ace Commandsin digging deeper for now. Until we move Ace docs to its own website.
Also, I noticed that you went with "Title case" in all the topic names. However, currently, the documentation follows the "Sentence case". There is nothing wrong with either of those. Even from the English point of view, both are technically correct. But for consistency, we should stick with "Sentence case."
Finally, once we move content around. We should double-check:
- If any URLs are changing and must define redirects for them.
- Also, update internal links if the content files are moved to different folders. Right now, the links are resolved from the location of the file.
This is amazing work! Well done, much respect π I believe the final version is much clearer than the previous docs.
ππ»
You are invited to give your feedback on the PR: https://github.com/adonisjs/v6-docs/pull/86
You can see the changes there: https://feat-new-structure.v6-docs.pages.dev/guides/preface/introduction
Something like:
https://docs.strapi.io/dev-docs/quick-start
https://nextjs.org/learn/dashboard-app
I agree with this. Something like the laravel bootcamp would be super helpful for new comers to get up and running.
https://bootcamp.laravel.com/
Closing since the changes have been applied.