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(intro): getting started #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1,422 changes: 1,232 additions & 190 deletions docs/api/relay-oapi.yaml

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions docs/get-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
icon: material/home
---

# What is XGA?

XGA is a platform that is comprised of an Optimism based Rollup, a smart contract protocol, an Ethereum consensus layer
sidecar and a domain-specific engine called Open Games for proving/developing (game-specific) mechanisms.

<div class="grid cards" markdown>

- [**:octicons-beaker-16: Optimizing Bidding Stratagies**](#) – from a single _valuation definition_, traders can maintain or create different bidding strategies.

Check warning on line 12 in docs/get-started.md

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (Stratagies)
- [**:octicons-sync-16: State sync**](/state) – automatically synchronize the state from the server with connected clients.
- [**:octicons-server-16: Scalable**](/scalability) – built to be horizontally and/or vertically scalable
- [**:octicons-cloud-16: Cloud-agnostic**](/deployment) – you may self-host it on your own servers for free, or use our commercial [XGA Cloud](https://cloud.xga.com/) service.

</div>

---

## Getting started

Before we start, let's make sure you have the necessary system requirements installed on your local machine.

**Requirements**:

## Creating your server

Use the command below to set up a new XGA server project:

=== ":octicons-terminal-16: Terminal: Node.js"

``` bash
# Create a new XGA project
npm create xga-app@latest ./my-server

# Enter the project directory
cd my-server

# Run the server
npm start
```

=== ":octicons-terminal-16: Terminal: Bun"

``` bash
# Create a new XGA project
bunx create-xga-app@latest ./my-server

Check warning on line 48 in docs/get-started.md

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (bunx)

# Enter the project directory
cd my-server

# Install Bun transport & Run the server
bun add @xga/bun-websockets

Check warning on line 54 in docs/get-started.md

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (websockets)
bun run src/index.ts
```

---

## Next steps

- See how to connect to the XGA Rollup through one of the available [client-side SDKs](/client/).
- Implement your own [Valuation definition](/server/room) to handle your game sessions.
- Learn how to [exchange messages](/server/room/#onmessage-type-callback) between the L2 Rollup and L1 Mainnet.
- Learn how the [state synchronization](/state/) works.
- Good Hunting.
31 changes: 31 additions & 0 deletions docs/stylesheets/_.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
:root {
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
--ifm-pre-padding: 2rem;
--ifm-navbar-height: 6.5rem;
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

html[data-theme='dark'] {
--ifm-background-color: #272b33;
--ifm-navbar-background-color: var(--ifm-background-color);
--ifm-footer-background-color: var(--ifm-background-color);
}
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ markdown_extensions:

nav:
- index.md
- Quickstart: getting-started.md
- Cheat Sheet: cheatsheet.md
- Developers:
- Getting Started: Developers/index.md
Expand Down
22 changes: 22 additions & 0 deletions redocly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# See https://redocly.com/docs/cli/configuration/

extends:
- recommended

rules:
# A sample custom rule. Read more about rules: https://redocly.com/docs/cli/rules/
rule/operation-description:
subject:
type: Operation
property: description
assertions:
defined: true
minLength: 30

theme:
openapi:
generateCodeSamples:
languages:
- lang: curl
- lang: Node.js
- lang: Python
Loading