chore: Fix up the directories

Adds a basic standalone "play site" that mimics current one in apps/www.
This is so self-hosters don't need to host whole site, but can just use
small version of it.

Yet to test so marking as draft, not at home currently so may take some
time. Also might be good idea to make Caddy-powered container out of
this later?

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

- New Features
- Introduces a standalone Play site with server output, accessible on
0.0.0.0:3000.
- Streams video via WebRTC into a canvas with continuous frame
rendering.
- Fullscreen and pointer lock support with optional keyboard lock for
navigation keys.
  - Room-based routing with offline and loading states.
  - Responsive 16:9 canvas and improved default layout styling.

- Chores
- Adds a multi-stage container build for efficient runtime images and a
lightweight init process.
  - Includes configuration and project setup for the standalone package.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: DatCaptainHorse <datcaptainhorse@users.noreply.github.com>
This commit is contained in:
Kristian Ollikainen
2025-08-24 16:13:07 +03:00
committed by Wanjohi
parent 85d6fdd213
commit dc6a53e18d
155 changed files with 1519 additions and 21503 deletions

25
apps/docs/.gitignore vendored
View File

@@ -1,25 +0,0 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist
# Node dependencies
node_modules
# Logs
logs
*.log
# Misc
.DS_Store
.fleet
.idea
.vscode
# Local env files
.env
.env.*
!.env.example

View File

@@ -1,2 +0,0 @@
shamefully-hoist=true
strict-peer-dependencies=false

View File

@@ -1,49 +0,0 @@
# shadcn-docs-nuxt Minimal Starter
Starter template for [shadcn-docs-nuxt](https://github.com/ZTL-UwU/shadcn-docs-nuxt).
## Setup
Make sure to install the dependencies:
```bash
# yarn
yarn install
# npm
npm install
# pnpm
pnpm install
# bun
bun install
```
## Development Server
Start the development server on http://localhost:3000
```bash
npm run dev
```
## Production
[![Deploy to NuxtHub](https://hub.nuxt.com/button.svg)](https://hub.nuxt.com/new?repo=ZTL-UwU/shadcn-docs-nuxt-starter)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FZTL-UwU%2Fshadcn-docs-nuxt-starter)
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https%3A%2F%2Fgithub.com%2FZTL-UwU%2Fshadcn-docs-nuxt-starter)
Build the application for production:
```bash
npm run build
```
Locally preview production build:
```bash
npm run preview
```
Checkout the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.

View File

@@ -1,79 +0,0 @@
export default defineAppConfig({
shadcnDocs: {
site: {
name: 'Nestri Docs',
description: 'Beautifully designed Nuxt Content template built with shadcn-vue. Customizable. Compatible. Open Source.',
},
theme: {
customizable: false,
color: 'orange',
radius: 0.5,
},
header: {
title: 'Nestri Docs',
showTitle: true,
darkModeToggle: true,
logo: {
light: '/logo.webp',
dark: '/logo.webp',
},
nav: [{
title: 'Star on GitHub',
icon: 'lucide:star',
to: 'https://github.com/nestrilabs/nestri',
target: '_blank',
}, {
title: 'Create Issues',
icon: 'lucide:circle-dot',
to: 'https://github.com/nestrilabs/nestri/issues',
target: '_blank',
}],
links: [
{
icon: 'lucide:github',
to: 'https://github.com/nestrilabs/nestri',
target: '_blank',
}],
},
aside: {
useLevel: true,
collapse: false,
},
main: {
breadCrumb: true,
showTitle: true,
},
footer: {
credits: 'Copyright © 2025',
links: [{
icon: 'lucide:github',
to: 'https://github.com/nestrilabs/nestri',
target: '_blank',
},
{
icon: 'ri:discord-line',
to: 'https://discord.com/invite/Y6etn3qKZ3',
target: '_blank',
}],
},
toc: {
enable: true,
title: 'On This Page',
links: [{
title: 'Star on GitHub',
icon: 'lucide:star',
to: 'https://github.com/nestrilabs/nestri',
target: '_blank',
}, {
title: 'Create Issues',
icon: 'lucide:circle-dot',
to: 'https://github.com/nestrilabs/nestri/issues',
target: '_blank',
}],
},
search: {
enable: true,
inAside: false,
}
}
});

View File

@@ -1,88 +0,0 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;
--primary: 221.2 83.2% 53.3%;
--primary-foreground: 210 40% 98%;
--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;
--border:214.3 31.8% 91.4%;
--input:214.3 31.8% 91.4%;
--ring:221.2 83.2% 53.3%;
--radius: 0.5rem;
}
.dark {
--background:222.2 84% 4.9%;
--foreground:210 40% 98%;
--card:222.2 84% 4.9%;
--card-foreground:210 40% 98%;
--popover:222.2 84% 4.9%;
--popover-foreground:210 40% 98%;
--primary:217.2 91.2% 59.8%;
--primary-foreground:222.2 47.4% 11.2%;
--secondary:217.2 32.6% 17.5%;
--secondary-foreground:210 40% 98%;
--muted:217.2 32.6% 17.5%;
--muted-foreground:215 20.2% 65.1%;
--accent:217.2 32.6% 17.5%;
--accent-foreground:210 40% 98%;
--destructive:0 62.8% 30.6%;
--destructive-foreground:210 40% 98%;
--border:217.2 32.6% 17.5%;
--input:217.2 32.6% 17.5%;
--ring:224.3 76.3% 48%;
}
}
@layer utilities {
.step {
counter-increment: step;
}
.step:before {
@apply absolute w-9 h-9 bg-muted rounded-full font-mono font-medium text-center text-base inline-flex items-center justify-center -indent-px border-4 border-background;
@apply -ml-[50px] -mt-1;
content: counter(step);
}
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}

View File

@@ -1,70 +0,0 @@
<template>
<div class="py-8">
<h2 class="text-3xl lg:text-4xl font-bold mb-12 text-gray-900 dark:text-white">
Contributors made <span class="text-orange-500">Nestri</span>
</h2>
<div class="grid grid-cols-4 sm:grid-cols-5 md:grid-cols-8 gap-4 sm:gap-5 lg:gap-6">
<div
v-for="(contributor, index) in contributors"
:key="index"
class="pt-[100%] relative"
>
<NuxtLink
v-if="contributor.login"
:key="contributor.login"
:to="`https://github.com/${contributor.login}`"
class="absolute inset-0 flex transition-all"
:style="{
'transition-delay': `${(index % 8 + Math.floor(index / 8)) * 20}ms`
}"
>
<UTooltip class="w-full text-orange-500" :text="contributor.login">
<img
:src="contributor.avatar_url"
provider="ipx"
densities="x1 x2"
height="80px"
width="80px"
:alt="contributor.login"
loading="lazy"
class="rounded-xl w-full h-full transition lg:hover:scale-110"
/>
</UTooltip>
<span class="inline-block rounded-t px-1 bg-gray-950 dark:bg-white text-white dark:text-gray-950 absolute -bottom-2 right-0 font-medium text-sm">
<span class="font-light text-xs text-gray-400">#</span>{{ index + 1 }}
</span>
</NuxtLink>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue'
const contributors = ref([])
// Fetch contributors data from GitHub without authentication
const fetchContributors = async () => {
try {
const response = await fetch('https://api.github.com/repos/nestriness/nestri/contributors')
if (!response.ok) throw new Error('Failed to fetch contributors')
contributors.value = await response.json()
} catch (error) {
console.error('Error fetching contributors:', error)
}
}
// Fetch contributors when component is mounted
onMounted(fetchContributors)
</script>
<style>
:hover.
</style>

View File

@@ -1,15 +0,0 @@
<template>
<div>
<NuxtLink v-if="logo.light && logo.dark" class="flex">
<img :src="logo.light" class="h-7 dark:hidden" />
<img :src="logo.dark" class="hidden h-7 dark:block" />
<span v-if="showTitle && title" class="ml-3 self-center font-bold">
{{ title }}
</span>
</NuxtLink>
</div>
</template>
<script setup lang="ts">
const { logo, title, showTitle } = useConfig().value.header;
</script>

