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

Create a Docusaurus documentation website #66

Merged
merged 23 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9232e1d
Create Docusaurus docs site from template
MatthewL246 Mar 26, 2024
2604bbf
Customize Docusaurus config for this project
MatthewL246 Mar 26, 2024
59abf42
Disable Docusaurus blog
MatthewL246 Mar 26, 2024
0618254
Configure docs-only mode and delete other pages
MatthewL246 Mar 26, 2024
d4eac92
Delete example docs
MatthewL246 Mar 26, 2024
bb8b0a0
Reformat docs configuration files
MatthewL246 Mar 26, 2024
700ba61
Add relevant information to docs readme
MatthewL246 Mar 26, 2024
ef0e777
Create Dependabot config for the docs
MatthewL246 Mar 26, 2024
4bc1c95
Update docs dependencies
MatthewL246 May 26, 2024
f8d5cda
Add starting the docs server to VSCode tasks
MatthewL246 May 26, 2024
ab57761
Create a Pretendo Docker .code-workspace file
MatthewL246 May 26, 2024
a45f275
Disable docusaurus custom pages
MatthewL246 May 26, 2024
777fa25
Move all of the readme documentation to the docs site
MatthewL246 May 27, 2024
475a073
Update the readme to have standard readme information
MatthewL246 May 27, 2024
be84670
Add an index to the connection setup pages
MatthewL246 May 28, 2024
31a2339
Improve the script messages if no console IP address is set
MatthewL246 May 28, 2024
06b3882
Begin updating the docs to use Docusaurus features
MatthewL246 May 28, 2024
36f7875
Create an Actions workflow for the documentation
MatthewL246 May 28, 2024
77042ee
Checkout the repository before setting up Node.js for caching
MatthewL246 May 28, 2024
7d5b1c1
Add Docusaurus temp directory caching
MatthewL246 May 28, 2024
6ce3e51
Caching the Docusaurus temp directory does not decrease the build time
MatthewL246 May 28, 2024
0a6c2fd
Delete useless docs header link
MatthewL246 May 30, 2024
3827b0a
Complete the documentation website overhaul
MatthewL246 May 30, 2024
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
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ updates:
directory: /
schedule:
interval: daily

- package-ecosystem: npm
directory: /docs
schedule:
interval: daily
61 changes: 61 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build and deploy documentation site

on:
push:
paths:
- "docs/**"
pull_request:
paths:
- "docs/**"
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Configure GitHub Pages
uses: actions/configure-pages@v5

- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: ./docs/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build the documentation site
run: npm run build

- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/build

deploy:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
concurrency:
group: github-pages
cancel-in-progress: false
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ name: Test scripts and build Docker images

on:
push:
paths-ignore:
- "docs/**"
pull_request:
paths-ignore:
- "docs/**"
workflow_dispatch:

