refactor: improve docs structure

This commit is contained in:
0xSage 2023-10-26 11:34:47 +07:00
parent 3ee288f339
commit 66d26c0372
16 changed files with 41 additions and 29 deletions

View File

@ -1,11 +1,14 @@
--- ---
sidebar_position: 1 sidebar_position: 2
title: Architecture title: Anatomy of an app
--- ---
## Jan overall architecture ## Jan Architecture
![Overall architecture](img/architecture-1.drawio.png) ![Overall architecture](img/architecture-1.drawio.png)
- Jan platform includes the following components: - Jan platform includes the following components:
- Processes: - Processes:
- UI process: - UI process:
- This is Electron framework `renderer` component (Web technology equivalent) - This is Electron framework `renderer` component (Web technology equivalent)
@ -20,3 +23,18 @@ title: Architecture
- `@janhq/core` library that exposes Core API for App to reuse. Currently it only supports App `index.ts` - `@janhq/core` library that exposes Core API for App to reuse. Currently it only supports App `index.ts`
- Vertically, there are `Platform Core` component and `App` component. Each of those includes UI and Node process that work in pair. - Vertically, there are `Platform Core` component and `App` component. Each of those includes UI and Node process that work in pair.
##
Platform has 3 events that are broadcast to installed Apps
![Platform events](img/app-anatomy-4.drawio.png)
- onLaunch()
![Platform onLaunch()](img/app-anatomy-1.drawio.png)
- onStart()
![Platform onStart()](img/app-anatomy-2.drawio.png)
- onDispose()
![Platform onDispose()](img/app-anatomy-3.drawio.png)
- At any given time, when there is new App installtion/ unintallation, the Platform restarts and trigger
- When App is being used, here is how the information passes between Platform and Apps
![Communication](img/app-anatomy-5.drawio.png)

View File

@ -0,0 +1,6 @@
---
sidebar_position: 1
title: Build an app
---
TODO: quickstart tutorial

View File

@ -0,0 +1,6 @@
---
sidebar_position: 2
title: Development workflow
---
todo

View File

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -1,5 +1,4 @@
--- ---
sidebar_position: 2
title: Concepts title: Concepts
--- ---

View File

@ -1,17 +0,0 @@
---
sidebar_position: 3
title: App Anatomy
---
Platform has 3 events that are broadcast to installed Apps
![Platform events](img/app-anatomy-4.drawio.png)
- onLaunch()
![Platform onLaunch()](img/app-anatomy-1.drawio.png)
- onStart()
![Platform onStart()](img/app-anatomy-2.drawio.png)
- onDispose()
![Platform onDispose()](img/app-anatomy-3.drawio.png)
- At any given time, when there is new App installtion/ unintallation, the Platform restarts and trigger
- When App is being used, here is how the information passes between Platform and Apps
![Communication](img/app-anatomy-5.drawio.png)

View File

@ -1,6 +1,6 @@
--- ---
sidebar_position: 1 sidebar_position: 1
title: How to Build a Jan App title: Building a chat app
--- ---
TODO TODO

View File

@ -1,6 +1,6 @@
--- ---
sidebar_position: 2 sidebar_position: 2
title: How to Build RAG App title: Building a RAG app
--- ---
TODO TODO

View File

@ -1,6 +1,6 @@
--- ---
sidebar_position: 3 sidebar_position: 3
title: How to Publish a Jan App title: Publishing a Jan app
--- ---
TODO TODO

View File

@ -117,7 +117,7 @@ const config = {
src: "img/logo.svg", src: "img/logo.svg",
}, },
items: [ items: [
// Navbar Top // Navbar left
// { // {
// type: "docSidebar", // type: "docSidebar",
// sidebarId: "featuresSidebar", // sidebarId: "featuresSidebar",
@ -135,7 +135,7 @@ const config = {
type: "docSidebar", type: "docSidebar",
sidebarId: "guidesSidebar", sidebarId: "guidesSidebar",
position: "right", position: "right",
label: "Guides", label: "User Guides",
}, },
{ {
type: "docSidebar", type: "docSidebar",

View File

@ -49,13 +49,13 @@ const sidebars = {
devSidebar: [ devSidebar: [
{ {
type: "category", type: "category",
label: "Overview", label: "Getting Started",
collapsible: true, collapsible: true,
collapsed: false, collapsed: false,
items: [ items: [
{ {
type: "autogenerated", type: "autogenerated",
dirName: "overview", dirName: "getting-started",
}, },
], ],
}, },