# AGENTS.md - AI Assistant Context for JSS This document provides context for AI assistants working on JavaScript Solid Server (JSS). ## What is JSS? A lightweight Solid server implementation focused on simplicity and modern JavaScript. Alternative to Node Solid Server (NSS) and Community Solid Server (CSS). **Key differences from other Solid servers:** - Single-file JSON-LD storage (no quad stores) - Content negotiation converts JSON-LD â Turtle on the fly - Built on Fastify (not Express) - Uses oidc-provider for identity - Supports Nostr NIP-98 authentication (unique to JSS) ## Architecture ``` src/ âââ server.js # Fastify setup, route registration âââ handlers/ # LDP operations (GET, PUT, POST, PATCH, DELETE) â âââ resource.js # File operations â âââ container.js # Directory operations, pod creation âââ auth/ # Authentication â âââ middleware.js # WAC authorization hook â âââ solid-oidc.js # DPoP token verification â âââ nostr.js # NIP-98 Schnorr signatures â âââ token.js # Simple Bearer tokens âââ idp/ # Identity Provider (oidc-provider) â âââ provider.js # OIDC configuration â âââ interactions.js # Login/consent UI handlers â âââ accounts.js # User account storage âââ wac/ # Web Access Control â âââ checker.js # Permission checking â âââ parser.js # ACL file parsing/generation âââ rdf/ # RDF handling â âââ conneg.js # Content negotiation â âââ turtle.js # Turtle â JSON-LD conversion âââ notifications/ # WebSocket real-time updates â âââ websocket.js # solid-0.1 protocol handler â âââ events.js # Event emitter for changes âââ ldp/ # Linked Data Platform â âââ headers.js # LDP response headers â âââ container.js # Container JSON-LD generation âââ storage/ # File system operations âââ filesystem.js # Read/write/stat/list ``` ## Key Design Decisions ### JSON-LD as canonical storage All RDF is stored as JSON-LD. When clients request Turtle, we convert on the fly. This simplifies storage and allows non-RDF tools to read the data. ### HTML profiles with JSON-LD data islands WebID profiles are HTML documents with embedded `