jobs:
Expand Down
44 changes: 44 additions & 0 deletions .vscode/pretendo-docker.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"folders": [
{
"path": ".."
},
{
"path": "../docs"
},
{
"path": "../repos/account"
},
{
"path": "../repos/BOSS"
},
{
"path": "../repos/friends"
},
{
"path": "../repos/Inkay"
},
{
"path": "../repos/juxtaposition-ui"
},
{
"path": "../repos/miiverse-api"
},
{
"path": "../repos/mitmproxy-pretendo"
},
{
"path": "../repos/super-mario-maker"
},
{
"path": "../repos/website"
},
{
"path": "../repos/wiiu-chat-authentication"
},
{
"path": "../repos/wiiu-chat-secure"
}
],
"settings": {}
}
9 changes: 9 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
"isDefault": true
}
},
{
"label": "Start docs server",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}/docs"
},
"command": "npm install && npm start",
"problemMatcher": []
},
{
"label": "Build account",
"type": "shell",
Expand Down
357 changes: 34 additions & 323 deletions README.md

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions config/README.md

This file was deleted.

5 changes: 1 addition & 4 deletions console-files/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Console files

This directly includes files that need to be copied to a console to help with the connection setup process, as well as
necessary dumps.
# Console files credits

The program `ResetFriendsTestAccount.3dsx` was created by [Trace](https://github.com/TraceEntertains) (`traceentertains`
on Discord) and was originally shared in the Pretendo Network Discord server as `manual_override.3dsx`. **All credit for
Expand Down
20 changes: 20 additions & 0 deletions docs/.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*
33 changes: 33 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Pretendo Docker Documentation

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

[![Build and deploy documentation site](https://github.com/MatthewL246/pretendo-docker/actions/workflows/docs.yml/badge.svg)](https://github.com/MatthewL246/pretendo-docker/actions/workflows/docs.yml)

## [View the live site here](https://matthewl246.github.io/pretendo-docker)

## Development

### Install dependencies

```shell
npm install
```

### Start a local development server

```shell
npm 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 the site

```shell
npm run build
```

This command generates static content into the `build` directory and can be served using any static contents hosting
service.
3 changes: 3 additions & 0 deletions docs/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")],
};
43 changes: 43 additions & 0 deletions docs/docs/containers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
sidebar_position: 6
---

# Containers information

This page contains information about the various services that make up Pretendo Docker and how to administer them.

## Infrastructure

:::info

Check the `secrets.txt` file in the root of the repository to find the usernames and randomly-generated passwords needed
to authenticate with the servers.

:::

| Server | Purpose | Usage and administration |
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CoreDNS](https://coredns.io/) | DNS server for both internal container networking and external DNS resolution. It spoofs the Pretendo domains to the address of your local server. | No administration necessary. |
| [nginx](https://nginx.org/en/) | Reverse proxy and Web server. It sends HTTP requests to the right Pretendo server based on their hostname. | No administration necessary. |
| [MongoDB](https://www.mongodb.com/) | Primary database that the Pretendo account and Juxtaposition servers use to store PNIDs and Juxtaposition content. | Use Mongo Express (see below) to view the databases and perform simple edits. You can also use the `mongosh` command inside the container for more advanced administration tasks or download the [MongoDB Compass GUI](https://www.mongodb.com/products/tools/compass) for easier database editing. (Connect to `mongodb://127.0.0.1:27017/?directConnection=true`. Make sure to enable "Use direct connection".) |
| [Mongo Express](https://github.com/mongo-express/mongo-express) | Simple web GUI for MongoDB administration. | Open [127.0.0.1:8082](http://127.0.0.1:8082) in your browser with the container running. |
| [MinIO](https://min.io/) | Object store compatable with the AWS S3 API. It is used as file storage and a CDN for the Pretendo servers. Mii images, Juxtaposition screenshots, and more are uploaded here. | Open [127.0.0.1:8083](http://127.0.0.1:8083) in your browser with the container running. |
| [Redis](https://redis.io/) | Cache database used by the account server. | No administration necessary. |
| [MailDev](https://maildev.github.io/maildev/) | SMTP server used to test sending emails from the account server. Use this to view your PNID email verification code. | Open [127.0.0.1:8084](http://127.0.0.1:8084) in your browser with the container running. |
| [PostgreSQL](https://www.postgresql.org/) | Secondary database used by Friends and many game servers. | Use Adminer (see below) to view the databases and run SQL scripts. You can also download the [pgAdmin GUI](https://www.pgadmin.org/) and connect to `127.0.0.1:5432` to perform advanced administration tasks. |
| [Adminer](https://www.adminer.org/) | Web GUI for database administration, used for Postgres. | Open [127.0.0.1:8085](http://127.0.0.1:8085) in your browser with the container running. |
| [Redis Commander](https://joeferner.github.io/redis-commander/) | Web GUI for Redis database administration. | Open [127.0.0.1:8086](http://127.0.0.1:8086) in your browser with the container running. |

## Pretendo Network

| Server | Purpose |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [mitmproxy-pretendo](https://github.com/MatthewL246/mitmproxy-pretendo) | Intercepts HTTP requests from client devices and redirects them to the official Pretendo server to your local server. Uses [mitmproxy](https://mitmproxy.org) running on port 8080. |
| [account](https://github.com/PretendoNetwork/account) | The most important Pretendo server. It handles PNIDs, authentication, and tokens. |
| [website](https://github.com/PretendoNetwork/website) | Runs a local copy of the [Pretendo Network website](https://pretendo.network). Used for creating PNIDs without a console. |
| [friends](https://github.com/PretendoNetwork/friends) | Handles the Friend List applet and friendships. Juxt and other game servers use it to get friends. |
| [miiverse-api](https://github.com/PretendoNetwork/miiverse-api) | Handles Miiverse API requests from games and Miiverse portal discovery. |
| [juxtaposition-ui](https://github.com/PretendoNetwork/juxtaposition-ui) | The Miiverse applet GUI, as well as the Juxt web interface. |
| Wii U Chat ([authentication](https://github.com/PretendoNetwork/wiiu-chat-authentication) and [secure](https://github.com/PretendoNetwork/wiiu-chat-secure)) | Server for the Wii U Chat app. |
| [BOSS](https://github.com/PretendoNetwork/BOSS) | Server for BOSS (SpotPass) content. |
| [Super Mario Maker](https://github.com/PretendoNetwork/super-mario-maker) | Server for Super Mario Maker online features. |
4 changes: 4 additions & 0 deletions docs/docs/setup/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"position": 2,
"label": "Setup guide"
}
Loading
Loading