diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..52c20634 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +swa-cli.config.json +deploy.sh +site/build +site/.docusaurus \ No newline at end of file diff --git a/README.md b/README.md index f54ee4f1..8b137891 100644 --- a/README.md +++ b/README.md @@ -1,25 +1 @@ -# General Bots - The Bot Server - -Welcome to the General Bots Book. This is a reference material that can be used -to understand how the bot server is organized in a form of packages itself and -this arrangement can be used to all custom deployed packages like .gbkb, .gbtheme -or .gbapp. -This book is organized in ten chapters that can be accessed throuhg this table bellow: - -* [Acknowledgments](book/acknowledgments.md) -* [Chapter 01 - Run and Talk](book/chapter-01-run-and-talk.md) -* [Chapter 02 - About Packages](book/chapter-02-the-package-based.md) -* [Chapter 03 - gbkb Reference](book/chapter-03-gbkb-reference.md) -* [Chapter 04 - gbtheme Reference](book/chapter-04-gbtheme-reference.md) -* [Chapter 05 - gbdialog Reference](book/chapter-05-gbdialog-reference.md) -* [Chapter 06 - gbapp Reference](book/chapter-06-gbapp-reference.md) -* [Chapter 07 - gbot Reference](book/chapter-07-gbot-reference.md) -* [Chapter 08 - Tooling](book/chapter-08-tooling.md) -* [Chapter 09 - Services](book/chapter-09-services.md) -* [Chapter 10 - Contributing](book/chapter-10-contributing.md) -* [Apendix I - Database Model](book/apendix-i-database-model.md) -* [Copyright](book/copyright.md) -* [Foreward](book/foreward.md) -* [Glossary](book/glossary.md) -* [Preface](book/preface.md) diff --git a/_config.yml b/_config.yml deleted file mode 100644 index c06a614e..00000000 --- a/_config.yml +++ /dev/null @@ -1,8 +0,0 @@ -theme: jekyll-theme-slate -presets: - - - redocusaurus - - specs: - - spec: https://gb.pragmatismo.cloud/swagger.yaml - route: /api/ - theme: - primaryColor: '#1890ff' \ No newline at end of file diff --git a/site/blog/2019-05-28-first-blog-post.md b/site/blog/2019-05-28-first-blog-post.md deleted file mode 100644 index d3032efb..00000000 --- a/site/blog/2019-05-28-first-blog-post.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -slug: first-blog-post -title: First Blog Post -authors: [slorber, yangshun] -tags: [hola, docusaurus] ---- - -Lorem ipsum dolor sit amet... - - - -...consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet diff --git a/site/blog/2019-05-29-long-blog-post.md b/site/blog/2019-05-29-long-blog-post.md deleted file mode 100644 index eb4435de..00000000 --- a/site/blog/2019-05-29-long-blog-post.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: long-blog-post -title: Long Blog Post -authors: yangshun -tags: [hello, docusaurus] ---- - -This is the summary of a very long blog post, - -Use a `` comment to limit blog post size in the list view. - - - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet diff --git a/site/blog/2021-08-01-mdx-blog-post.mdx b/site/blog/2021-08-01-mdx-blog-post.mdx deleted file mode 100644 index 0c4b4a48..00000000 --- a/site/blog/2021-08-01-mdx-blog-post.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -slug: mdx-blog-post -title: MDX Blog Post -authors: [slorber] -tags: [docusaurus] ---- - -Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/). - -:::tip - -Use the power of React to create interactive blog posts. - -::: - -{/* truncate */} - -For example, use JSX to create an interactive button: - -```js - -``` - - diff --git a/site/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg b/site/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg deleted file mode 100644 index 11bda092..00000000 Binary files a/site/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg and /dev/null differ diff --git a/site/blog/2021-08-26-welcome/index.md b/site/blog/2021-08-26-welcome/index.md deleted file mode 100644 index 349ea075..00000000 --- a/site/blog/2021-08-26-welcome/index.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -slug: welcome -title: Welcome -authors: [slorber, yangshun] -tags: [facebook, hello, docusaurus] ---- - -[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog). - -Here are a few tips you might find useful. - - - -Simply add Markdown files (or folders) to the `blog` directory. - -Regular blog authors can be added to `authors.yml`. - -The blog post date can be extracted from filenames, such as: - -- `2019-05-30-welcome.md` -- `2019-05-30-welcome/index.md` - -A blog post folder can be convenient to co-locate blog post images: - -![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg) - -The blog supports tags as well! - -**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config. diff --git a/site/blog/authors.yml b/site/blog/authors.yml deleted file mode 100644 index 8bfa5c7c..00000000 --- a/site/blog/authors.yml +++ /dev/null @@ -1,23 +0,0 @@ -yangshun: - name: Yangshun Tay - title: Front End Engineer @ Facebook - url: https://github.com/yangshun - image_url: https://github.com/yangshun.png - page: true - socials: - x: yangshunz - github: yangshun - -slorber: - name: Sébastien Lorber - title: Docusaurus maintainer - url: https://sebastienlorber.com - image_url: https://github.com/slorber.png - page: - # customize the url of the author page at /blog/authors/ - permalink: '/all-sebastien-lorber-articles' - socials: - x: sebastienlorber - linkedin: sebastienlorber - github: slorber - newsletter: https://thisweekinreact.com diff --git a/site/blog/tags.yml b/site/blog/tags.yml deleted file mode 100644 index bfaa778f..00000000 --- a/site/blog/tags.yml +++ /dev/null @@ -1,19 +0,0 @@ -facebook: - label: Facebook - permalink: /facebook - description: Facebook tag description - -hello: - label: Hello - permalink: /hello - description: Hello tag description - -docusaurus: - label: Docusaurus - permalink: /docusaurus - description: Docusaurus tag description - -hola: - label: Hola - permalink: /hola - description: Hola tag description diff --git a/site/docs/book/apendix-i-database-model.md b/site/docs/apendix-i-database-model.md similarity index 59% rename from site/docs/book/apendix-i-database-model.md rename to site/docs/apendix-i-database-model.md index c96d149d..29d8f5e3 100644 --- a/site/docs/book/apendix-i-database-model.md +++ b/site/docs/apendix-i-database-model.md @@ -1,7 +1,11 @@ -# Apendix I - General Bots Database Model +--- +sidebar_position: 1000 +--- + +# Apendix I - Database Model The database model can be seen on the picture bellow. In each .gbapp or .gblib the folder **Model** will contain the Sequelize definition for each one of these tables and their relationship. -![General Bots Database Model](../images/GeneralBotsDatabaseModel.png) +![General Bots Database Model](./images/GeneralBotsDatabaseModel.png) diff --git a/site/docs/book/apendix-ii-network-diagrams.md b/site/docs/apendix-ii-network-diagrams.md similarity index 68% rename from site/docs/book/apendix-ii-network-diagrams.md rename to site/docs/apendix-ii-network-diagrams.md index 68406243..15df0d2a 100644 --- a/site/docs/book/apendix-ii-network-diagrams.md +++ b/site/docs/apendix-ii-network-diagrams.md @@ -1,7 +1,11 @@ -# Apendix II - General Bots Network Diagrams +--- +sidebar_position: 1000 +--- + +# Apendix II - Network Diagrams ## Reverse Proxy for Development When establishing a local development machine, an user can use the ngrok based proxy. The diagram shows how the localhost becomes accesible when the Bot Service need to connect, routing messages from the cloud to the local development server machine. -![General Bots Reverse Proxy](../images/GeneralBotsReverseProxy.png) +![General Bots Reverse Proxy](./images/GeneralBotsReverseProxy.png) diff --git a/site/docs/book/acknowledgments.md b/site/docs/book/acknowledgments.md deleted file mode 100644 index a10b3173..00000000 --- a/site/docs/book/acknowledgments.md +++ /dev/null @@ -1,16 +0,0 @@ -# Acknowledgments - -### Credits & Inspiration - -* Rodrigo Rodriguez (me@rodrigorodriguez.com) - Coding, Docs & Architecture -* David Lerner (david.lerner@hotmail.com) - UI, UX & Theming -* Eduardo Romeiro (eromeirosp@outlook.com) - Content & UX. -* Jorge Ramos (jramos@pobox.com) - Coding, Docs & Architecture -* PH Nascimento (ph.an@outlook.com) - Product Manager -* Alan Perdomo (alanperdomo@hotmail.com) - Coding, Docs & Architecture - -Powered by Microsoft [BOT Framework](https://dev.botframework.com/) and [Azure](http://www.azure.com). - -General Bot Code Name is [Guaribas](https://en.wikipedia.org/wiki/Guaribas), the name of a city in Brasil, state of Piaui. -[Roberto Mangabeira Unger](http://www.robertounger.com/en/): "No one should have to do work that can be done by a machine". - diff --git a/site/docs/book/chapter-08-tooling.md b/site/docs/book/chapter-08-tooling.md deleted file mode 100644 index 65104067..00000000 --- a/site/docs/book/chapter-08-tooling.md +++ /dev/null @@ -1,33 +0,0 @@ -# General Bots Tooling - - -## Notable Packages - -### [@push](https://github.com/vasyas/push-rpc) - -#### Updating BotServer/swagger.yaml -``` -node ./node_modules/@push-rpc/openapi/dist/cli.js --tsConfig ./tsconfig.api.json --apiTemplate ./api-template.json --output swaager.yaml --baseDir=. --entryFile ./src/api.ts --entryType GBAPI -``` - -## NLP - -### luis.ai - -## Spell Checker - -### Bing Spell Checker - -## Speech to Text - -### Azure Speech Services - -## Quality Assurance - -### Nightmare - -https://codecept.io/nightmare - - -# System Limits - diff --git a/site/docs/book/chapter-09-ux-in-va.md b/site/docs/book/chapter-09-ux-in-va.md deleted file mode 100644 index e69de29b..00000000 diff --git a/site/docs/book/copyright.md b/site/docs/book/copyright.md deleted file mode 100644 index ad4a94b3..00000000 --- a/site/docs/book/copyright.md +++ /dev/null @@ -1,22 +0,0 @@ -# - -Published by Pragmatismo - -Copyright © 2018-2024 - -License & Warranty - -General Bots Copyright (c) Pragmatismo. All rights reserved. Licensed under the AGPL-3.0. - -According to our dual licensing model, this program can be used either under the terms of - -the GNU Affero General Public License, version 3, or under a proprietary license. - -The texts of the GNU Affero General Public License with an additional permission and of our proprietary license can be found at and in the LICENSE file you have received along with this program. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - -"General Bots" is a registered trademark of Pragmatismo.io. The licensing of the program under the AGPLv3 does not imply a trademark license. Therefore any rights, title and interest in our trademarks remain entirely with us. - -pragmatismo.cloud - diff --git a/site/docs/book/cover.png b/site/docs/book/cover.png deleted file mode 100644 index 79d7b26a..00000000 Binary files a/site/docs/book/cover.png and /dev/null differ diff --git a/site/docs/book/foreward.md b/site/docs/book/foreward.md deleted file mode 100644 index dff3d3f4..00000000 --- a/site/docs/book/foreward.md +++ /dev/null @@ -1,3 +0,0 @@ -# Foreward - - diff --git a/site/docs/book/metadata.yaml b/site/docs/book/metadata.yaml deleted file mode 100644 index 92a3b7c4..00000000 --- a/site/docs/book/metadata.yaml +++ /dev/null @@ -1,43 +0,0 @@ -copyright: - owner: Pragmatismo.io - year: 2019 - -title: "General Bots Book" -subtitle: "Building virtual assistants" - -publisher: Pragmatismo.io - -# Whether or not to enable PlantUML. You must install PlantUML, and the -# "plantuml" command must be in your path, if you enable this feature. -# -# Default, if not specified: false -use_plantuml: false - -# Whether PDF generation uses Weasy Print (true) or LaTeX (false). Defaults to -# false (LaTeX). -use_weasyprint: true - -# Set to the language in which the book is written. This is especially -# useful when generating PDF with weasyprint, because it affects how -# hyphenation is handled. (When using weasyprint, automatic hyphenation is -# supported for any language that Pyphen supports.) - -# Multiple authors are permitted. -author: -- Rodrigo Rodriguez - -# Book identifier is optional. -#identifier: -# scheme: ISBN # or DOI -# text: 123456789X - -# The language and variant in which the book is written. -language: en-US - -# See https://wiki.mobileread.com/wiki/Genre -genre: reference - -# Set this option if you need to change the paper size. Default is "letter". -# "A4" is also valid. - -papersize: A4 diff --git a/site/docs/book/preface.md b/site/docs/book/preface.md deleted file mode 100644 index 15d23aa6..00000000 --- a/site/docs/book/preface.md +++ /dev/null @@ -1,3 +0,0 @@ -# Preface - -Probably not necessary. diff --git a/site/docs/book/references.yaml b/site/docs/book/references.yaml deleted file mode 100644 index fec24c16..00000000 --- a/site/docs/book/references.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# Bibiographic references -references: -- type: book - id: GeneralBots - author: - - family: Rodriguez - given: Rodrigo - - family: - given: - issued: - date-parts: - - - 2019 - - 3 - - 1 - title: 'General Bots Reference' - title-short: General Bots Reference - container-title: Nature - volume: 0 - issue: 0 - page: 300 - URL: https://github.com/GeneralBots - language: en-US diff --git a/site/docs/book/chapter-01-run-and-talk.md b/site/docs/chapter-01-run-and-talk.md similarity index 92% rename from site/docs/book/chapter-01-run-and-talk.md rename to site/docs/chapter-01-run-and-talk.md index e1ea7cbb..9637ba5d 100644 --- a/site/docs/book/chapter-01-run-and-talk.md +++ b/site/docs/chapter-01-run-and-talk.md @@ -1,4 +1,8 @@ -# General Bots - Run and Talk to the Bot +--- +sidebar_position: 10 +--- + +# Run and Talk ### Bot Development Stack @@ -33,10 +37,6 @@ GeneralBots aims to deliver bots on Azure in an easy and efficient manner. Utili 3. Type `npm install -g botserver` and press **ENTER**. 4. Type `gbot` to start the server core. -## Installation via PowerShell or Command Prompt - -![Installation via npm](https://user-images.githubusercontent.com/65977273/94572520-81e2f380-0247-11eb-9d69-ff70ad26b027.png) - ### Notes: - [*nodejs.install* Chocolatey Package](https://chocolatey.org/packages/nodejs.install) is also available (Chocolatey is a Windows package manager). diff --git a/site/docs/book/chapter-02-the-package-based.md b/site/docs/chapter-02-the-package-based.md similarity index 94% rename from site/docs/book/chapter-02-the-package-based.md rename to site/docs/chapter-02-the-package-based.md index 3a2fa771..1114ab56 100644 --- a/site/docs/book/chapter-02-the-package-based.md +++ b/site/docs/chapter-02-the-package-based.md @@ -1,6 +1,10 @@ -# About Packages +--- +sidebar_position: 20 +--- -Packages can be stored as folders in the file system, synced with cloud storages and +# Package Based principles + +Packages are folders in the file system, synced with cloud storages and content management systems like SharePoint and even sent like .zip files on a e-mail. Just to increse bot knowledge, intelligence and how they look to us. So working on a General Bots project is like to split the work on several packages if needed and work @@ -10,6 +14,9 @@ companies to more advanced package building. Composite packages on GeneralBots: ![print packages](https://user-images.githubusercontent.com/65977273/94712159-7662fb80-031f-11eb-8217-1c0507bfe5d5.png) +# Your own data + +You will see your data in .gbdata. ## How To diff --git a/site/docs/book/chapter-03-gbkb-reference.md b/site/docs/chapter-03-gbkb-reference.md similarity index 99% rename from site/docs/book/chapter-03-gbkb-reference.md rename to site/docs/chapter-03-gbkb-reference.md index 2b537136..33000bcd 100644 --- a/site/docs/book/chapter-03-gbkb-reference.md +++ b/site/docs/chapter-03-gbkb-reference.md @@ -1,3 +1,7 @@ +--- +sidebar_position: 30 +--- + # .gbkb Reference ![generalbots-2018](https://user-images.githubusercontent.com/65977273/94922431-949c3900-0490-11eb-800a-6b478d689f2a.png) diff --git a/site/docs/book/chapter-04-gbtheme-reference.md b/site/docs/chapter-04-gbtheme-reference.md similarity index 95% rename from site/docs/book/chapter-04-gbtheme-reference.md rename to site/docs/chapter-04-gbtheme-reference.md index 2efc9408..c2ec36d8 100644 --- a/site/docs/book/chapter-04-gbtheme-reference.md +++ b/site/docs/chapter-04-gbtheme-reference.md @@ -1,4 +1,9 @@ +--- +sidebar_position: 40 +--- + # .gbtheme Reference + ![generalbots-2018](https://user-images.githubusercontent.com/65977273/94922431-949c3900-0490-11eb-800a-6b478d689f2a.png) ## How To diff --git a/site/docs/book/chapter-05-gbdialog-reference.md b/site/docs/chapter-05-gbdialog-reference.md similarity index 99% rename from site/docs/book/chapter-05-gbdialog-reference.md rename to site/docs/chapter-05-gbdialog-reference.md index 0a35ab6c..fdc0a36a 100644 --- a/site/docs/book/chapter-05-gbdialog-reference.md +++ b/site/docs/chapter-05-gbdialog-reference.md @@ -1,4 +1,9 @@ +--- +sidebar_position: 50 +--- + # .gbdialog Reference + ![generalbots-2018](https://user-images.githubusercontent.com/65977273/94922431-949c3900-0490-11eb-800a-6b478d689f2a.png) General Bots BASIC using HEAR and TALK keywords provides a easy to write bot language accessible to everyone and used as incomer for people willing to make their own bot. diff --git a/site/docs/book/chapter-06-gbapp-reference.md b/site/docs/chapter-06-gbapp-reference.md similarity index 98% rename from site/docs/book/chapter-06-gbapp-reference.md rename to site/docs/chapter-06-gbapp-reference.md index 7a1737bc..c3389704 100644 --- a/site/docs/book/chapter-06-gbapp-reference.md +++ b/site/docs/chapter-06-gbapp-reference.md @@ -1,4 +1,9 @@ -# .gbapp Guide +--- +sidebar_position: 60 +--- + +# .gbapp Reference + ![generalbots-2018](https://user-images.githubusercontent.com/65977273/94922431-949c3900-0490-11eb-800a-6b478d689f2a.png) ## Introduction @@ -34,7 +39,7 @@ General procedures: - User.Read - Application.Read.All - Application.ReadWrite.All -6. In Authentication | Add Platform | Web | Redirect URL: https://{server}/{botId}/token; +6. In Authentication | Add Platform | Web | Redirect URL: https://server/botId/token; 6. /setupSecurity to get access to Bot Drive (Clean: https://www.domstamand.com/removing-user-consent-from-an-azure-ad-application/); 7. /publish to publish packages on root bot. @@ -92,10 +97,10 @@ sudo apt install code ``` -Node JS 19 +Node JS 20 ``` -curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash - +curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt-get install -y nodejs node -v sudo apt install npm @@ -137,7 +142,7 @@ Add export GTK_IM_MODULE="xim" to .profile to fix Key Bindings in VSCode on Ubun 3. Install [Node.js](https://npmjs.com/get-npm), a [Runtime system](https://en.wikipedia.org/wiki/Runtime_system); 4. Install Visual Studio Code Insiders, Brackets or Atom as an editor of your choice; 5. Fork the repository by visiting https://github.com/pragmatismo-io/BotServer/fork; -6. Clone the just forked repository by running `git clone /BotServer.git` ; +6. Clone the just forked repository by running `git clone your-forked-repository-url/BotServer.git` ; 7. Run the bot server by `gbot.cmd` . @@ -295,9 +300,9 @@ See https://semver.org/. The numbering rules are defined as the following syntax: -1.0.0
-MAJOR.MINOR.PATCH
-(BREAK.FEATURE.BUG)
+1.0.0 +MAJOR.MINOR.PATCH +(BREAK.FEATURE.BUG) ### Details diff --git a/site/docs/book/chapter-07-gbot-reference.md b/site/docs/chapter-07-gbot-reference.md similarity index 99% rename from site/docs/book/chapter-07-gbot-reference.md rename to site/docs/chapter-07-gbot-reference.md index ccbfdd3c..1f71f7ad 100644 --- a/site/docs/book/chapter-07-gbot-reference.md +++ b/site/docs/chapter-07-gbot-reference.md @@ -1,4 +1,8 @@ -# General Bots Administration +--- +sidebar_position: 70 +--- + +# .gbot Reference ## Instance custom params @@ -114,4 +118,3 @@ https://graph.facebook.com/v18.0/99999792462862/whatsapp_business_profile ## Cloud Internals - diff --git a/site/docs/chapter-08-tooling.md b/site/docs/chapter-08-tooling.md new file mode 100644 index 00000000..8aaaeabe --- /dev/null +++ b/site/docs/chapter-08-tooling.md @@ -0,0 +1,30 @@ +--- +sidebar_position: 80 +--- + +# Tooling + +## Notable Packages + +### [@push](https://github.com/vasyas/push-rpc) + +#### Updating BotServer/swagger.yaml + +``` +node ./node_modules/@push-rpc/openapi/dist/cli.js --tsConfig ./tsconfig.api.json --apiTemplate ./api-template.json --output swaager.yaml --baseDir=. --entryFile ./src/api.ts --entryType GBAPI +``` + +# External Refereces + +| Name | URL | +| ------------------------ | ----------------------------- | +| Prompt Engineering Guide | https://www.promptingguide.ai | + +## LLM Propmts + +- https://github.com/jamesponddotco/llm-prompts/tree/trunk + + +## LLM Tools + +- https://lmstudio.ai/ \ No newline at end of file diff --git a/site/docs/chapter-09-services.md b/site/docs/chapter-09-services.md new file mode 100644 index 00000000..41fce84b --- /dev/null +++ b/site/docs/chapter-09-services.md @@ -0,0 +1,17 @@ +--- +sidebar_position: 90 +--- + +# Services + +# Useful callable public APIs + +| Name | URL | +| ------------------------ | -------------------------------------------------- | +| Collection of Public API | https://github.com/public-apis/public-apis | +| Wheather | https://github.com/Yeqzids/7timer-issues/wiki/Wiki | + + + + +# Service News diff --git a/site/docs/book/chapter-10-contributing.md b/site/docs/chapter-10-contributing.md similarity index 77% rename from site/docs/book/chapter-10-contributing.md rename to site/docs/chapter-10-contributing.md index 1b505230..4fa17e9e 100644 --- a/site/docs/book/chapter-10-contributing.md +++ b/site/docs/chapter-10-contributing.md @@ -1,4 +1,8 @@ -# Contributing to the General Bots open-core +--- +sidebar_position: 100 +--- + +# Contributing ## How To diff --git a/site/docs/book/glossary.md b/site/docs/glossary.md similarity index 92% rename from site/docs/book/glossary.md rename to site/docs/glossary.md index 16d835e7..8e9c525d 100644 --- a/site/docs/book/glossary.md +++ b/site/docs/glossary.md @@ -1,3 +1,7 @@ +--- +sidebar_position: 1000 +--- + # Glossary | Term | Description | diff --git a/site/docs/intro.md b/site/docs/intro.md index 45e8604c..4843f2f1 100644 --- a/site/docs/intro.md +++ b/site/docs/intro.md @@ -1,47 +1,52 @@ --- -sidebar_position: 1 +sidebar_position: 0 --- -# Tutorial Intro +# General Bots Documentation + +Welcome to the General Bots documentation. This is a reference material that can be used +to understand how the bot server is organized in a form of packages itself and +this arrangement can be used to all custom deployed packages like .gbkb, .gbtheme +or .gbapp. +This book is organized in ten chapters that can be accessed throuhg this table bellow: + +* [Chapter 01 - Run and Talk](chapter-01-run-and-talk.md) +* [Chapter 02 - About Packages](chapter-02-the-package-based.md) +* [Chapter 03 - gbkb Reference](chapter-03-gbkb-reference.md) +* [Chapter 04 - gbtheme Reference](chapter-04-gbtheme-reference.md) +* [Chapter 05 - gbdialog Reference](chapter-05-gbdialog-reference.md) +* [Chapter 06 - gbapp Reference](chapter-06-gbapp-reference.md) +* [Chapter 07 - gbot Reference](chapter-07-gbot-reference.md) +* [Chapter 08 - Tooling](chapter-08-tooling.md) +* [Chapter 09 - Services](chapter-09-services.md) +* [Chapter 10 - Contributing](chapter-10-contributing.md) +* [Apendix I - Database Model](apendix-i-database-model.md) +* [Glossary](glossary.md) -Let's discover **Docusaurus in less than 5 minutes**. ## Getting Started -Get started by **creating a new site**. +Get started by **creating a new bot**. -Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**. +Or **[Create Bot](https://gb.pragmatismo.cloud/PROD-GeneralBots006)** with General Bots Online. ### What you'll need -- [Node.js](https://nodejs.org/en/download/) version 18.0 or above: - - When installing Node.js, you are recommended to check all checkboxes related to dependencies. - -## Generate a new site - -Generate a new Docusaurus site using the **classic template**. - -The classic template will automatically be added to your project after you run the command: - -```bash -npm init docusaurus@latest my-website classic +- [Node.js](https://nodejs.org/en/download/) version 20: +- [Git](https://nodejs.org/en/download/) version 20: + +``` + git clone https://github.com/GeneralBots/BotServer + npm run start ``` You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor. The command also installs all necessary dependencies you need to run Docusaurus. -## Start your site +## Navigate to your bot -Run the development server: -```bash -cd my-website -npm run start -``` +The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:4242/. -The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there. - -The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/. - -Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes. +Type `/publish` to publish bot packages and start talking to the bot. diff --git a/site/docs/tutorial-basics/_category_.json b/site/docs/tutorial-basics/_category_.json deleted file mode 100644 index 2e6db55b..00000000 --- a/site/docs/tutorial-basics/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "Tutorial - Basics", - "position": 2, - "link": { - "type": "generated-index", - "description": "5 minutes to learn the most important Docusaurus concepts." - } -} diff --git a/site/docs/tutorial-basics/congratulations.md b/site/docs/tutorial-basics/congratulations.md deleted file mode 100644 index 04771a00..00000000 --- a/site/docs/tutorial-basics/congratulations.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_position: 6 ---- - -# Congratulations! - -You have just learned the **basics of Docusaurus** and made some changes to the **initial template**. - -Docusaurus has **much more to offer**! - -Have **5 more minutes**? Take a look at **[versioning](../tutorial-extras/manage-docs-versions.md)** and **[i18n](../tutorial-extras/translate-your-site.md)**. - -Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://github.com/facebook/docusaurus/discussions/4610) - -## What's next? - -- Read the [official documentation](https://docusaurus.io/) -- Modify your site configuration with [`docusaurus.config.js`](https://docusaurus.io/docs/api/docusaurus-config) -- Add navbar and footer items with [`themeConfig`](https://docusaurus.io/docs/api/themes/configuration) -- Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout) -- Add a [search bar](https://docusaurus.io/docs/search) -- Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase) -- Get involved in the [Docusaurus Community](https://docusaurus.io/community/support) diff --git a/site/docs/tutorial-basics/create-a-blog-post.md b/site/docs/tutorial-basics/create-a-blog-post.md deleted file mode 100644 index 550ae17e..00000000 --- a/site/docs/tutorial-basics/create-a-blog-post.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Create a Blog Post - -Docusaurus creates a **page for each blog post**, but also a **blog index page**, a **tag system**, an **RSS** feed... - -## Create your first Post - -Create a file at `blog/2021-02-28-greetings.md`: - -```md title="blog/2021-02-28-greetings.md" ---- -slug: greetings -title: Greetings! -authors: - - name: Joel Marcey - title: Co-creator of Docusaurus 1 - url: https://github.com/JoelMarcey - image_url: https://github.com/JoelMarcey.png - - name: Sébastien Lorber - title: Docusaurus maintainer - url: https://sebastienlorber.com - image_url: https://github.com/slorber.png -tags: [greetings] ---- - -Congratulations, you have made your first post! - -Feel free to play around and edit this post as much as you like. -``` - -A new blog post is now available at [http://localhost:3000/blog/greetings](http://localhost:3000/blog/greetings). diff --git a/site/docs/tutorial-basics/create-a-document.md b/site/docs/tutorial-basics/create-a-document.md deleted file mode 100644 index c22fe294..00000000 --- a/site/docs/tutorial-basics/create-a-document.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Create a Document - -Documents are **groups of pages** connected through: - -- a **sidebar** -- **previous/next navigation** -- **versioning** - -## Create your first Doc - -Create a Markdown file at `docs/hello.md`: - -```md title="docs/hello.md" -# Hello - -This is my **first Docusaurus document**! -``` - -A new document is now available at [http://localhost:3000/docs/hello](http://localhost:3000/docs/hello). - -## Configure the Sidebar - -Docusaurus automatically **creates a sidebar** from the `docs` folder. - -Add metadata to customize the sidebar label and position: - -```md title="docs/hello.md" {1-4} ---- -sidebar_label: 'Hi!' -sidebar_position: 3 ---- - -# Hello - -This is my **first Docusaurus document**! -``` - -It is also possible to create your sidebar explicitly in `sidebars.js`: - -```js title="sidebars.js" -export default { - tutorialSidebar: [ - 'intro', - // highlight-next-line - 'hello', - { - type: 'category', - label: 'Tutorial', - items: ['tutorial-basics/create-a-document'], - }, - ], -}; -``` diff --git a/site/docs/tutorial-basics/create-a-page.md b/site/docs/tutorial-basics/create-a-page.md deleted file mode 100644 index 20e2ac30..00000000 --- a/site/docs/tutorial-basics/create-a-page.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Create a Page - -Add **Markdown or React** files to `src/pages` to create a **standalone page**: - -- `src/pages/index.js` → `localhost:3000/` -- `src/pages/foo.md` → `localhost:3000/foo` -- `src/pages/foo/bar.js` → `localhost:3000/foo/bar` - -## Create your first React Page - -Create a file at `src/pages/my-react-page.js`: - -```jsx title="src/pages/my-react-page.js" -import React from 'react'; -import Layout from '@theme/Layout'; - -export default function MyReactPage() { - return ( - -

