{"id":17291350,"url":"https://github.com/csarven/mayktso","last_synced_at":"2025-04-14T11:12:18.147Z","repository":{"id":44062285,"uuid":"65038629","full_name":"csarven/mayktso","owner":"csarven","description":":milky_way: mayktso: encounters at an endpoint","archived":false,"fork":false,"pushed_at":"2024-07-08T08:35:20.000Z","size":311,"stargazers_count":21,"open_issues_count":7,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-14T11:12:12.089Z","etag":null,"topics":["ldp","linked-data","linked-data-notifications","rdf","rdfa","rww","semantic-web"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csarven.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-05T17:58:07.000Z","updated_at":"2025-04-09T19:04:57.000Z","dependencies_parsed_at":"2024-07-07T17:41:24.543Z","dependency_job_id":"1a21cdaa-ba11-48ae-b97b-c9caab9f5d2b","html_url":"https://github.com/csarven/mayktso","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csarven%2Fmayktso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csarven%2Fmayktso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csarven%2Fmayktso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csarven%2Fmayktso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csarven","download_url":"https://codeload.github.com/csarven/mayktso/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248868766,"owners_count":21174758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ldp","linked-data","linked-data-notifications","rdf","rdfa","rww","semantic-web"],"created_at":"2024-10-15T10:40:50.119Z","updated_at":"2025-04-14T11:12:18.114Z","avatar_url":"https://github.com/csarven.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mayktso\nEncounters at an endpoint.\n\n\n[![Docker Automated build](https://img.shields.io/docker/automated/csarven/mayktso.svg)](https://hub.docker.com/r/csarven/mayktso/builds/)\n[![Docker Build Status](https://img.shields.io/docker/build/jrottenberg/ffmpeg.svg)](https://hub.docker.com/r/csarven/mayktso/)\n[![](https://images.microbadger.com/badges/image/csarven/mayktso.svg)](https://microbadger.com/images/csarven/mayktso \"Docker layers of csarven/mayktso\")\n\n## About\n* HTTP server and command-line RDF tool to get/send, serialise data.\n* Server can receive HTTP `HEAD`, `OPTIONS`, `GET`, `POST`, `PUT` requests.\nContent negotiation with `text/turtle`, `application/ld+json`, `text/html`,\n`application/xhtml+xml`. It can serialize from HTML+RDFa, but does not serialize\nto HTML+RDFa.\n* Spec coverage:\n  * Tested: Conforming [Linked Data Notifications](https://www.w3.org/TR/ldn/) sender, receiver, sender.\n  * Untested: [Linked Data Platform](https://www.w3.org/TR/ldp/) - probably does most things, and only BasicContainer.\n  * Totally untested and probably only small parts: [Web Annotation Protocol](https://www.w3.org/TR/annotation-protocol/)\n  * Basic implementation of the the [ActiviyPub](https://www.w3.org/TR/activitypub/) Outbox mechanism.\n* No authenication/authorisation mechanism\n* Basic configuration to set constraints on a directory (size/max)\n* Basic configuration to handle stuff like https://linkedresearch.org/cloud\n\nThis server was initially built for LDN tests but then decided to support/test [dokieli](https://dokie.li/)'s needs (source: https://github.com/linkeddata/dokieli) and do LDP etc.\n\nDive into [issues](https://github.com/csarven/mayktso/issues) because it is fun.\n\n\n## Docker\n\n\nIf you use [Docker](https://www.docker.com/), try the image [csarven/mayktso](https://hub.docker.com/r/csarven/mayktso/builds/):\n\n```shell\ndocker run -p 3000:3000 -d csarven/mayktso\n```\n### Persistent Docker container\n\n```shell\ndocker volume create mayktso-data\ndocker run --name mayktso --restart=always \\\n  --mount source=mayktso-data,target=/mayktso \\\n  -p 3000:3000 \\\n  -d csarven/mayktso\n```\n\nTo update:\n\n```\ndocker pull csarven/mayktso\ndocker stop mayktso\ndocker rm mayktso\n```\n\n.. then recreate using the `docker run` from above.\n\n## Installation from source\n```shell\n$ git clone https://github.com/csarven/mayktso\n$ cd mayktso\n$ npm install\n```\n\n\n## Receiver\nServer runs on http://localhost:3000/ by default:\n\n```shell\n$ node index.js\n```\n\n### Config\nOptional config use: `cp config.json.default config.json`\n```json\n{\n  \"port\": \"3000\",\n  \"sslKey\": \"/path/to/privkey.pem\",\n  \"sslCert\": \"/path/to/cert.pem\",\n  \"proxyURL\": \"http://example.org/proxy?uri=\",\n  \"rootPath\": \".\",\n  \"basePath\": \"\",\n  \"inboxPath\": \"inbox/\",\n  \"queuePath\": \"queue/\",\n  \"maxPayloadSize\": 100000,\n  \"maxResourceCount\": 10,\n}\n```\n\n* Defaults will be used for omitted key/values (except `sslKey`/`sslCert` are\nunused)\n* `basePath` is useful when running as a reverse proxy in a dedicated directory\n(e.g., Apache)\n```apache\nProxyPass /foo/ https://localhost:3000/\nProxyPassReverse /foo/ https://localhost:3000/\n```\n\nso that http://example.org/foo/bar resolves, otherwise, server only sees /bar\ne.g., `basePath: \"/foo/bar/\"`\n\n* `inboxPath` and `queuePath` are relative to root e.g.,\nhttp://localhost:3000/{inbox,queue}/\n* queue is used for HTTP 202 responses (default for payload above maxPayloadSize\nin bytes). Status: Testing\n* `rootPath` defaults to the current directory (`.`) or a full path can be\nspecified. Requests are relative to this location.\n* `maxPayloadSize` is for POSTs (as the name suggests)\n* `maxResourceCount` is for number of notifications to keep in inbox/ or queue\n\n\n* Simple data shape check that's based off https://linkedresearch.org/cloud 's\nneeds. It is triggered by having a line like this\n`\"checkDataShape\": [ { \"uri\": \"inbox/linkedresearch.org/cloud/\" } ]`. This needs\nto be better documented and built further.\n\n## Sender and Consumer\n\n### Command line\n```shell\n$ node index.js --help\nmayktso: https://github.com/csarven/mayktso\n  * Running without parameter/option starts server, otherwise:\n  * Usage: node index.js [parameter] [options]\n    [parameter]\n    --help\n    --discoverInbox \u003cURI\u003e        Discover a target's Inbox\n    --getNotifications \u003cURI\u003e     Get the notifications contained in an Inbox\n    --head \u003cURI\u003e                 Headers of a URI\n    --options \u003cURI\u003e              Check the options of a URI\n    --get \u003cURI\u003e [options]        Dereference a resource to RDF\n    --post \u003cURI\u003e [options]       Send notification to Inbox\n    --put \u003cURI\u003e [options]        Store data under a URI\n    [options]\n    --accept (m, default: application/ld+json)\n    --contentType (m, default: application/ld+json)\n    --slug string\n    -d, --data \u003cdata\u003e\n    -o, --outputType (m, default: application/ld+json)\n    m: mimetype or format; jsonld, turtle\n```\n\n```shell\n$ node index.js --discoverInbox http://localhost:3000/ --accept \\\napplication/ld+json\n$ node index.js --getNotifications http://localhost:3000/inbox/abc --accept \\\napplication/ld+json\n$ node index.js --head http://localhost:3000/\n$ node index.js --get http://localhost:3000/ --accept application/ld+json\n$ node index.js --post http://localhost:3000/inbox/ --slug foo \\\n--contentType application/ld+json -d \\\n'[{\"@id\":\"http://example.org/foo\",\"http://schema.org/name\":\"Foo\"}]'\n$ node index.js --put http://localhost:3000/inbox/ --contentType \\\napplication/ld+json -d \\\n'[{\"@id\":\"http://example.org/foo\",\"http://schema.org/name\":\"Foo\"}]'\n```\n\nOr just curl:\n```shell\n# Get target URL\n$ curl -i -H'Accept: application/ld+json' http://localhost:3000/\n$ curl -I -H'Accept: application/ld+json' http://localhost:3000/\n$ curl -i -X OPTIONS -H'Accept: application/ld+json' http://localhost:3000/\n\n# Send to Inbox\n$ curl -i -X POST -H'Content-Type: application/ld+json' \\\n-d '[{\"@id\":\"\",\"http://schema.org/name\":\"Foo\"}]' http://localhost:3000/inbox/\n$ curl -i -X POST -H'Content-Type: text/turtle' \\\n-d '\u003c\u003e \u003chttp://schema.org/name\u003e \"Bar\" .' http://localhost:3000/inbox/\n\n# Get Inbox URL\n$ curl -i -H'Accept: application/ld+json' http://localhost:3000/inbox/\n$ curl -i -H'Accept: application/ld+json, text/turtle' \\\nhttp://localhost:3000/inbox/\n$ curl -i -H'Accept: text/turtle, application/ld+json' \\\nhttp://localhost:3000/inbox/\n$ curl -I -H'Accept: application/ld+json' http://localhost:3000/inbox/\n$ curl -I -H'Accept: text/turtle' http://localhost:3000/inbox/\n\n# Location header in POST response\n$ curl -i http://localhost:3000/inbox/abc\n$ curl -i -H'Accept: application/ld+json' http://localhost:3000/inbox/abc\n$ curl -i -H'Accept: text/turtle' http://localhost:3000/inbox/abc\n$ curl -i -H'Accept: application/ld+json, text/turtle' \\\nhttp://localhost:3000/inbox/abc\n$ curl -i -H'Accept: text/turtle, application/ld+json' \\\nhttp://localhost:3000/inbox/abc\n$ curl -I http://localhost:3000/inbox/abc\n$ curl -I -H'Accept: application/ld+json' http://localhost:3000/inbox/abc\n$ curl -i -X OPTIONS -H'Accept: application/ld+json' \\\nhttp://localhost:3000/inbox/abc\n```\n\n## Dependencies\n* [SimpleRDF](https://github.com/simplerdf/simplerdf) (MIT License) used for RDF\n* [Express](https://github.com/expressjs/express)\n* and other node libraries for general plumbing\n\n## License\n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nSee the files [LICENSE](LICENSE) and [NOTICE](NOTICE) for required notices.\n\n## See also\n* mayktso is based on [Linked Data Platform](https://www.w3.org/TR/ldp/)\nmechanisms\n* [Linked Data Notifications](https://www.w3.org/TR/ldn/) conformant (use\nmayktso as a receiver for your Inbox)\n* Motived by [node-solid-server](https://github.com/solid/node-solid-server)\n* Compliments [dokieli](https://github.com/linkeddata/dokieli)\n\n## Contributors\n* [Amy Guy](https://github.com/rhiaro)\n* [Benjamin Young](https://github.com/BigBlueHat)\n* [Dmitri Zagidulin](https://github.com/dmitrizagidulin)\n* [Ruben Taelman](https://github.com/rubensworks)\n* [Sarven Capadisli](https://github.com/csarven) (maintainer)\n* [Stian Soiland-Reyes](https://orcid.org/0000-0001-9842-9718)\n* Your name here. :)\n\n\n## How to contribute\n* Use it! Break things.\n* Report [issues](https://github.com/csarven/mayktso/issues/) and document.\n* Fix issues.\n* Request new features.\n* .. and however else you want to contribute.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsarven%2Fmayktso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsarven%2Fmayktso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsarven%2Fmayktso/lists"}