| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Create a minimal, standalone LWS (Linked Web Storage) server extracted from JSS that implements only the core W3C LWS protocol without Solid-specific or extended features.
Goal: Reference implementation and minimal server for LWS protocol testing, embedding, and education.
Related:
JSS has grown to support many protocols and features:
Problem: This makes JSS heavy for users who just want simple Linked Data storage following LWS spec.
Solution: Extract a minimal LWS server (~500-1000 LOC) that focuses solely on the core protocol.
All Solid-specific and extended features:
```
lws-server/
├── package.json
├── README.md
├── index.js # Main entry point
├── lib/
│ ├── server.js # Fastify setup
│ ├── handlers/
│ │ ├── get.js # GET/HEAD
│ │ ├── put.js # PUT
│ │ ├── post.js # POST
│ │ ├── delete.js # DELETE
│ │ └── options.js # OPTIONS
│ ├── storage.js # Filesystem operations
│ ├── headers.js # Link/ETag headers
│ └── auth.js # Simple token auth (optional)
└── test/
└── lws.test.js
```
```json
{
"dependencies": {
"fastify": "^5.x",
"@fastify/cors": "^10.x",
"fs-extra": "^11.x"
},
"devDependencies": {
"node:test": "builtin"
}
}
```
```javascript
import { createLWSServer } from 'lws-server';
const server = createLWSServer({
port: 3000,
root: './data',
cors: true,
auth: false // Optional token-based auth
});
await server.listen();
console.log('LWS server running on http://localhost:3000');
```
```bash
npm install -g lws-server
lws-server --port 3000 --root ./data
```
```bash
PUT /data.json # Creates /data.json
POST / + Slug=file # Creates /file.json
GET / # Lists all resources
```
```bash
lws-server --multiuser
PUT /alice/data.json # Creates /alice/data.json
PUT /bob/data.json # Creates /bob/data.json
```
Pros:
Cons:
Pros:
Cons:
Start with JSS handlers, progressively remove features until minimal.
Size:
Performance:
Usability:
| Feature | JSS | lws-server |
|---|---|---|
| LOC | ~8000+ | ~500-1000 |
| Dependencies | 22 | ~5-10 |
| Startup | ~500ms | <100ms |
| Memory | ~150MB | <50MB |
| Protocols | LDP, LWS, OIDC, AP, Nostr, Git | LWS only |
| Auth | 5 methods | Simple token |
| Features | 20+ | 5 core CRUD |
This builds on:
Differences:
Use together:
Priority: Low-Medium - Useful for ecosystem, not urgent
Effort: 1-2 days for functional MVP
Dependencies: None (can start anytime, spec still evolving)
Status: Awaiting LWS ecosystem signals (per #87 decision criteria)
| Back | FazBrowse Home | New Git URL |
Activity
feat: initial minimal LWS server implementation
melvincarvalho commented on Oct 14, 2026
Superseded by #621. The ecosystem now has reference LWS servers — ebremer/lws-server (Java) and jeswr/LinkedWebStorage (CSS plugin) — plus a conformance harness (Touchstone) and clients in 11 languages (lws-client). JSS doesn't need to be the minimal reference anymore; the useful goal is conformance of the full server, tracked in #621.