My React page

-

This is a React page

-
- ); -} -``` - -A new page is now available at [http://localhost:3000/my-react-page](http://localhost:3000/my-react-page). - -## Create your first Markdown Page - -Create a file at `src/pages/my-markdown-page.md`: - -```mdx title="src/pages/my-markdown-page.md" -# My Markdown page - -This is a Markdown page -``` - -A new page is now available at [http://localhost:3000/my-markdown-page](http://localhost:3000/my-markdown-page). diff --git a/site/docs/tutorial-basics/deploy-your-site.md b/site/docs/tutorial-basics/deploy-your-site.md deleted file mode 100644 index 1c50ee06..00000000 --- a/site/docs/tutorial-basics/deploy-your-site.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Deploy your site - -Docusaurus is a **static-site-generator** (also called **[Jamstack](https://jamstack.org/)**). - -It builds your site as simple **static HTML, JavaScript and CSS files**. - -## Build your site - -Build your site **for production**: - -```bash -npm run build -``` - -The static files are generated in the `build` folder. - -## Deploy your site - -Test your production build locally: - -```bash -npm run serve -``` - -The `build` folder is now served at [http://localhost:3000/](http://localhost:3000/). - -You can now deploy the `build` folder **almost anywhere** easily, **for free** or very small cost (read the **[Deployment Guide](https://docusaurus.io/docs/deployment)**). diff --git a/site/docs/tutorial-basics/markdown-features.mdx b/site/docs/tutorial-basics/markdown-features.mdx deleted file mode 100644 index 35e00825..00000000 --- a/site/docs/tutorial-basics/markdown-features.mdx +++ /dev/null @@ -1,152 +0,0 @@ ---- -sidebar_position: 4 ---- - -# Markdown Features - -Docusaurus supports **[Markdown](https://daringfireball.net/projects/markdown/syntax)** and a few **additional features**. - -## Front Matter - -Markdown documents have metadata at the top called [Front Matter](https://jekyllrb.com/docs/front-matter/): - -```text title="my-doc.md" -// highlight-start ---- -id: my-doc-id -title: My document title -description: My document description -slug: /my-custom-url ---- -// highlight-end - -## Markdown heading - -Markdown text with [links](./hello.md) -``` - -## Links - -Regular Markdown links are supported, using url paths or relative file paths. - -```md -Let's see how to [Create a page](/create-a-page). -``` - -```md -Let's see how to [Create a page](./create-a-page.md). -``` - -**Result:** Let's see how to [Create a page](./create-a-page.md). - -## Images - -Regular Markdown images are supported. - -You can use absolute paths to reference images in the static directory (`static/img/docusaurus.png`): - -```md -![Docusaurus logo](/img/docusaurus.png) -``` - -![Docusaurus logo](/img/docusaurus.png) - -You can reference images relative to the current file as well. This is particularly useful to colocate images close to the Markdown files using them: - -```md -![Docusaurus logo](./img/docusaurus.png) -``` - -## Code Blocks - -Markdown code blocks are supported with Syntax highlighting. - -````md -```jsx title="src/components/HelloDocusaurus.js" -function HelloDocusaurus() { - return

