Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/TaylorZaneKirk/MMO-Project/llms.txt

Use this file to discover all available pages before exploring further.

This page walks through getting the C#/.NET prototype backend running locally against a PostgreSQL database. The server is an ASP.NET minimal-API host that uses Npgsql to talk to PostgreSQL, exposes HTTP health endpoints, and maps the primary game connection as a WebSocket endpoint at /session.

Prerequisites

  • .NET 10 SDK — the project targets net10.0 (download)
  • PostgreSQL 14+ running locally
  • git

Setup

1

Clone the repo

git clone https://github.com/TaylorZaneKirk/MMO-Project.git && cd MMO-Project
2

Create the database

Using the createdb CLI:
createdb mmo_project_proto
Or from a psql prompt:
psql -c "CREATE DATABASE mmo_project_proto;"
3

Apply migrations

Run each SQL file against the new database in order. Every file is additive — applying them in sequence brings the schema up to the current prototype slice.
psql -d mmo_project_proto -f prototype/sql/001_initial_schema.sql
psql -d mmo_project_proto -f prototype/sql/002_equipment_schema.sql
psql -d mmo_project_proto -f prototype/sql/003_item_equipment_metadata.sql
psql -d mmo_project_proto -f prototype/sql/004_leg_item_definitions.sql
psql -d mmo_project_proto -f prototype/sql/005_food_item_definitions.sql
psql -d mmo_project_proto -f prototype/sql/006_ground_items_schema.sql
psql -d mmo_project_proto -f prototype/sql/007_ground_item_visibility_notifications.sql
psql -d mmo_project_proto -f prototype/sql/008_skill_equipment_schema.sql
psql -d mmo_project_proto -f prototype/sql/009_hand_asset_slot_alignment.sql
psql -d mmo_project_proto -f prototype/sql/010_runtime_revision_streams.sql
4

Edit the connection string

Open prototype/server/appsettings.json and update ConnectionStrings.PrototypeDatabase to match your local PostgreSQL credentials:
{
  "ConnectionStrings": {
    "PrototypeDatabase": "Host=localhost;Port=5432;Database=mmo_project_proto;Username=YOUR_USER;Password=YOUR_PASSWORD"
  }
}
See Configuration for a full description of every option in this file.
5

Start the server

cd prototype/server && dotnet run
The server binds to http://localhost:5000 by default.
6

Verify the server is healthy

Check the HTTP health endpoints once the server is running:
curl http://localhost:5000/health
# {"status":"ok","service":"prototype-server"}

curl http://localhost:5000/health/db
# {"status":"healthy","database":"PrototypeDatabase"}
A 503 response from /health/db means the server cannot reach PostgreSQL — double-check your connection string and confirm the database exists.

Development debug endpoints

The following endpoints are only registered when the server starts in Development mode (ASPNETCORE_ENVIRONMENT=Development). They are not available in a production build.
These HTTP endpoints let you inspect and seed state directly without going through the WebSocket protocol:
MethodPathPurpose
GET/debug/accounts/{accountName}Look up an account record by name
POST/debug/sessions/{accountName}Create a session for the named account
POST/debug/loginExercise the login flow and receive a session token
POST/debug/accounts/passwordSet a plaintext password (hashed server-side) for an account
POST/debug/characters/{accountName}/statsUpsert health, concentration, and special stat values for a character
POST/debug/characters/{accountName}/inventory/{slotIndex}Place or clear an item in a specific inventory slot
POST/debug/characters/{accountName}/equipment/{slotId}Place or clear an item in a specific equipment slot
POST/debug/items/{itemId}Upsert an item definition (name and icon path)

WebSocket session endpoint

The primary game connection is the WebSocket endpoint at WS /session, mapped via SessionEndpoint.MapSessionEndpoint(app) in Program.cs. SessionEndpoint owns the full WebSocket lifecycle: login and reconnect authentication, session cleanup, and the server movement tick loop. Once authenticated, gameplay messages are routed through AuthenticatedMessageRouter into focused handlers for movement, inventory, ground items, equipment, and world resyncs.
Run dotnet run --environment Development to enable all debug endpoints and switch to verbose Debug-level logging defined in appsettings.Development.json.

Build docs developers (and LLMs) love