## Philosophy: JSON-LD First This is a **JSON-LD native implementation**. Unlike traditional Solid servers that treat Turtle as the primary format and convert to/from it, this server: - **Stores everything as JSON-LD** - No RDF parsing overhead for standard operations - **Serves JSON-LD by default** - Modern web applications can consume responses directly - **Content negotiation is optional** - Enable Turtle support with `{ conneg: true }` when needed - **Fast by design** - Skip the RDF parsing tax when you don't need it ### Why JSON-LD First? 1. **Performance**: JSON parsing is native to JavaScript - no external RDF libraries needed for basic operations 2. **Simplicity**: JSON-LD is valid JSON - works with any JSON tooling 3. **Web-native**: Browsers and web apps understand JSON natively 4. **Semantic web ready**: JSON-LD is a W3C standard RDF serialization ### When to Enable Content Negotiation Enable `conneg: true` when: - Interoperating with Turtle-based Solid apps - Serving data to legacy Solid clients - Running conformance tests that require Turtle support ```javascript import { createServer } from './src/server.js'; // Default: JSON-LD only (fast) const server = createServer(); // With Turtle support (for interoperability) const serverWithConneg = createServer({ conneg: true }); ``` ## Configuration ```javascript createServer({ logger: true, // Enable Fastify logging (default: true) conneg: false, // Enable content negotiation (default: false) notifications: false, // Enable WebSocket notifications (default: false) subdomains: false, // Enable subdomain-based pods (default: false) baseDomain: null, // Base domain for subdomains (e.g., "example.com") mashlib: false, // Enable Mashlib data browser - local mode (default: false) mashlibCdn: false, // Enable Mashlib data browser - CDN mode (default: false) mashlibVersion: '2.0.0', // Mashlib version for CDN mode }); ``` ### Mashlib Data Browser Enable the [SolidOS Mashlib](https://github.com/SolidOS/mashlib) data browser for RDF resources. Two modes are available: **CDN Mode** (recommended for getting started): ```bash jss start --mashlib-cdn --conneg ``` Loads mashlib from unpkg.com CDN. Zero footprint - no local files needed. **Local Mode** (for production/offline): ```bash jss start --mashlib --conneg ``` Serves mashlib from `src/mashlib-local/dist/`. Requires building mashlib locally: ```bash cd src/mashlib-local npm install && npm run build ``` **ES Module Mode** (for custom or next-gen mashlib builds): ```bash jss start --mashlib-module https://example.com/mashlib.js ``` Loads an ES module-based data browser from any URL. Uses `