View File

@@ -1,25 +0,0 @@
---
title: What is Nestri?
description: Learn about Nestri, an open-source, self-hostable cloud gaming platform that gives you full control over your gaming server, streaming, and setup.
icon: 'lucide:gamepad'
---
Nestri is a self-hosted cloud gaming platform that enables you to spin up dedicated gaming sessions remotely and play your own games from any device with a browser. Unlike remote desktop solutions like Parsec, which focus on streaming a desktop environment, Nestri is designed specifically for cloud gaming. It works similarly to services like NVIDIA GeForce Now, allowing you to enjoy high-performance gaming without needing to be physically near your gaming PC.
The key difference with Nestri is that its open-source and can be self-hosted, so you have full control over the server, the games you install, and the entire setup. Nestri is ideal for gamers who prioritize privacy, flexibility, and control, offering a way to manage your own gaming infrastructure rather than relying on third-party services. As long as you have a stable internet connection and access to a web browser, you can game from virtually anywhere.
## Nestri Architecture
Nestri is composed of the following key components:
#### Nestri Node
The **Nestri Node** (also referred to as *Instance*) is the core of your Nestri setup. It acts as the game server where you install and run your games. The Nestri Node streams gameplay from the machine its installed on, allowing you to access your games remotely. It runs on most Linux-based systems and major vendor's GPUs (Intel, AMD, NVIDIA).
**Nestri Node** runs within a container, which isolates it from the host system, keeping the host environment clean and secure. This containerization also allows for easy updates, management and recovery of your gaming environment.
#### Nestri Relay
The **Nestri Relay** is responsible for taking the audio-video stream from your **Nestri Node** and sending that forward to the device you're gaming on with minimal latency. This is essentially a WebRTC SFU (Selective Forwarding Unit) that splits single incoming stream to multiple potential players, allowing multiple devices to connect to the same game session without overwhelming the **Nestri Node** with multiple outgoing streams.
**Nestri Relay** runs within a container, similar to the **Nestri Node**, and can be deployed on the same machine or a different one.

View File

