An OSLC 3.0 server for the MISA Municipal Reference Model (MRM). It exposes MRM domain resources -- Programs, Services, Processes, Resources, Outcomes, Organization Units, Target Groups, and Needs -- as linked data through standard OSLC and LDP interfaces. The server is built on the oslc-service Express middleware with Apache Jena Fuseki as the triple store backend.
- Node.js v22.11.0 or later
- Apache Jena Fuseki running with a dataset named
mrm(or matching thejenaURLinconfig.json) - The
oslc4jsworkspace dependencies installed (this module depends onoslc-service,ldp-service-jena, andstorage-servicefrom the monorepo)
From the workspace root (oslc4js/):
npm install
npm run build --workspace=mrm-serverOr from within mrm-server/:
npm run buildThis runs tsc and emits compiled JavaScript to dist/.
The server reads config.json at startup, with environment variables taking precedence where applicable.
| Field | Type | Default | Description |
|---|---|---|---|
scheme |
string | "http" |
URL scheme for the server base URI |
host |
string | "localhost" |
Hostname the server binds to |
port |
number | 3002 |
Port the server listens on |
context |
string | "/" |
LDP context path (root of the OSLC service) |
jenaURL |
string | "http://localhost:3030/mrm/" |
SPARQL endpoint URL for the Jena Fuseki dataset |
The following environment variables override config.json values:
| Variable | Overrides |
|---|---|
LDP_BASE |
Derives scheme, host, port, and context from a single base URL |
HOSTNAME |
host |
VCAP_APP_HOST |
Listen host (Cloud Foundry) |
VCAP_APP_PORT |
Listen port (Cloud Foundry) |
-
Start Apache Jena Fuseki with an
mrmdataset:fuseki-server --mem /mrm
-
Start the server:
npm start --workspace=mrm-server
The server will print its configuration and listen on
http://localhost:3002/by default.
mrm-server includes the oslc-browser web application, served as static files from public/. After starting the server, open your browser to:
http://localhost:3002/
The UI provides an interactive column browser for navigating MRM service providers, resources, and their relationships. To rebuild the UI after changes to oslc-browser:
cd mrm-server/ui
npm run build
This builds the Vite app shell into mrm-server/public/.
The MRM (Municipal Reference Model) defines a set of resource types for describing municipal government service delivery:
| Resource Type | RDF Type | Description |
|---|---|---|
| Program | mrm:Program |
A municipal program |
| Service | mrm:Service |
A service delivered by a program |
| Process | mrm:Process |
A process that implements a service |
| Resource | mrm:Resource |
A resource used by processes |
| Outcome | mrm:Outcome |
An outcome or result of a program or service |
| Organization Unit | mrm:OrganizationUnit |
An organizational unit responsible for delivery |
| Target Group | mrm:TargetGroup |
A target group served by a program or service |
| Need | mrm:Need |
A need addressed by programs or services |
For each resource type above, the server provides:
- Creation Factories -- POST a new resource to create it in the triple store
- Query Capabilities -- GET with OSLC query syntax to find resources
- Resource Shapes -- defined in
config/shapes/MRMS-Shapes.ttl(referenced but managed byoslc-service) - Delegated UI Dialogs -- creation dialogs for each resource type, served from the
dialog/directory
The server also supports OMG DD (Diagram Definition) diagrams via the dd: namespace. Diagram creation factories and creation dialogs are provided for:
Organization Unit, Program, Service, Process, Resource, Need, Outcome, Output, Target Group, PLM, and SIAM diagrams.
Diagram shapes are defined in config/shapes/MRMS-DiagramShapes.ttl. A selection dialog is also available for choosing existing diagrams.
mrm-server
|-- src/app.ts Entry point: creates Express app, mounts oslc-service
|-- src/env.ts Configuration resolution (config.json + env vars)
|-- config.json Default server configuration
|-- config/
| |-- catalog-template.ttl OSLC ServiceProviderCatalog template
| +-- shapes/ Resource shape definitions (Turtle)
+-- public/ Static files (built navigator UI)
The server is a thin domain-specific layer on top of two shared libraries:
oslc-service-- Express middleware that readscatalog-template.ttland provides the OSLC ServiceProviderCatalog, ServiceProviders, creation factories, query capabilities, resource shapes, and delegated UI dialogs.ldp-service-jena--JenaStorageServiceimplementation of theStorageServiceinterface. Handles all LDP container and resource CRUD operations against a Jena Fuseki SPARQL endpoint.
The catalog-template.ttl file in config/ defines the full OSLC service description using placeholder URIs (urn:oslc:template/...). At startup, oslc-service processes this template, replaces placeholders with the server's actual base URL, and exposes the resulting catalog at the server root.
The server exposes standard LDP and OSLC 3.0 REST endpoints:
GET /-- OSLC ServiceProviderCatalogGET /serviceProviders/{id}-- Individual ServiceProviderGET /shapes/{shapeName}-- Resource shape documentsPOST /{container}/-- Create a resource (via creation factory)GET /{container}/-- Query resources (supportsoslc.where,oslc.select,oslc.prefix)GET /{container}/{resourceId}-- Read a single resourcePUT /{container}/{resourceId}-- Update a resourceDELETE /{container}/{resourceId}-- Delete a resource
Content negotiation supports text/turtle, application/ld+json, and application/rdf+xml.
See the oslc-server README for detailed LDP and OSLC protocol documentation.