Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Introduce Docusaurus documentation #252

Merged
merged 45 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f97991f
WIP
Olshansk Dec 8, 2023
45ae328
Merge branch 'main' into docs/hello_poktroll
Olshansk Dec 8, 2023
24c3d3c
Ran npx create-docusaurus@latest docusaurus classic
Olshansk Dec 8, 2023
9a34374
Changed the default port
Olshansk Dec 8, 2023
6f2374e
Delete the docusarus blog
Olshansk Dec 8, 2023
989c2f5
Formatted things such that they are good enough but before a fullown …
Olshansk Dec 9, 2023
73c7d36
Deleted unnecessary components
Olshansk Dec 9, 2023
bd05bb9
Merge branch 'main' into docs/hello_poktroll
Olshansk Dec 9, 2023
b76f6d9
Updated main readme
Olshansk Dec 10, 2023
d650680
Made the main README a symlink of the docusarus main
Olshansk Dec 10, 2023
f751a5d
Quickstart almost done by E2E tests are failing
Olshansk Dec 10, 2023
8ee4b44
Merge branch 'main' into docs/hello_poktroll
Olshansk Dec 11, 2023
2720509
Updated documentation in the roadmap and quickstart guides (plus mino…
Olshansk Dec 11, 2023
f95e18d
Rough draft complete
Olshansk Dec 11, 2023
e240be7
Merge branch 'main' into docs/hello_poktroll
Olshansk Dec 11, 2023
63b3c90
Committing debug session w/ red0ne that uncovered all the TODOs
Olshansk Dec 12, 2023
9200e44
Merge branch 'main' into docs/hello_poktroll
Olshansk Dec 12, 2023
ff9b390
Merge branch 'main' into docs/hello_poktroll
Olshansk Dec 13, 2023
e5613bb
Checkpoint commit of a previous stash - working through the quickstar…
Olshansk Dec 13, 2023
4adf6c8
Merge branch 'main' into docs/hello_poktroll
Olshansk Dec 13, 2023
5399e59
Commiting URL helper
Olshansk Dec 13, 2023
c4ea7e0
Merge branch 'main' into docs/hello_poktroll
Olshansk Dec 14, 2023
2136494
Minor comment in Makefile
Olshansk Dec 14, 2023
b30f4bb
Updated the the quickstart guide
Olshansk Dec 14, 2023
84f79e6
Remove logo.svg
Olshansk Dec 14, 2023
27ee828
Remove the pkg related changes in this PR
Olshansk Dec 14, 2023
2c9f6ea
Remove pkg/sdk/urls.go
Olshansk Dec 14, 2023
8a49da4
Add back the hack for session rollover
Olshansk Dec 14, 2023
c8fc452
wip
okdas Dec 15, 2023
c7a9545
Empty commit
okdas Dec 16, 2023
bfc8ba9
Merge remote-tracking branch 'origin/main' into docs/hello_poktroll
okdas Dec 16, 2023
302dc00
wip
okdas Dec 16, 2023
cbde345
wip
okdas Dec 16, 2023
d5a85b7
onBrokenLinks warn
okdas Dec 16, 2023
0bbe025
chore: minor fixes
h5law Dec 17, 2023
b6a6839
enablement -> true
okdas Dec 19, 2023
006fafe
provide perms
okdas Dec 19, 2023
a2b4741
add perms
okdas Dec 19, 2023
498a44b
change docs deployment config
okdas Dec 19, 2023
921440f
remove broken links
okdas Dec 19, 2023
18276b8
fix broken links
okdas Dec 19, 2023
10750b1
fix more links
okdas Dec 19, 2023
7619e05
change footer links
okdas Dec 19, 2023
8a6f6b1
only run from main now
okdas Dec 19, 2023
e0d9dd5
Minor tweaks at the end
Olshansk Dec 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/upload-pages-artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Based off of https://github.com/LayZeeDK/github-pages-docusaurus
name: Deploy docusaurus docs to GitHub pages

on:
push:
branches: ["main"]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

env:
GKE_CLUSTER: protocol-us-central1
GKE_ZONE: us-central1

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# 👇 Build steps
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive
- name: Build
run: yarn build
# 👆 Build steps
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# 👇 Specify build output path
path: build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ go.work.sum

# TODO_TECHDEBT: It seems that .dot files come and go so we need to figure out the root cause: https://github.com/pokt-network/poktroll/pull/177/files#r1392521547
# **/*.dot

# Quickstart helpers
shannon_appgate_config.yaml
shannon_app_config.yaml
1 change: 0 additions & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ RUN ignite chain init --skip-proto
EXPOSE 8545
EXPOSE 8546
EXPOSE 8547
EXPOSE 8548

ENTRYPOINT ["ignite"]
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -226,25 +226,18 @@ go_develop_and_test: go_develop go_test ## Generate protos, mocks and run all te
# TODO_NB - An important note to reference later
# TODO_DISCUSS_IN_THIS_COMMIT - SHOULD NEVER BE COMMITTED TO MASTER. It is a way for the reviewer of a PR to start / reply to a discussion.
# TODO_IN_THIS_COMMIT - SHOULD NEVER BE COMMITTED TO MASTER. It is a way to start the review process while non-critical changes are still in progress
TODO_KEYWORDS = -e "TODO" -e "TODO_COMMUNITY" -e "TODO_DECIDE" -e "TODO_TECHDEBT" -e "TODO_IMPROVE" -e "TODO_OPTIMIZE" -e "TODO_DISCUSS" -e "TODO_INCOMPLETE" -e "TODO_INVESTIGATE" -e "TODO_CLEANUP" -e "TODO_HACK" -e "TODO_REFACTOR" -e "TODO_CONSIDERATION" -e "TODO_IN_THIS_COMMIT" -e "TODO_DISCUSS_IN_THIS_COMMIT" -e "TODO_CONSOLIDATE" -e "TODO_DEPRECATE" -e "TODO_ADDTEST" -e "TODO_RESEARCH" -e "TODO_BUG" -e "TODO_NB"

.PHONY: todo_list
todo_list: ## List all the TODOs in the project (excludes vendor and prototype directories)
grep --exclude-dir={.git,vendor,prototype} -r ${TODO_KEYWORDS} .

TODO_SEARCH ?= $(shell pwd)

.PHONY: todo_search
todo_search: ## List all the TODOs in a specific directory specific by `TODO_SEARCH`
grep --exclude-dir={.git,vendor,prototype} -r ${TODO_KEYWORDS} ${TODO_SEARCH}
grep --exclude-dir={.git,vendor,./docusaurus} -r TODO .

.PHONY: todo_count
todo_count: ## Print a count of all the TODOs in the project
grep --exclude-dir={.git,vendor,prototype} -r ${TODO_KEYWORDS} . | wc -l
grep --exclude-dir={.git,vendor,./docusaurus} -r TODO . | wc -l

.PHONY: todo_this_commit
todo_this_commit: ## List all the TODOs needed to be done in this commit
grep --exclude-dir={.git,vendor,prototype,.vscode} --exclude=Makefile -r -e "TODO_IN_THIS_COMMIT" -e "TODO_DISCUSS_IN_THIS_COMMIT"
grep --exclude-dir={.git,vendor,.vscode} --exclude=Makefile -r -e "TODO_IN_THIS_"
Olshansk marked this conversation as resolved.
Show resolved Hide resolved

####################
### Gateways ###
Expand Down Expand Up @@ -527,6 +520,13 @@ go_docs: check_godoc ## Generate documentation for the project
openapi_gen: ## Generate the OpenAPI spec for the Ignite API
ignite generate openapi --yes


.PHONY: docusaurus_start
docusaurus_start: ## Start the Docusaurus server
(cd docusaurus && npm run start)



######################
### Ignite Helpers ###
######################
Expand Down
52 changes: 0 additions & 52 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
3 changes: 2 additions & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ if localnet_config["helm_chart_local_repo"]["enabled"]:
print("Using local helm chart repo " + helm_chart_local_repo)
chart_prefix = helm_chart_local_repo + "/charts/"


# Import files into Kubernetes ConfigMap
def read_files_from_directory(directory):
files = listdir(directory)
Expand Down Expand Up @@ -158,7 +159,7 @@ k8s_resource(
"relayminers",
labels=["blockchains"],
resource_deps=["sequencer"],
port_forwards=["8548", "40005"],
port_forwards=["8545", "40005"],
)
k8s_resource(
"appgateservers",
Expand Down
20 changes: 20 additions & 0 deletions docusaurus/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
51 changes: 51 additions & 0 deletions docusaurus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
sidebar_position: 4
title: Website
---

# Website <!-- omit in toc -->

- [Installation](#installation)
- [Local Development](#local-development)
- [Build](#build)
- [Deployment](#deployment)

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

## Installation

```bash
yarn
```

## Local Development

```bash
yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

## Build

```bash
yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

## Deployment

Using SSH:

```bash
USE_SSH=true yarn deploy
```

Not using SSH:

```bash
GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions docusaurus/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
89 changes: 89 additions & 0 deletions docusaurus/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
sidebar_position: 1
title: Poktroll
id: home-doc
slug: /
---

<div align="center">
<a href="https://www.pokt.network">
<img src="https://user-images.githubusercontent.com/2219004/151564884-212c0e40-3bfa-412e-a341-edb54b5f1498.jpeg" alt="Pocket Network logo" width="340"/>
</a>
</div>

<div>
<a href="https://discord.gg/pokt"><img src="https://img.shields.io/discord/553741558869131266"/></a>
<a href="https://github.com/pokt-network/poktroll/releases"><img src="https://img.shields.io/github/release-pre/pokt-network/pocket.svg"/></a>
<a href="https://github.com/pokt-network/poktroll/pulse"><img src="https://img.shields.io/github/contributors/pokt-network/pocket.svg"/></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg"/></a>
<a href="https://github.com/pokt-network/poktroll/pulse"><img src="https://img.shields.io/github/last-commit/pokt-network/pocket.svg"/></a>
<a href="https://github.com/pokt-network/poktroll/pulls"><img src="https://img.shields.io/github/issues-pr/pokt-network/pocket.svg"/></a>
<a href="https://github.com/pokt-network/poktroll/releases"><img src="https://img.shields.io/badge/platform-linux%20%7C%20macos-pink.svg"/></a>
<a href="https://github.com/pokt-network/poktroll/issues"><img src="https://img.shields.io/github/issues/pokt-network/pocket.svg"/></a>
<a href="https://github.com/pokt-network/poktroll/issues"><img src="https://img.shields.io/github/issues-closed/pokt-network/pocket.svg"/></a>
<a href="https://godoc.org/github.com/pokt-network/pocket"><img src="https://img.shields.io/badge/godoc-reference-blue.svg"/></a>
<a href="https://goreportcard.com/report/github.com/pokt-network/pocket"><img src="https://goreportcard.com/badge/github.com/pokt-network/pocket"/></a>
<a href="https://golang.org"><img src="https://img.shields.io/badge/golang-v1.20-green.svg"/></a>
<a href="https://github.com/tools/godep" ><img src="https://img.shields.io/badge/godep-dependency-71a3d9.svg"/></a>
</div>

# poktroll <!-- omit in toc -->

**poktroll** is a rollup built using [Rollkit](https://rollkit.dev/), [Cosmos SDK](https://docs.cosmos.network) and [CometBFT](https://cometbft.com/), created with [Ignite CLI](https://ignite.com/cli) for the Shannon upgrade of the [Pocket Network](https://pokt.network) blockchain.

This R&D effort It is the result of a research spike conducted by the Core [Pocket Network](https://pokt.network/) Protocol Team at [GROVE Inc.](https://grove.city/). We have documented our research journey [here](https://www.pokt.network/blog/pokt-network-rolling-into-the-modular-future-of-the-protocol-a-technical-deep-dive) (deep dive) and [here](https://www.pokt.network/blog/a-sovereign-rollup-and-a-modular-future) (summary).

- [Learn about Pocket Network](#learn-about-pocket-network)
- [Roadmap](#roadmap)
- [Getting Started](#getting-started)
- [Quickstart](#quickstart)
- [Godoc](#godoc)
- [Ask An AI](#ask-an-ai)
- [PNYX](#pnyx)
- [GPokT](#gpokt)
- [License](#license)

## Learn about Pocket Network

User friendly documentation on the Shannon upgrade is still a WIP, but there are
a handful of resources you can reference in the meantime:

- [Pocket Network official documentation](https://docs.pokt.network).
- [Pocket Network Morse; aka v0 (current mainnet)](https://github.com/pokt-network/pocket-core)
- [Pocket Network Protocol (outdated)](https://github.com/pokt-network/pocket-network-protocol)
- [Pocket Network V1 (deprecated)](https://github.com/pokt-network/pocket)

## Roadmap

You can find our Roadmap [here](https://github.com/orgs/pokt-network/projects/144?query=is%3Aopen+sort%3Aupdated-desc) and the roadmap changelog [here](./roadmap/roadmap_changelog.md).
Olshansk marked this conversation as resolved.
Show resolved Hide resolved

## Getting Started

### Quickstart

The best way to get involved is by following the instructions [here](./d)

### Godoc

The Godoc for the source code in this can be found at [pkg.go.dev/github.com/pokt-network/poktroll](https://pkg.go.dev/github.com/pokt-network/poktroll).

## Ask An AI

### PNYX

You can use [PNYX](https://pnyxai.com/), an AI-powered search engine that has been
trained and indexed on the Pocket Network documentation, community calls, forums
and much more!

### GPokT

You can use our chatbot, [GPokT](https://gpoktn.streamlit.app), to ask questions
about Pocket Network. Please note that it may require you to provide your own
LLM API token. If the deployed version of GPokT is down, you can deploy your own
version by following the instructions [here](https://github.com/pokt-network/gpokt).

---

## License

This project is licensed under the MIT License; see the [LICENSE](LICENSE) file for details.
8 changes: 8 additions & 0 deletions docusaurus/docs/architecture/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Architecture",
"position": 3,
"link": {
"type": "generated-index",
"description": "Documentation related to the high-level design, flows and components of the poktroll repo."
}
}
Loading
Loading