@@ -1,56 +0,0 @@
---
title: FAQ
description: Got questions about Nestri? This FAQ covers everything from pricing and setup to game compatibility and system requirements. Whether you're exploring the free self-hosted version, the Bring Your Own GPU (BYOG) option, or the hosted service, youll find all the details here.
icon: 'lucide:message-circle-question'
---
## Is Nestri free?
Yes! Nestri offers three options: a free, self-hosted version, a free and paid **Bring Your Own GPU (BYOG)** version, and a paid, hosted version.
- **Self-Hosted Version (Free):**
If you have your own server, you can install and run Nestri for free. Since Nestri is open-source, you have full access to the codebase, allowing for transparency and flexibility in your setup.
- **Bring Your Own GPU (BYOG):**
With BYOG, you can use your own server with a GPU to play your games while avoiding the hassle of setting up relays, web interfaces, port forwarding, and other technical configurations. BYOG is available in both a free and a paid package:
- The **Free BYOG package** lets you get started with basic functionality.
- The **Paid BYOG package** unlocks exclusive features only available in BYOG and Hosted versions.
- **[Hosted Version (Paid)](https://nestri.io/pricing):**
The hosted version of Nestri operates similarly to services like NVIDIA GeForce Now. With a subscription, you can play your games on Nestris infrastructure without needing any technical knowledge—just sign up, log in, and start gaming!
## Does Nestri require a high-speed internet connection?
Yes, a stable and fast internet connection is essential for a smooth gaming experience. While you dont need extremely high speeds (like 1 Gbps fiber), low latency is critical. Since cloud gaming is sensitive to delay, your device needs to connect to one of our relays with minimal lag. Ensuring a strong, stable network connection close to a relay server is important to avoid delays in gameplay, especially during fast-paced action sequences.
## Where are Nestris relays located?
Currently, we have one relay deployed in Helsinki, Finland. As we grow, we plan to add more relays to reduce latency and improve connection quality for users in different regions. Our next planned relay is in Copenhagen, Denmark. Since were a startup with a limited budget, well continue to roll out more relays as demand grows and more users join the platform.
## Is Nestri like Parsec?
No, Nestri is not like Parsec, which is used to access and game on an existing desktop remotely. Nestri is a server application designed specifically for cloud gaming. Rather than connecting to a physical Windows desktop, Nestri runs your games within a Docker or Podman container, allowing you to play remotely without needing to access a traditional desktop environment.
## Do I need a high-end server with a 4090 GPU and a 64-core CPU?
Not necessarily! Nestri doesnt have strict hardware requirements in terms of having the latest or most powerful CPU or GPU. Just as with traditional gaming, better hardware will enhance your experience with improved graphics and higher FPS. The exact specs you need will depend on the games you want to play and the performance youre aiming for. Keep in mind that, because Nestri has to use a GPU to encode the game stream for lowest possible latency, there will be a bit of additional processing required.
## Do you have an app for phone or TV?
Not yet! At the moment, we dont have a dedicated app. However, since the Nestri interface works on most devices with a Chromium-based browser, you can play your games that way on your phone, TV, or other devices.
Were actively working on developing an app that will make it even easier to play your games on mobile, your TV, or install a client directly on your PC. Stay tuned for updates!
## Do I need to port forward to use Nestri?
No! If youre using Nestri BYOG, you wont need to port forward anything on your router or firewall.
Since Nestri is built with WebRTC, the Nestri node connects directly with the client via our relays. All you need to do is install Nestri on your server and start your game through our web interface — no complicated networking setup required!
## What games can I play on Nestri?
Currently, Nestri only supports Steam games that are compatible with Proton, as Nestri is Linux-based.
When you launch Nestri, youll have access to Steam Big Picture mode, just like on your PC. You can check which games are supported by Proton and their ratings on [ProtonDB](https://www.protondb.com/).
This ensures a smooth gaming experience for a wide range of titles, and were continually working to expand compatibility!
## Do I need my own server?
No! We also offer a **[Hosted version](https://nestri.io/pricing)**, where you can use our infrastructure. All you need to do is start your game through our interface, and well handle the rest.
If you dont have your own physical server, you can also run Nestri in the cloud. Simply use a dedicated server with a GPU or platforms like AWS, Digital Ocean, or similar services that offer GPU solutions.
Whether you prefer using your own setup or a hassle-free hosted solution, Nestri has you covered!

View File

@@ -1,3 +0,0 @@
title: Getting started
icon: lucide:rocket
navigation.redirect: /introduction/what-is-nestri

View File

@@ -1,7 +0,0 @@
---
title: What is Nestri Node?
description: What is Nestri Node and how does it powers the Nestri eco-system and your self-hosted cloud gaming experience.
icon: 'lucide:message-circle-question'
---
**Nestri Node** is the core component of Nestri's self-hosted cloud-gaming solution. It is the actual server where you install your games. Once set up, you can stream and play your games remotely from any compatible device. It runs on most Linux-based systems and requires a NVIDIA, AMD or Intel graphics card.

View File

@@ -1,27 +0,0 @@
---
title: Prerequisites
description: Essential system and software requirements for setting up Nestri on your server, including GPU compatibility, OS recommendations, and necessary configurations.
icon: 'lucide:check-circle'
---
To run Nestri on your own server, there are several essential preparations required before installing Nestri Node. This page outlines the key requirements to get Nestri up and running smoothly.
Nestri Node supports AMD, NVIDIA, and Intel graphics cards.
While it might be tempting to skip this setup, we advise against it. Taking the time to prepare now will help you avoid potential issues and wasted hours later.
## Recommended host configuration
::list{type="primary"}
- **AMD, NVIDIA or Intel GPU**
- **CPU with AVX2 support**
- **Fedora or Arch** based distribution
::
## Software Requirements
::list{type="primary"}
- **GPU Drivers** (if not provided by the kernel)
- **Podman or Docker** (Podman is recommended for better compatibility)
::

View File

@@ -1,72 +0,0 @@
---
title: Getting Started
description: Follow this guide to set up and run your own Nestri Node for cloud gaming.
icon: 'lucide:message-circle-question'
---
::alert{type="danger"}
Nestri is in a **very early phase**, so errors and bugs may occur.
::
::alert{type="info"}
You can pull the docker image from GitHub Container Registry with:
```bash [pull image command]
podman pull ghcr.io/nestrilabs/nestri/runner:nightly
```
::
### Step 1: Create a home directory for your Nestri Node
This will be the directory where Steam, games and other persistent files will be saved.
You may use any directory you like, but for simplicity, we will use `~/nestri` as the home directory in this guide.
```bash [create home directory command]
mkdir -p ~/nestri
sudo chmod 777 ~/nestri
```
The above will create a directory called `nestri` in your home directory and set the permissions to allow read, write, and execute for all users.
This is important for the Nestri Node to function properly.
### Step 2: Launch the Nestri Runner
With your home directory ready, insert it into the command below, replacing `<relay_url>` with the relay's URL you want to use.
You will also need to replace `<room_name>` with an unique name for the room you will be using to play your games.
```bash [run container (nvidia)]
podman run --replace -d --name=nestri --shm-size=6g --cap-add=SYS_NICE --device /dev/dri/ -e RELAY_URL='<relay_url>' -e NESTRI_ROOM='<room_name>' -e RESOLUTION=1920x1080 -e FRAMERATE=60 -e NESTRI_PARAMS='--verbose=true --dma-buf=true --audio-rate-control=cbr --video-codec=h264 --video-rate-control=cbr --video-bitrate=8000' -v ~/nestri:/home/nestri --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device /dev/nvidiactl --device /dev/nvidia0 --device /dev/nvidia-modeset ghcr.io/nestrilabs/nestri/runner:nightly
```
```bash [run container (amd/intel)]
podman run --replace -d --name=nestri --shm-size=6g --cap-add=SYS_NICE --device /dev/dri/ -e RELAY_URL='<relay_url>' -e NESTRI_ROOM='<room_name>' -e RESOLUTION=1920x1080 -e FRAMERATE=60 -e NESTRI_PARAMS='--verbose=true --dma-buf=true --audio-rate-control=cbr --video-codec=h264 --video-rate-control=cbr --video-bitrate=8000' -v ~/nestri:/home/nestri ghcr.io/nestrilabs/nestri/runner:nightly
```
### Step 3: Begin Playing
Finally, construct the play URL with your room name and relay URL:
`https://nestri.io/play/<room_name>?peerURL=<relay_url>`
Navigate to this URL in your browser, click on the button to capture your mouse pointer and keyboard, and start playing!
### Stop the Nestri Container
If you want to stop the Nestri container, you can use the following command:
```bash [stop container command]
podman stop nestri
```
### Start the Nestri Container
If you want to start the Nestri container after stopping it, you can use the following command:
```bash [start container command]
podman start nestri
```
### Remove the Nestri Container
To remove the container, you can use the following command:
```bash [remove container command]
podman rm nestri
```
### Update Nestri Container
To update the Nestri container, you can use the following command:
```bash [update container command]
podman pull ghcr.io/nestrilabs/nestri/runner:nightly
```
After which, you can recreate the container with the latest image using the same command you used in Step 2.

View File

@@ -1 +0,0 @@
# Troubleshooting

View File

@@ -1,36 +0,0 @@
---
title: Container CLI
description: Configure and manage your Nestri container environment using CLI parameters for relay settings, video resolution, GPU selection, and encoding options.
icon: 'lucide:terminal'
---
The Container CLI for Nestri provides parameters to configure and manage your container environment. Use these options to set values like `relay-url`, `video resolution`, and `frame rate`. Additionally, activate `verbose` mode and logging to assist in debugging and error tracking. This documentation details each parameter to help you optimize your container setup effectively
| **Parameter** | **Type** | **Default** | **Description** |
|--------------------------|----------|-------------|-----------------------------------------------------------------------------------|
| `-v, --verbose` | `string` | false | Enable verbose output. Set to `true` for detailed logs. |
| `-d, --debug` | `string` | false | Enable additional debugging features. Set to `true` for extra debug information. |
| `-u, --relay-url` | `string` | | Nestri relay URL. Specify the URL for the Nestri relay server. |
| `-r, --resolution` | `string` | 1280x720 | Display/stream resolution in 'WxH' format. Default is 1280x720. |
| `-f, --framerate` | `string` | 60 | Display/stream framerate. Default is 60 FPS. |
| `--room` | `string` | | Nestri room name/identifier. Specify the room for your Nestri session. |
| `-g, --gpu-vendor` | `string` | | GPU vendor to use (e.g., NVIDIA, AMD, Intel). |
| `-n, --gpu-name` | `string` | | GPU name to use. Specify the exact GPU model. |
| `-i, --gpu-index` | `string` | -1 | GPU index to use. Default is -1 (auto-select). |
| `--gpu-card-path` | `string` | | Force a specific GPU by `/dev/dri/` card or render path. |
| `-c, --video-codec` | `string` | h264 | Preferred video codec. Options: h264, h265, av1. Default is h264. |
| `--video-encoder` | `string` | | Override video encoder (e.g., `nvenc`, `libx264`). |
| `--video-rate-control` | `string` | cbr | Rate control method. Options: cqp, vbr, cbr. Default is cbr. |
| `--video-cqp` | `string` | 26 | Constant Quantization Parameter (CQP) quality. Default is 26. |
| `--video-bitrate` | `string` | 6000 | Target bitrate in kbps. Default is 6000 kbps. |
| `--video-bitrate-max` | `string` | 8000 | Maximum bitrate in kbps. Default is 8000 kbps. |
| `--video-encoder-type` | `string` | hardware | Encoder type. Options: software, hardware. Default is hardware. |
| `--audio-capture-method` | `string` | pulseaudio | Audio capture method. Options: pulseaudio, pipewire, alsa. Default is pulseaudio. |
| `--audio-codec` | `string` | opus | Preferred audio codec. Default is opus. |
| `--audio-encoder` | `string` | | Override audio encoder (e.g., `opusenc`). |
| `--audio-rate-control` | `string` | cbr | Audio rate control method. Options: cqp, vbr, cbr. Default is cbr. |
| `--audio-bitrate` | `string` | 128 | Target audio bitrate in kbps. Default is 128 kbps. |
| `--audio-bitrate-max` | `string` | 192 | Maximum audio bitrate in kbps. Default is 192 kbps. |
| `--dma-buf` | `string` | false | Use DMA-BUF for pipeline. Set to `true` to enable DMA-BUF support. |
| `-h, --help` | | | Print help information for the CLI parameters. |

View File

@@ -1,14 +0,0 @@
---
title: Node FAQ
description: This FAQ is made to address common questions about Nestri Node, the container which runs your games. Whether you're curious about compatibility, setup, or performance, you'll find answers to help you get started.
icon: 'lucide:info'
---
## Can I run Nestri Node on Debian/Ubuntu?
Yes, this is now possible, but not recommended due to several issues from those distributions.
## Can I run Nestri Node in a virtualized environment like Proxmox?
Yes, you can run Nestri Node in a virtualized environment, provided you passthrough your GPU to the virtual machine.
## Can I run Nestri Node on Windows-based systems?
No, the Nestri Node service does not support Windows-based systems. It can only be deployed on Linux-based systems.

View File

@@ -1,36 +0,0 @@
---
title: Developer Notes and Tips
description: This is a collection of developer notes for Nestri Node.
icon: 'lucide:wrench'
---
### Construct The Nestri Runner Docker Image
Checkout your branch with the latest version of nestri and build the image `<your-nestri-image>` within git root folder:
```bash [build docker image command]
podman build -t <your-nestri-image>:latest -f containers/Containerfile.runner .
```
### Running other applications besides Steam
When you followed the getting started guide, you already have a container running. You can get into your container to start your games or other applications:
```bash [get into container command]
podman exec -it nestri /bin/bash
```
For most games that are not DRM free you need a launcher. In this case use the umu launcher:
```bash [install umu and mangohud command]
pacman -S umu-launcher
```
You have to execute your game with the nestri user. If you have a linux game execute it like so:
```bash [execute game command]
su nestri
source /etc/nestri/envs.sh
GAMEID=0 PROTONPATH=GE-Proton mangohud umu-run <your-game.exe>
```
You could also use other launchers like Lutris to run other games.
::alert{type="danger"}
**Warning:** Running other applications besides Steam is not supported and may cause issues. We cannot provide support for this.
::

View File

@@ -1,3 +0,0 @@
title: Nestri Node
navigation.redirect: /nestri-node/what-is-nestri-node
icon: lucide:box

View File

@@ -1,8 +0,0 @@
---
title: What is Nestri Relay?
description: This FAQ is made to address common questions about Nestri Node, the container which runs your games. Whether you're curious about compatibility, setup, or performance, you'll find answers to help you get started.
icon: 'lucide:info'
---
Nestri Relay is an essential component in the Nestri cloud-gaming ecosystem, responsible for taking the audio-video stream from your Nestri Node and further forwarding that to the device youre playing on.
It is built using WebRTC, for lowest latency streaming.

View File

@@ -1,166 +0,0 @@
## Should I Self-Host a Nestri Relay?
If you want to use and enjoy the simplicity of the Nestri ecosystem, then you should not set up the Nestri Relay locally. Our free BYOG (Bring Your Own GPU) plan includes free shared relay access, which we highly recommend for those who want to start playing quickly on their own hardware without additional setup.
However, if you prefer to install and manage the Nestri Relay yourself, there are some important considerations to keep in mind.
### Important Considerations for Self-Hosting Nestri Relay
1. WebRTC and Firewall Issues
* WebRTC, by default, attempts to access your public IP even if both the relay and Nestri Node are on the same local network.
* This behavior can cause firewalls to block traffic, as the connection may attempt to access itself, resulting in connection failures.
* Unordered Third
2. Recommended Deployment Strategy
* Instead of hosting the relay on your local network, we strongly recommend deploying the Nestri Relay on a VPS (Virtual Private Server) in the cloud.
* Using a cloud-based VPS minimizes potential firewall conflicts and ensures a more stable connection between your Nestri Node and the relay.
If you're set on self-hosting despite the potential challenges, proceed with caution and ensure you have a proper understanding of firewall configurations and networking setups to mitigate connectivity issues.
## Self-hosted Nestri Relay
For those who prefer full control over the Nestri stack, it is possible to self-host the Nestri Relay. However, setting this up can be a bit complex, as it requires SSL Certificates for secure communication between your Nestri Node and your gaming devices. There are three main options:
- **Let's Encrypt Certificate**: This is the most common certificates for self-hosting and requires a domain name. You can generate a certificate using tools like **certbot** or **acme.sh**. Let's Encrypt provides free SSL certificates that are trusted by most browsers and are relatively straightforward to set up.
- **Purchased SSL Certificate**: The **easiest option** for most users is to buy an SSL certificate from a trusted Certificate Authority (CA). This option eliminates much of the hassle involved with certificate generation and renewals, as these certificates are already trusted by browsers and dont require as much manual setup.
While self-hosting offers more flexibility, most users will find the **Nestri-hosted Relay** to be the easiest and most reliable option for getting started with cloud gaming on Nestri. This hosted relay is available to everyone using the BYOG package and requires no configuration.
## Prerequisites
1. **Server Requirements:**
- Ensure **port 443** is open for both **TCP and UDP** (`:443/udp & :443/tcp`).
- The server should have at least **6-8GB RAM** and **2 vCPUs**.
- Supports both ARM or AMD64 architecture.
2. **Software Requirements:**
- Docker and `docker-compose` must be installed on the server. You can use [this installation script](https://github.com/docker/docker-install) to set up Docker.
- Git must be installed to clone the necessary repository.
3. **Certificates:**
- You will need both private and public SSL certificates. It is recommended to use certificates from a **trusted Certificate Authority** (CA), either by using **Let's Encrypt** or purchasing a commercial SSL certificate, for secure communication. Avoid using self-signed certificates, as they can lead to compatibility issues and security warnings in browsers.
## Self-hosted Nestri Relay with an Reverse Proxy
### Caddy
As caddy user you can use the following docker-compose.yml file:
```yaml [docker-compose.caddy.yml]
services:
caddy:
image: caddy:latest
container_name: caddy
ports:
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile # your caddyfile
- ./cert:/etc/caddy/certs
depends_on:
- relay
networks:
- relay_network
restart: unless-stopped
relay:
#image: ghcr.io/nestrilabs/nestri/relay:nightly # Offical relay image
image: ghcr.io/datcaptainhorse/nestri-relay:latest # Most current relay image
container_name: relay
environment:
#- AUTO_ADD_LOCAL_IP=false # use with WEBRTC_NAT_IPS
#- WEBRTC_NAT_IPS=1.2.3.4 # Add the LAN IP of your container here if connections fail
- VERBOSE=true
- DEBUG=true
ports:
- "8088:8088/udp"
networks:
- relay_network
restart:
unless-stopped
networks:
relay_network:
driver: bridge
```
The Caddyfile should look like this:
```caddyfile [Caddyfile]
relay.example.com {
@ws {
header Connection Upgrade
header Upgrade websocket
}
tls you@example.com
reverse_proxy @ws relay:8088
reverse_proxy relay:8088
}
```
Please modify it to your needs and replace the placeholder values with your own.
You should also setup the Caddyfile to match your domain.
### Traefik
As traefik user you can use the following docker-compose.yml file:
```yaml [docker-compose.relay.traefik.yml]
services:
traefik:
image: "traefik:v2.3"
restart: always
container_name: "traefik"
networks:
- traefik
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.network=traefik"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entrypoint.to=web-secure"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
- "--entrypoints.web-secure.address=:443"
- "--certificatesresolvers.default.acme.tlschallenge=true"
- "--certificatesresolvers.default.acme.email=foo@example.com" # Your email for tls challenge
- "--certificatesresolvers.default.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
volumes:
- "./letsencrypt:/letsencrypt" # Your letsencrypt folder for certificate persistence
- "/var/run/docker.sock:/var/run/docker.sock:ro"
restart:
unless-stopped
relay:
#image: ghcr.io/nestrilabs/nestri/relay:nightly # Offical relay image
image: ghcr.io/datcaptainhorse/nestri-relay:latest # Most current relay image
container_name: relay
environment:
- AUTO_ADD_LOCAL_IP=false # Use with WEBRTC_NAT_IPS
#- WEBRTC_NAT_IPS=1.2.3.4 # Add the LAN IP of your container here if connections fail
- VERBOSE=true
- DEBUG=true
ports:
- "8088:8088/udp"
networks:
- traefik
restart:
unless-stopped
labels:
- traefik.enable=true
- traefik.http.routers.relay.rule=Host(`relay.example.com`) # Your domain for tls challenge
- traefik.http.routers.relay.tls=true
- traefik.http.routers.relay.tls.certresolver=default
- traefik.http.routers.relay.entrypoints=web-secure
- traefik.http.services.relay.loadbalancer.server.port=8088
networks:
traefik:
external: true
```
Please modify it to your needs and replace the placeholder values with your own.
### Where to find the relay compose files?
You will also find the relay compose files in our [github repository](https://github.com/nestrilabs/nestri/tree/main/containers).

View File

@@ -1,25 +0,0 @@
---
title: Container CLI
description: Configure and manage your Nestri Relay environment using CLI parameters for WebRTC settings, STUN servers, local IP handling, and TLS options.
icon: 'lucide:terminal'
---
The Nestri Relay CLI provides configuration parameters to manage your relay environment. These options allow you to set values like `WebRTC ports`, `STUN servers`, and `TLS certificates`. Additionally, you can enable `verbose` mode and debugging for troubleshooting purposes. This documentation details each parameter to help you optimize your relay setup effectively.
## Parameters
| **Parameter** | **Type** | **Default** | **Description** |
|----------------------------------|-----------|------------------------------------|------------------------------------------------------------------------------------------------------|
| `-v, --verbose` | `boolean` | false | Shows more logs; useful for debugging issues. Recommended before reporting problems. |
| `-d, --debug` | `boolean` | false | Enables debugging mode for additional logs and troubleshooting insights. |
| `-p, --endpointPort` | `integer` | 8088 | Specifies the main port for the relay endpoint. |
| **WebRTC Settings** | | | |
| `--webrtcUDPStart` | `integer` | 10000 | Defines the starting UDP port for WebRTC connections. |
| `--webrtcUDPEnd` | `integer` | 20000 | Defines the ending UDP port for WebRTC connections. |
| `--webrtcUDPMux` | `integer` | 8088 | Specifies the WebRTC UDP multiplexing port. |
| `--stunServer` | `string` | stun.l.google.com:19302 | Defines the STUN server address for NAT traversal. |
| `--autoAddLocalIP` | `boolean` | true | Automatically adds local IP addresses to WebRTC candidates. |
| `--WEBRTC_NAT_IPS` | `string` | "" | Comma-separated list of public IPs for WebRTC NAT traversal (e.g., `"192.168.0.1,192.168.0.2"`). |
| **TLS Configuration** | | | |
| `--tlsCert` | `string` | "" | Path to the TLS certificate file for secure connections. |
| `--tlsKey` | `string` | "" | Path to the TLS private key file for secure connections. |

View File

@@ -1,3 +0,0 @@
title: Nestri Relay
navigation.redirect: /nestri-relay/what-is-nestri-relay
icon: lucide:box

View File

@@ -1,30 +0,0 @@
---
title: Home
navigation: false
---
::hero
---
announcement:
title: 'We are launching soon!'
icon: '🎉'
to: https://github.com/nestrilabs/nestri/releases/latest
target: _blank
actions:
- name: Documentation
to: /introduction/what-is-nestri
- name: GitHub
variant: outline
to: https://github.com/nestrilabs/nestri
leftIcon: 'lucide:github'
---
#title
Welcome to Nestri Docs
#description
Play your favorite games on the go or with your friends on your own game cloud.
::
::contributors
::

View File

@@ -1,6 +0,0 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
extends: ['shadcn-docs-nuxt'],
compatibilityDate: '2024-07-06',
});

15358
apps/docs/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,18 +0,0 @@
{
"name": "shadcn-docs-nuxt-starter",
"private": true,
"type": "module",
"scripts": {
"nestri.dev": "nuxi dev",
"build": "nuxi build --preset=cloudflare_pages",
"generate": "nuxi generate",
"preview": "nuxi preview",
"lint": "eslint ."
},
"dependencies": {
"nuxt": "^3.15.4",
"shadcn-docs-nuxt": "^0.8.14",
"vue": "^3.5.13",
"vue-router": "^4.5.0"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 68 52" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><use id="Hintergrund" xlink:href="#_Image1" x="0" y="0" width="90px" height="69px" transform="matrix(0.992647,0,0,0.995192,0,0)"/><defs><image id="_Image1" width="68px" height="52px" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAAA0CAYAAAAzMZ5zAAAACXBIWXMAAA7EAAAOxAGVKw4bAAACxElEQVRoge1aTa7UMAz+HAxCIJBYIBachBuwgj0n5TIc4C3fSE9saPwW03Yc122TUWfaF/JJI02TL67j+qdNQv9+vn5EDxIAEIA6BMi5UbAAWup8kWAAH/dW4kgIwx9a9IT/B6wNEQQQWokSUWFSX8SAk+kTAMS9dDkEGNQBGEImgGA8pEIvWAKP1QQESAQICBDEGUsEt7UeXOY3JhMvg9D4k55Raw7mZGZOqRECSCVSUZwaKxNPHjXZCxs6OmjqS8DTlFDhUy8Bz1eRpZxikBM7slKutpBRIsvK68dMDCIJT87dnh4CxKE9S88VJbeQUSTLyOvHMASnRBYpA2vBS7pcy9dj5oqb7VuziX6RytVn6CeAIfR92mME5wgt4UuGplbeGMFrj39D/RsaGtZA8oPe763EkcAAHvZW4khgAM1DFGr/mi9GM4hBM4hBM4hBM4hBM4hBM4hBM4gBu63XrF6tjTka344ZVsyiN7B09eoWfBJ/IWkr/oxOHLxV93utmF2xonVrPj+8/fSUdJAAiL0wJSVxScf8ZLav1viQ1K1L+dC78lvwAVAEn968+zIV1PX/9b6Lyr/i5GKKN+YLgE413Jrf0NCQAfrz6+u3tGkl1oA+/g0kYHbfdxM+AXiVwbdj9f40meSt7k8dAAF//vv4+zLQCBC72T3sedgDEdRP0KtzOtvLHfj6vzHGWGm8Tfx4rjIfuid1CnHOO4K5GaZPcfLE+5vsws+pXlZWB5CAu+TNbOZ4w3h+1XsSlqcuNuVLAT93TlpWBCDgxHHEE0QY67PM3XS4jun1pnxy+Jo382mwOCcyPHEOzEwUyt3wjFaT/fjZc5rK8792r0bpbvGt+eXy2nqIAU/Lz7LV6jtVlsL7yrm/FgdCCxmDJKleXkl6L3FW00LuwbcXimUPqXzyHlrIGHCQcEqbnNfmqDylcqd5BirQM2zm+G7BAAAAAElFTkSuQmCC"/></defs></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

View File

@@ -1,88 +0,0 @@
import animate from 'tailwindcss-animate';
export default {
darkMode: 'class',
safelist: ['dark'],
prefix: '',
content: [
'./content/**/*',
],
theme: {
container: {
center: true,
padding: '2rem',
screens: {
'2xl': '1400px',
},
},
extend: {
colors: {
border: 'hsl(var(--border))',
input: 'hsl(var(--input))',
ring: 'hsl(var(--ring))',
background: 'hsl(var(--background))',
foreground: 'hsl(var(--foreground))',
primary: {
DEFAULT: 'hsl(var(--primary))',
foreground: 'hsl(var(--primary-foreground))',
},
secondary: {
DEFAULT: 'hsl(var(--secondary))',
foreground: 'hsl(var(--secondary-foreground))',
},
destructive: {
DEFAULT: 'hsl(var(--destructive))',
foreground: 'hsl(var(--destructive-foreground))',
},
muted: {
DEFAULT: 'hsl(var(--muted))',
foreground: 'hsl(var(--muted-foreground))',
},
accent: {
DEFAULT: 'hsl(var(--accent))',
foreground: 'hsl(var(--accent-foreground))',
},
popover: {
DEFAULT: 'hsl(var(--popover))',
foreground: 'hsl(var(--popover-foreground))',
},
card: {
DEFAULT: 'hsl(var(--card))',
foreground: 'hsl(var(--card-foreground))',
},
},
borderRadius: {
xl: 'calc(var(--radius) + 4px)',
lg: 'var(--radius)',
md: 'calc(var(--radius) - 2px)',
sm: 'calc(var(--radius) - 4px)',
},
keyframes: {
'accordion-down': {
from: { height: '0' },
to: { height: 'var(--radix-accordion-content-height)' },
},
'accordion-up': {
from: { height: 'var(--radix-accordion-content-height)' },
to: { height: '0' },
},
'collapsible-down': {
from: { height: '0' },
to: { height: 'var(--radix-collapsible-content-height)' },
},
'collapsible-up': {
from: { height: 'var(--radix-collapsible-content-height)' },
to: { height: '0' },
},
},
animation: {
'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out',
'collapsible-down': 'collapsible-down 0.2s ease-in-out',
'collapsible-up': 'collapsible-up 0.2s ease-in-out',
},
},
},
plugins: [animate],
};

View File

@@ -1,4 +0,0 @@
{
// https://v3.nuxtjs.org/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}

View File

@@ -1,38 +0,0 @@
**/*.log
**/.DS_Store
*.
.vscode/settings.json
.history
.yarn
bazel-*
bazel-bin
bazel-out
bazel-qwik
bazel-testlogs
dist
dist-dev
lib
lib-types
etc
external
node_modules
temp
tsc-out
tsdoc-metadata.json
target
output
rollup.config.js
build
.cache
.vscode
.rollup.cache
dist
tsconfig.tsbuildinfo
vite.config.ts
*.spec.tsx
*.spec.ts
.netlify
pnpm-lock.yaml
package-lock.json
yarn.lock
server

View File

@@ -1,42 +0,0 @@
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:qwik/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
ecmaVersion: 2021,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
plugins: ["@typescript-eslint"],
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/ban-ts-comment": "off",
"prefer-spread": "off",
"no-case-declarations": "off",
"no-console": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/no-unnecessary-condition": "warn",
},
};

48
apps/www/.gitignore vendored
View File

@@ -1,48 +0,0 @@
# Build
/dist
/lib
/lib-types
/server
# Development
node_modules
*.local
# Cache
.cache
.mf
.rollup.cache
tsconfig.tsbuildinfo
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
# Editor
.vscode/*
!.vscode/launch.json
!.vscode/*.code-snippets
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# Yarn
.yarn/*
!.yarn/releases
# Cloudflare
functions/**/*.js
#Typescript
*.tsbuildinfo
tmp

View File

@@ -1,37 +0,0 @@
**/*.log
**/.DS_Store
*.
.vscode/settings.json
.history
.yarn
bazel-*
bazel-bin
bazel-out
bazel-qwik
bazel-testlogs
dist
dist-dev
lib
lib-types
etc
external
node_modules
temp
tsc-out
tsdoc-metadata.json
target
output
rollup.config.js
build
.cache
.vscode
.rollup.cache
tsconfig.tsbuildinfo
vite.config.ts
*.spec.tsx
*.spec.ts
.netlify
pnpm-lock.yaml
package-lock.json
yarn.lock
server

View File

@@ -1,112 +0,0 @@
# Qwik City App ⚡️
- [Qwik Docs](https://qwik.dev/)
- [Discord](https://qwik.dev/chat)
- [Qwik GitHub](https://github.com/QwikDev/qwik)
- [@QwikDev](https://twitter.com/QwikDev)
- [Vite](https://vitejs.dev/)
---
## Project Structure
This project is using Qwik with [QwikCity](https://qwik.dev/qwikcity/overview/). QwikCity is just an extra set of tools on top of Qwik to make it easier to build a full site, including directory-based routing, layouts, and more.
Inside your project, you'll see the following directory structure:
```
├── public/
│ └── ...
└── src/
├── components/
│ └── ...
└── routes/
└── ...
```
- `src/routes`: Provides the directory-based routing, which can include a hierarchy of `layout.tsx` layout files, and an `index.tsx` file as the page. Additionally, `index.ts` files are endpoints. Please see the [routing docs](https://qwik.dev/qwikcity/routing/overview/) for more info.
- `src/components`: Recommended directory for components.
- `public`: Any static assets, like images, can be placed in the public directory. Please see the [Vite public directory](https://vitejs.dev/guide/assets.html#the-public-directory) for more info.
## Add Integrations and deployment
Use the `bun qwik add` command to add additional integrations. Some examples of integrations includes: Cloudflare, Netlify or Express Server, and the [Static Site Generator (SSG)](https://qwik.dev/qwikcity/guides/static-site-generation/).
```shell
bun qwik add # or `bun qwik add`
```
## Development
Development mode uses [Vite's development server](https://vitejs.dev/). The `dev` command will server-side render (SSR) the output during development.
```shell
npm start # or `bun start`
```
> Note: during dev mode, Vite may request a significant number of `.js` files. This does not represent a Qwik production build.
## Preview
The preview command will create a production build of the client modules, a production build of `src/entry.preview.tsx`, and run a local server. The preview server is only for convenience to preview a production build locally and should not be used as a production server.
```shell
bun preview # or `bun preview`
```
## Production
The production build will generate client and server modules by running both client and server build commands. The build command will use Typescript to run a type check on the source code.
```shell
bun build # or `bun build`
```
## Cloudflare Pages
Cloudflare's [wrangler](https://github.com/cloudflare/wrangler) CLI can be used to preview a production build locally. To start a local server, run:
```
bun serve
```
Then visit [http://localhost:8787/](http://localhost:8787/)
### Deployments
[Cloudflare Pages](https://pages.cloudflare.com/) are deployable through their [Git provider integrations](https://developers.cloudflare.com/pages/platform/git-integration/).
If you don't already have an account, then [create a Cloudflare account here](https://dash.cloudflare.com/sign-up/pages). Next go to your dashboard and follow the [Cloudflare Pages deployment guide](https://developers.cloudflare.com/pages/framework-guides/deploy-anything/).
Within the projects "Settings" for "Build and deployments", the "Build command" should be `bun build`, and the "Build output directory" should be set to `dist`.
### Function Invocation Routes
Cloudflare Page's [function-invocation-routes config](https://developers.cloudflare.com/pages/platform/functions/routing/#functions-invocation-routes) can be used to include, or exclude, certain paths to be used by the worker functions. Having a `_routes.json` file gives developers more granular control over when your Function is invoked.
This is useful to determine if a page response should be Server-Side Rendered (SSR) or if the response should use a static-site generated (SSG) `index.html` file.
By default, the Cloudflare pages adaptor _does not_ include a `public/_routes.json` config, but rather it is auto-generated from the build by the Cloudflare adaptor. An example of an auto-generate `dist/_routes.json` would be:
```
{
"include": [
"/*"
],
"exclude": [
"/_headers",
"/_redirects",
"/build/*",
"/favicon.ico",
"/manifest.json",
"/service-worker.js",
"/about"
],
"version": 1
}
```
In the above example, it's saying _all_ pages should be SSR'd. However, the root static files such as `/favicon.ico` and any static assets in `/build/*` should be excluded from the Functions, and instead treated as a static file.
In most cases the generated `dist/_routes.json` file is ideal. However, if you need more granular control over each path, you can instead provide you're own `public/_routes.json` file. When the project provides its own `public/_routes.json` file, then the Cloudflare adaptor will not auto-generate the routes config and instead use the committed one within the `public` directory.

View File

@@ -1,15 +0,0 @@
import { cloudflarePagesAdapter } from "@builder.io/qwik-city/adapters/cloudflare-pages/vite";
import { extendConfig } from "@builder.io/qwik-city/vite";
import baseConfig from "../../vite.config";
export default extendConfig(baseConfig, () => {
return {
build: {
ssr: true,
rollupOptions: {
input: ["src/entry.cloudflare-pages.tsx", "@qwik-city-plan"],
},
},
plugins: [cloudflarePagesAdapter()],
};
});

View File

@@ -1,23 +0,0 @@
import { denoServerAdapter } from "@builder.io/qwik-city/adapters/deno-server/vite";
import { extendConfig } from "@builder.io/qwik-city/vite";
import baseConfig from "../../vite.config";
export default extendConfig(baseConfig, () => {
return {
build: {
ssr: true,
rollupOptions: {
input: ["src/entry.deno.ts", "@qwik-city-plan"],
},
minify: false,
},
plugins: [
denoServerAdapter({
ssg: {
include: ["/*"],
origin: "https://yoursite.dev",
},
}),
],
};
});

View File

@@ -1,78 +0,0 @@
{
"name": "@nestri/web",
"description": "Your games. Your rules.",
"engines": {
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"engines-annotation": "Mostly required by sharp which needs a Node-API v9 compatible runtime",
"private": true,
"trustedDependencies": [
"sharp"
],
"trustedDependencies-annotation": "Needed for bun to allow running install scripts",
"type": "module",
"scripts": {
"build": "qwik build",
"build.client": "vite build",
"build.preview": "vite build --ssr src/entry.preview.tsx",
"build.server": "vite build -c adapters/cloudflare-pages/vite.config.ts",
"deno:build.server": "vite build -c adapters/deno/vite.config.ts",
"build.types": "tsc --incremental --noEmit",
"deploy": "wrangler pages deploy ./dist",
"dev": "vite --mode ssr",
"dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force",
"fmt": "prettier --write .",
"fmt.check": "prettier --check .",
"lint": "eslint \"src/**/*.ts*\"",
"preview": "qwik build preview && vite preview --open",
"serve": "wrangler pages dev ./dist --compatibility-flags=nodejs_als",
"deno:serve": "deno run --allow-net --allow-read --allow-env server/entry.deno.js",
"start": "vite --open --mode ssr",
"qwik": "qwik"
},
"devDependencies": {
"@builder.io/partytown": "^0.8.1",
"@builder.io/qwik": "^1.8.0",
"@builder.io/qwik-city": "^1.8.0",
"@builder.io/qwik-react": "0.5.0",
"@fontsource-variable/bricolage-grotesque": "^5.0.1",
"@fontsource/geist-mono": "^5.1.0",
"@fontsource/geist-sans": "^5.1.0",
"@fontsource-variable/mona-sans": "^5.0.1",
"@modular-forms/qwik": "^0.29.0",
"@nestri/input": "*",
"@nestri/libmoq": "*",
"@nestri/sdk": "0.1.0-alpha.14",
"@nestri/ui": "*",
"@openauthjs/openauth": "*",
"@polar-sh/checkout": "^0.1.8",
"@polar-sh/sdk": "^0.21.1",
"@qwik-ui/headless": "^0.6.4",
"@types/eslint": "8.56.10",
"@types/howler": "^2.2.12",
"@types/node": "^22.5.1",
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
"@typescript-eslint/eslint-plugin": "7.16.1",
"@typescript-eslint/parser": "7.16.1",
"ajv": "^8.17.1",
"eslint": "8.57.0",
"eslint-plugin-qwik": "^1.8.0",
"howler": "^2.2.4",
"posthog-js": "^1.207.0",
"prettier": "3.3.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"semver": "^7.7.1",
"typescript": "5.4.5",
"undici": "*",
"valibot": "^0.42.1",
"vite": "6.1.6",
"vite-tsconfig-paths": "^4.2.1",
"wrangler": "^3.0.0"
},
"dependencies": {
"@types/pako": "^2.0.3",
"pako": "^2.1.0"
}
}

View File

@@ -1,6 +0,0 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};

View File

@@ -1,9 +0,0 @@
# https://developers.cloudflare.com/pages/platform/headers/
/*service-worker.js
Cache-Control: no-store
Content-Type: application/javascript
X-Content-Type-Options: nosniff
/build/*
Cache-Control: public, max-age=31536000, s-maxage=31536000, immutable

View File

@@ -1 +0,0 @@
# https://developers.cloudflare.com/pages/platform/redirects/

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 490 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 867 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 620 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

View File

@@ -1,22 +0,0 @@
{
"$schema": "https://json.schemastore.org/web-manifest-combined.json",
"name": "Nestri",
"short_name": "Nestri - Your games. Your rules.",
"start_url": ".",
"display": "standalone",
"background_color": "#fafafa",
"description": "Nestri - Your games. Your rules.",
"icons": [
{
"src": "/seo/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/seo/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#fafafa"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1022 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/icons/mstile-150x150.png"/>
<TileColor>#ffede5</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 696 B

View File

@@ -1,19 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.14, written by Peter Selinger 2001-2017
</metadata>
<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M398 4232 l-48 -3 -1 -42 c-2 -188 2 -861 6 -865 2 -3 997 -5 2210
-6 l2205 -1 -2 458 -3 459 -2160 1 c-1188 1 -2181 1 -2207 -1z"/>
<path d="M350 2984 c0 -19 0 -198 0 -399 0 -201 0 -391 0 -424 l0 -58 2210 0
2210 0 0 457 0 457 -2210 0 -2210 0 0 -33z"/>
<path d="M354 1799 c-3 -6 -7 -613 -5 -844 l1 -70 2197 2 c1209 1 2204 2 2211
3 18 0 18 910 0 911 -81 4 -4401 2 -4404 -2z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 902 B

View File

@@ -1,18 +0,0 @@
{
"name": "Nestri",
"short_name": "Nestri",
"icons": [
{
"src": "/icons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/icons/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#fafafa",
"background_color": "#fafafa",
"display": "standalone"}

View File

@@ -1,4 +0,0 @@
// This file can be used to add references for global types like `vite/client`.
// Add global `vite/client` types. For more info, see: https://vitejs.dev/guide/features#client-types
/// <reference types="vite/client" />

View File

@@ -1,19 +0,0 @@
import type { PartytownConfig } from "@builder.io/partytown/integration";
import { partytownSnippet } from "@builder.io/partytown/integration";
/**
* Props for `<QwikPartytown/>`, which extends the Partytown Config.
*
* https://github.com/BuilderIO/partytown#config
*
* @public
*/
export interface PartytownProps extends PartytownConfig {}
/**
* @public
* You can pass setting with props
*/
export const QwikPartytown = (props: PartytownProps): any => {
return <script dangerouslySetInnerHTML={partytownSnippet(props)} />;
};

View File

@@ -1,24 +0,0 @@
/*
* WHAT IS THIS FILE?
*
* It's the entry point for Cloudflare Pages when building for production.
*
* Learn more about the Cloudflare Pages integration here:
* - https://qwik.dev/docs/deployments/cloudflare-pages/
*
*/
import {
createQwikCity,
type PlatformCloudflarePages,
} from "@builder.io/qwik-city/middleware/cloudflare-pages";
import qwikCityPlan from "@qwik-city-plan";
import { manifest } from "@qwik-client-manifest";
import render from "./entry.ssr";
declare global {
interface QwikCityPlatform extends PlatformCloudflarePages {}
}
const fetch = createQwikCity({ render, qwikCityPlan, manifest });
export { fetch };

View File

@@ -1,45 +0,0 @@
/*
* WHAT IS THIS FILE?
*
* It's the entry point for the Deno HTTP server when building for production.
*
* Learn more about the Deno integration here:
* - https://qwik.dev/docs/deployments/deno/
* - https://docs.deno.com/runtime/tutorials/http_server
*
*/
import { createQwikCity } from "@builder.io/qwik-city/middleware/deno";
import qwikCityPlan from "@qwik-city-plan";
import { manifest } from "@qwik-client-manifest";
import render from "./entry.ssr";
// Create the Qwik City Deno middleware
const { router, notFound, staticFile } = createQwikCity({
render,
qwikCityPlan,
manifest,
});
// Allow for dynamic port
const port = Number(Deno.env.get("PORT") ?? 3009);
/* eslint-disable */
console.log(`Server starter: http://localhost:${port}/app/`);
Deno.serve({ port }, async (request: Request, info: any) => {
const staticResponse = await staticFile(request);
if (staticResponse) {
return staticResponse;
}
// Server-side render this request with Qwik City
const qwikCityResponse = await router(request, info);
if (qwikCityResponse) {
return qwikCityResponse;
}
// Path not found
return notFound(request);
});
declare const Deno: any;

View File

@@ -1,17 +0,0 @@
/*
* WHAT IS THIS FILE?
*
* Development entry point using only client-side modules:
* - Do not use this mode in production!
* - No SSR
* - No portion of the application is pre-rendered on the server.
* - All of the application is running eagerly in the browser.
* - More code is transferred to the browser than in SSR mode.
* - Optimizer/Serialization/Deserialization code is not exercised!
*/
import { render, type RenderOptions } from "@builder.io/qwik";
import Root from "./root";
export default function (opts: RenderOptions) {
return render(document, <Root />, opts);
}

View File

@@ -1,21 +0,0 @@
/*
* WHAT IS THIS FILE?
*
* It's the bundle entry point for `npm run preview`.
* That is, serving your app built in production mode.
*
* Feel free to modify this file, but don't remove it!
*
* Learn more about Vite's preview command:
* - https://vitejs.dev/config/preview-options.html#preview-options
*
*/
import { createQwikCity } from "@builder.io/qwik-city/middleware/node";
import qwikCityPlan from "@qwik-city-plan";
// make sure qwikCityPlan is imported before entry
import render from "./entry.ssr";
/**
* The default export is the QwikCity adapter used by Vite preview.
*/
export default createQwikCity({ render, qwikCityPlan });

View File

@@ -1,33 +0,0 @@
/**
* WHAT IS THIS FILE?
*
* SSR entry point, in all cases the application is rendered outside the browser, this
* entry point will be the common one.
*
* - Server (express, cloudflare...)
* - npm run start
* - npm run preview
* - npm run build
*
*/
import {
renderToStream,
type RenderToStreamOptions,
} from "@builder.io/qwik/server";
import { manifest } from "@qwik-client-manifest";
import Root from "./root";
export default function (opts: RenderToStreamOptions) {
return renderToStream(<Root />, {
manifest,
...opts,
// Use container attributes to set attributes on the html tag.
containerAttributes: {
lang: "en-us",
...opts.containerAttributes,
},
serverData: {
...opts.serverData,
},
});
}

View File

@@ -1,60 +0,0 @@
import { component$ } from "@builder.io/qwik";
import {
QwikCityProvider,
RouterOutlet,
ServiceWorkerRegister,
} from "@builder.io/qwik-city";
import { RouterHead } from "@nestri/ui";
import { isDev } from "@builder.io/qwik/build";
import { QwikPartytown } from './components/partytown/partytown';
import "@nestri/ui/globals.css";
import { Fonts } from "@nestri/ui";
export default component$(() => {
/**
* The root of a QwikCity site always start with the <QwikCityProvider> component,
* immediately followed by the document's <head> and <body>.
*
* Don't remove the `<head>` and `<body>` elements.
*/
return (
<Fonts>
<QwikCityProvider>
<head>
<QwikPartytown />
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f5f5f5" />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#171717" />
<meta charset="utf-8" />
<link
rel="preload"
href="/fonts/BasementGrotesque-Black.woff2"
as="font"
crossOrigin=""
/>
<link
rel="preload"
href="/fonts/BasementGrotesque-Black.woff"
as="font"
crossOrigin=""
/>
{!isDev && (
<link
rel="manifest"
href={`${import.meta.env.BASE_URL}manifest.json`}
/>
)}
<RouterHead />
</head>
<body
class="bg-gray-100 text-gray-950 dark:bg-gray-900 dark:text-gray-50 font-body flex flex-col items-center justify-center overflow-x-hidden antialiased"
lang="en">
<RouterOutlet />
{!isDev && <ServiceWorkerRegister />}
{/* <ServiceWorkerRegister /> */}
</body>
</QwikCityProvider>
</Fonts>
);
});

View File

@@ -1,98 +0,0 @@
import Nestri from "@nestri/sdk";
import { server$ } from "@builder.io/qwik-city";
import { $, component$ } from "@builder.io/qwik";
import { HomeFriendsSection, HomeGamesSection, HomeMachineSection } from "@nestri/ui";
export const getUserSubscriptions = server$(
async function () {
const access = this.cookie.get("access_token")
if (access) {
const bearerToken = access.value
const nestriClient = new Nestri({ bearerToken, maxRetries: 5 })
const subscriptions = await nestriClient.subscriptions.list().then(t => t.data.length > 0 ? "Pro" : "Free").catch(async (err) => {
if (err instanceof Nestri.APIError) {
if (err.status == 404) {
return "Free"
} else {
throw err
}
} else {
throw err;
}
})
return subscriptions as "Free" | "Pro"
}
}
);
export const getActiveUsers = server$(
async function () {
const access = this.cookie.get("access_token")
if (access) {
const bearerToken = access.value
try {
const nestriClient = new Nestri({ bearerToken, maxRetries: 5 })
const users = await nestriClient.users.list().then(t => t.data) as any
return users as Nestri.Users.UserListResponse.Data[]
} catch (error) {
console.log("error", error)
return undefined
}
}
}
);
export const getSession = server$(
async function (profileID: string) {
const access = this.cookie.get("access_token")
if (access) {
const bearerToken = access.value
try {
const nestriClient = new Nestri({ bearerToken, maxRetries: 5 })
const session = await nestriClient.users.session(profileID)
return session
} catch (error) {
console.log("error", error)
return undefined
}
}
}
);
export const createSession = server$(
async function () {
const access = this.cookie.get("access_token")
if (access) {
const bearerToken = access.value
try {
const nestriClient = new Nestri({ bearerToken, maxRetries: 5 })
const taskID = await nestriClient.tasks.create()
const sessionID = await nestriClient.tasks.session(taskID.data)
return sessionID.data
} catch (error) {
console.log("error", error)
return undefined
}
}
}
);
export default component$(() => {
return (
<main class="flex w-screen h-full flex-col relative">
<section class="max-w-[750px] w-full mx-auto flex flex-col gap-3 px-5 pt-20 pb-14 min-h-screen">
<HomeMachineSection getUserSubscription$={$(async () => { return await getUserSubscriptions() })} />
<HomeFriendsSection getActiveUsers$={$(async () => { return await getActiveUsers() })} getSession$={$(async (profileID: string) => { return await getSession(profileID) })} />
<HomeGamesSection getUserSubscription$={$(async () => { return await getUserSubscriptions() })} createSession$={$(async () => { return await createSession() })} />
</section >
</main >
)
})

View File

@@ -1,42 +0,0 @@
import Nestri from "@nestri/sdk";
import { HomeNavBar } from "@nestri/ui";
import { server$ } from "@builder.io/qwik-city";
import { $, component$, Slot } from "@builder.io/qwik"
const cookieOptions = {
path: "/",
sameSite: "lax" as const,
secure: false, // Only send cookies over HTTPS
//FIXME: This causes weird issues in Qwik
httpOnly: true, // Prevent JavaScript access to cookies
expires: new Date(Date.now() + 24 * 10 * 60 * 60 * 1000), // expires in like 10 days
}
export const getUserProfile = server$(
async function () {
const userData = this.cookie.get("profile_data")
if (userData) {
const user = userData.json() as Nestri.Users.UserRetrieveResponse.Data
return user
} else {
const access = this.cookie.get("access_token")
if (access) {
const bearerToken = access.value
const nestriClient = new Nestri({ bearerToken, maxRetries: 5 })
const currentProfile = await nestriClient.users.retrieve()
this.cookie.set("profile_data", JSON.stringify(currentProfile.data), cookieOptions)
return currentProfile.data;
}
}
}
);
export default component$(() => {
return (
<>
<HomeNavBar getUserProfile$={$(async () => { return await getUserProfile() })} />
<Slot />
</>
)
})

Some files were not shown because too many files have changed in this diff Show More