2026-07-29 05:03:04 -07:00
2026-07-29 05:03:04 -07:00
2026-07-25 10:13:56 +00:00
2026-07-28 05:16:25 +00:00

TenWholeYears.Server

Thanks for playing TenWholeYears!

This is the API server for the TenWholeYears Game Client. A decompilation of the first public Rec Room build.

Please note that this web server was built in a couple days. I cut some corners when coding this, and some of the coding principals and patterns used in this codebase does not reflect how I would approach a project that is intented to be maintained long-term.

Basic Setup

Prerequisites:

  • .NET 10 SDK
  • Docker Desktop or another container runtime, when using AppHost
  • A Steam Web API key, if using platform validation.

Restore and build:

dotnet restore RecNet.sln
dotnet build RecNet.sln

Run the full local stack with Aspire:

dotnet run --project src\AppHost\AppHost.csproj

Configuration

Use user secrets for local development.

For the API:

dotnet user-secrets set "Jwt:Secret" "replace-with-a-long-random-secret" --project src\API\API.csproj

Optional API secrets:

dotnet user-secrets set "Jwt:Issuer" "http://localhost:5155" --project src\API\API.csproj
dotnet user-secrets set "Jwt:Audience" "TenWholeYears" --project src\API\API.csproj
dotnet user-secrets set "Jwt:ExpiryMinutes" "60" --project src\API\API.csproj
dotnet user-secrets set "Steam:ApiKey" "your-steam-web-api-key" --project src\API\API.csproj
dotnet user-secrets set "Steam:AppId" "480" --project src\API\API.csproj
dotnet user-secrets set "Neutrino:ValidateSecret" "true" --project src\API\API.csproj
dotnet user-secrets set "Neutrino:Secret" "replace-with-neutrino-secret" --project src\API\API.csproj
dotnet user-secrets set "RecNet:UseForwardedHeaders" "false" --project src\API\API.csproj

Production Config With Environment Variables

.env example:

Jwt__Secret = "replace-with-a-long-random-secret"
Jwt__Issuer = "https://your-api.example.com"
Jwt__Audience = "TenWholeYears"
Jwt__ExpiryMinutes = "60"
Steam__ApiKey = "your-steam-web-api-key"
Steam__AppId = "480"
Neutrino__ValidateSecret = "true"
Neutrino__Secret = "replace-with-neutrino-secret"
RecNet__UseForwardedHeaders = "true"

Runtime Server Configs

The server has configs in the ServerConfigs database table that are able to be adjusted while the server is running. Keys are strings and values are stored as JSON.

Key Type Default
Config:MOTD string "Ten Whole Years!"
Profiles:IgnoreAuthValidation boolean true
Profiles:NameGen object DefaultNameGenConfig.Value

Profiles:NameGen expects this shape:

{
  "Adjectives": [
    "Adorable",
    "Brave"
  ],
  "Nouns": [
    "Pony",
    "Tiger"
  ]
}

Notes

  • Set RecNet:UseForwardedHeaders to true only when the API is behind a trusted reverse proxy.
Description
The API server for the TenWholeYears Game Client. A decompilation of the first public Rec Room build.
https://recroom.baby/
Readme MIT-0 198 KiB
Languages
C# 96.8%
Shell 1.9%
PowerShell 1.3%