Skip to content
Studio

Routster Studio

Build a module

A module adds a page beside the map in Studio: a tool a course setter opens. It reads the event, asks Studio for routes and for what the map has drawn, shows lines over the map, and offers changes the setter accepts, each one step of undo. Every module on the modules page is built this way.

You can build a module, run it in your own Studio, and publish it from the publisher page.

What you need

  • The .NET 10 SDK.
  • Routster Studio with host API 1.16 or newer, which the template builds for. Studio is in early access: ask for a build on the front page. Studio 0.18.0, from 11 November 2026, has it.
  • Some C#. A module's page is an Avalonia control built in code.
Ask for early access

From nothing to a module on screen

  1. 1 Install the template and the tool

                      dotnet new install Routster.Studio.Templates
    dotnet tool install -g Routster.Studio.ModuleTool
                    

    Both come from nuget.org, as do updates to them.

  2. 2 Make a module

                      dotnet new routster-module -n LegLengths --id se.myclub.leg-lengths --title "Leg lengths"
                    

    The id is the module's for good: a domain you own, reversed, then the module's name, in lower case. The title is what a course setter sees.

  3. 3 Run it in your Studio

                      routster-module run LegLengths
                    

    This builds the module, packs it with a key made for your machine, puts it in your Studio and opens Studio. The module's icon is on the rail at the right of the window, and its page draws the course showing from control to control. Edit Page.cs, quit Studio and run again.

  4. 4 Check it

                      routster-module validate LegLengths
                    

    This checks what a reviewer checks first: that Studio will accept the manifest, that the name and the summary are in all four languages, that the icon is SVG path data, and that the module's DLL is there.

Developer mode

The first run turns on developer mode in your Studio: your key is listed in Studio's developer-keys.json, and your module shows a Developer badge on Studio's Modules page. Only your own Studio trusts that key. Nothing signed with it reaches anyone else's Studio: Studio never takes a catalogue, a download or an update on a developer key.

What is in a module

manifest.json
Its id, version, name and summary in each language, its icon, the host API it needs, whether it is paid, and its entry point.
Module.cs
Implements IStudioModule. Its Register method adds the module's page.
Page.cs
The page: an Avalonia control built in code.
Text.cs
Every word the module shows, in English, Swedish, French and German.

The project references Routster.Studio.Sdk, which holds the host API and the build step that lays out the module's folder, and Avalonia. Studio already has both loaded, so neither goes into your package. A module may carry other libraries written in managed code; they go into the package beside it. Native code may not.

What Studio gives a module

Everything a module may touch is IModuleHost, in the Routster.Studio.Sdk package, with its documentation shown in your editor. In version 1.16:

AddInspectorPage
A page on the rail: an id, a title, a Lucide icon, and a function that makes the view.
Event
The open event, read only: the map's scale, the course showing and its controls, every control with its description boxes, every course with its controls, each variation of a forked course, and events to follow changes. Since 1.11 a course's controls carry their number on the description sheet, and DescriptionSymbolPng draws a description symbol as the event's standard prints it. Since 1.12 Pages says where each course prints: the part of the map, the paper inside its margins and the print scale. Since 1.13 Expand fills in a text's fields as they print on one course, and PageImage draws a course's page as the map alone has it, for a module that looks for empty ground. Since 1.15 Ink gives a print colour as Studio shows it on screen.
Routes
Studio's router over the course showing, any course by name, or one variation of a forked course: every leg's best route and the alternatives, in metres when the scale is known. On a sprint map the best route is the shortest; on a forest OCAD map it is the fastest through ground, vegetation and climb. CostAsync gives what each leg costs to run, stretch by stretch. The router is Routster Analyse's, so a module never carries its own.
Georeference
Between map millimetres and latitude and longitude, when the map is georeferenced.
Platform
The signed-in setter's own runs in Routster Analyse and their GPS tracks, read only, asked for when the setter presses something. SignInAsync opens Studio's sign-in.
MapReader
What an OCAD map has drawn: the objects near some points; the lines, area outlines and point objects in an area; and whether it is a sprint or a forest map. Since 1.14 LayoutOfAsync reads any OCAD file's layout, its layout objects and pictures, in the file's paper millimetres.
MapAnalysis
The open map's passability masks, for a module that analyses ground itself.
Editor
Small edits, each one step of undo under a name you give: description boxes, control codes, a picture beside the course. Since 1.12 PlaceLayout puts texts, lines, rectangles, ellipses, pictures and white-out on every course or on some, all or none in one step, and ReadLayout reads them back; since 1.13 it also places a course's control description sheet.
Propose, ProposeSet
Courses the setter has accepted, created as one step of undo; a control at the place of one already in the event is that control. Since 1.9, HideFromReports makes a course for the organisers, kept out of reports and the upload to Analyse, which the setter can change in its properties.
ShowOnMap, ShowOverlay, ShowArea, ShowControl
Lines and a picture over the map while your page is open, never printed; bringing an area into view; and, since 1.10, selecting a control as a press on the map would. Since 1.11 a line may carry a label, what it is, its time and its length, which Studio shows as the setter chose.
Settings
Your module's own values for the open event, saved beside it.
DataDirectory
Since 1.12, a folder of your module's own on the machine, for what it keeps between events. It is not carried with an event.

A minor version only adds: a module built for 1.3 runs in a Studio with 1.16. A major version is announced a release ahead.

The rules a module lives by

  1. Propose, never edit behind the setter's back. A change happens when the setter presses your button, through Editor or Propose, as one step they can undo.
  2. Never change how ground is classified for routing. Routes are Routster Analyse's, so that the route a setter judges in Studio is the route a runner is shown later. A module may add its own barriers to its own analysis, and nothing more.
  3. No guessed numbers. When the scale or the geometry is unknown, show no metres. Routes gives none in that case; do the same with your own.
  4. One sentence for anything that goes wrong. With the one thing to do about it. Never a code or a stack trace.
  5. Studio's look. Studio's theme styles your controls. Use its classes (primary, ghost, small, muted, card), Lucide icons only, sentence case, no exclamation marks.
  6. Four languages. Every word a module shows is in English, Swedish, French and German, as Studio's own are.
  7. The network is not yours. A module works offline. Anything it needs from a server goes through Studio, not through an HTTP client of its own.

Putting a module in the store

A course setter only ever installs a package Routster built, so a module reaches the store like this. Become a publisher on the publisher page, with your Routster account, and submit the module's id, a public GitHub repository and the commit to publish. Choose how it is paid for: free; a price, paid once, of which Routster keeps 10 % excluding VAT and you get the rest; or the subscription program, where the module comes with every Routster plan and you get a monthly share of a pool, split by how many paying subscribers used it that month. Routster pays you each month by bank transfer. Someone at Routster reads the source at that commit, then approves it, asks for changes or says why not. Routster then builds your commit on a clean machine, signs it and publishes it with your name on it. A module may not compete with one of Routster's own that is sold or part of a plan; building on one is welcome, and if you are unsure, ask before you start.

Publish a module

The template, the tool and the SDK are MIT licensed. That covers the kit, not Studio.

Questions, or something Studio does not give a module that yours would need? contact@routster.se