Hello, Docusaurus!

; -} -``` -```` - -```jsx title="src/components/HelloDocusaurus.js" -function HelloDocusaurus() { - return

Hello, Docusaurus!

; -} -``` - -## Admonitions - -Docusaurus has a special syntax to create admonitions and callouts: - -```md -:::tip My tip - -Use this awesome feature option - -::: - -:::danger Take care - -This action is dangerous - -::: -``` - -:::tip My tip - -Use this awesome feature option - -::: - -:::danger Take care - -This action is dangerous - -::: - -## MDX and React Components - -[MDX](https://mdxjs.com/) can make your documentation more **interactive** and allows using any **React components inside Markdown**: - -```jsx -export const Highlight = ({children, color}) => ( - { - alert(`You clicked the color ${color} with label ${children}`) - }}> - {children} - -); - -This is Docusaurus green ! - -This is Facebook blue ! -``` - -export const Highlight = ({children, color}) => ( - { - alert(`You clicked the color ${color} with label ${children}`); - }}> - {children} - -); - -This is Docusaurus green ! - -This is Facebook blue ! diff --git a/site/docs/tutorial-extras/_category_.json b/site/docs/tutorial-extras/_category_.json deleted file mode 100644 index a8ffcc19..00000000 --- a/site/docs/tutorial-extras/_category_.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "label": "Tutorial - Extras", - "position": 3, - "link": { - "type": "generated-index" - } -} diff --git a/site/docs/tutorial-extras/img/docsVersionDropdown.png b/site/docs/tutorial-extras/img/docsVersionDropdown.png deleted file mode 100644 index 97e41646..00000000 Binary files a/site/docs/tutorial-extras/img/docsVersionDropdown.png and /dev/null differ diff --git a/site/docs/tutorial-extras/img/localeDropdown.png b/site/docs/tutorial-extras/img/localeDropdown.png deleted file mode 100644 index e257edc1..00000000 Binary files a/site/docs/tutorial-extras/img/localeDropdown.png and /dev/null differ diff --git a/site/docs/tutorial-extras/manage-docs-versions.md b/site/docs/tutorial-extras/manage-docs-versions.md deleted file mode 100644 index ccda0b90..00000000 --- a/site/docs/tutorial-extras/manage-docs-versions.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Manage Docs Versions - -Docusaurus can manage multiple versions of your docs. - -## Create a docs version - -Release a version 1.0 of your project: - -```bash -npm run docusaurus docs:version 1.0 -``` - -The `docs` folder is copied into `versioned_docs/version-1.0` and `versions.json` is created. - -Your docs now have 2 versions: - -- `1.0` at `http://localhost:3000/docs/` for the version 1.0 docs -- `current` at `http://localhost:3000/docs/next/` for the **upcoming, unreleased docs** - -## Add a Version Dropdown - -To navigate seamlessly across versions, add a version dropdown. - -Modify the `docusaurus.config.js` file: - -```js title="docusaurus.config.js" -export default { - themeConfig: { - navbar: { - items: [ - // highlight-start - { - type: 'docsVersionDropdown', - }, - // highlight-end - ], - }, - }, -}; -``` - -The docs version dropdown appears in your navbar: - -![Docs Version Dropdown](./img/docsVersionDropdown.png) - -## Update an existing version - -It is possible to edit versioned docs in their respective folder: - -- `versioned_docs/version-1.0/hello.md` updates `http://localhost:3000/docs/hello` -- `docs/hello.md` updates `http://localhost:3000/docs/next/hello` diff --git a/site/docs/tutorial-extras/translate-your-site.md b/site/docs/tutorial-extras/translate-your-site.md deleted file mode 100644 index b5a644ab..00000000 --- a/site/docs/tutorial-extras/translate-your-site.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Translate your site - -Let's translate `docs/intro.md` to French. - -## Configure i18n - -Modify `docusaurus.config.js` to add support for the `fr` locale: - -```js title="docusaurus.config.js" -export default { - i18n: { - defaultLocale: 'en', - locales: ['en', 'fr'], - }, -}; -``` - -## Translate a doc - -Copy the `docs/intro.md` file to the `i18n/fr` folder: - -```bash -mkdir -p i18n/fr/docusaurus-plugin-content-docs/current/ - -cp docs/intro.md i18n/fr/docusaurus-plugin-content-docs/current/intro.md -``` - -Translate `i18n/fr/docusaurus-plugin-content-docs/current/intro.md` in French. - -## Start your localized site - -Start your site on the French locale: - -```bash -npm run start -- --locale fr -``` - -Your localized site is accessible at [http://localhost:3000/fr/](http://localhost:3000/fr/) and the `Getting Started` page is translated. - -:::caution - -In development, you can only use one locale at a time. - -::: - -## Add a Locale Dropdown - -To navigate seamlessly across languages, add a locale dropdown. - -Modify the `docusaurus.config.js` file: - -```js title="docusaurus.config.js" -export default { - themeConfig: { - navbar: { - items: [ - // highlight-start - { - type: 'localeDropdown', - }, - // highlight-end - ], - }, - }, -}; -``` - -The locale dropdown now appears in your navbar: - -![Locale Dropdown](./img/localeDropdown.png) - -## Build your localized site - -Build your site for a specific locale: - -```bash -npm run build -- --locale fr -``` - -Or build your site to include all the locales at once: - -```bash -npm run build -``` diff --git a/site/docusaurus.config.ts b/site/docusaurus.config.ts index 8aaf5870..80c2749a 100644 --- a/site/docusaurus.config.ts +++ b/site/docusaurus.config.ts @@ -8,7 +8,7 @@ const config: Config = { favicon: "img/favicon.ico", // Set the production url of your site here - url: "https://gb.pragmatismo.cloud", + url: "https://docs.pragmatismo.cloud", // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' baseUrl: "/", @@ -18,7 +18,7 @@ const config: Config = { organizationName: "General Bots", // Usually your GitHub org/user name. projectName: "General Bots", // Usually your repo name. - onBrokenLinks: "throw", + onBrokenLinks: "warn", onBrokenMarkdownLinks: "warn", // // Even if you don't use internationalization, you can use this field to set @@ -89,10 +89,10 @@ const config: Config = { type: "docSidebar", sidebarId: "tutorialSidebar", position: "left", - label: "Tutorial", + label: "Docs", }, { to: "/api", label: "API", position: "left" }, - { to: "/blog", label: "Blog", position: "left" }, + { to: "https://github.com/GeneralBots/BotServer/tree/main/templates", label: "Templates", position: "left" }, { href: "https://github.com/GeneralBots", label: "GitHub", @@ -107,7 +107,7 @@ const config: Config = { title: "Docs", items: [ { - label: "Tutorial", + label: "Documentation", to: "/docs/intro", }, ],