{"id":21395504,"url":"https://github.com/kba/anno-common","last_synced_at":"2025-07-13T19:30:25.386Z","repository":{"id":22081880,"uuid":"84607191","full_name":"kba/anno-common","owner":"kba","description":"Node.JS/Browser Web Annotation Framework","archived":false,"fork":false,"pushed_at":"2023-01-10T11:37:12.000Z","size":7466,"stargazers_count":12,"open_issues_count":104,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-30T13:27:36.552Z","etag":null,"topics":["annotation-framework","webannotation"],"latest_commit_sha":null,"homepage":"https://kba.github.io/anno","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kba.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}},"created_at":"2017-03-10T22:49:20.000Z","updated_at":"2024-08-11T11:34:03.000Z","dependencies_parsed_at":"2023-01-13T21:50:33.327Z","dependency_job_id":null,"html_url":"https://github.com/kba/anno-common","commit_stats":null,"previous_names":["kba/anno"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/kba/anno-common","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kba%2Fanno-common","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kba%2Fanno-common/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kba%2Fanno-common/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kba%2Fanno-common/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kba","download_url":"https://codeload.github.com/kba/anno-common/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kba%2Fanno-common/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263951365,"owners_count":23534722,"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":["annotation-framework","webannotation"],"created_at":"2024-11-22T14:20:18.287Z","updated_at":"2025-07-13T19:30:24.471Z","avatar_url":"https://github.com/kba.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# anno\n\n[![Build Status](https://travis-ci.org/kba/anno-common.svg?branch=master)](https://travis-ci.org/kba/anno-common)\n[![Known Vulnerabilities](https://snyk.io/test/github/kba/anno-common/badge.svg?targetFile=anno-server%2Fpackage.json)](https://snyk.io/test/github/kba/anno-common?targetFile=anno-server%2Fpackage.json)\n\n\nLook here for the [documentation](https://kba.github.io/anno-common)\n\nThis monorepo contains packages that provide the building blocks for annotation\nsoftware implementing the [Web Annotation Data\nModel](http://www.w3.org/TR/annotation-model/) and [Web Annotation\nProtocol](http://www.w3.org/TR/annotation-protocol/).\n\nEach repository is designed to provide a single feature to allow for broad\nreuse of components.\n\n\u003c!-- BEGIN-MARKDOWN-TOC --\u003e\n* [Concepts](#concepts)\n\t* [Store](#store)\n\t* [Authentication](#authentication)\n\t* [Revisions](#revisions)\n\t* [Comments / Replies / Nesting](#comments--replies--nesting)\n\t* [URL schema](#url-schema)\n\t* [Extensions to Web Annotation Data Model](#extensions-to-web-annotation-data-model)\n* [Hacking](#hacking)\n\n\u003c!-- END-MARKDOWN-TOC --\u003e\n\n## Concepts\n\n### Store\n\nA store provides persistent storage of annotations. A store exposes methods\nthat reflect the [Web Annotation\nProtocol](http://www.w3.org/TR/annotation-protocol/) and the [extensions\nimplemented of this framework](#extensions-to-web-annotation-data-model).\n\nThe [`store`](./anno-store) module is a\n[proxy](https://en.wikipedia.org/wiki/Proxy_pattern) to the actual\nimplementation. It handles method dispatch and middleware and allows\ninstantiation from the environemnt. Actual stores must implement [its\ninterface](./store/README.md#interface).\n\nThe [`store-mongolike`](./anno-store-mongolike) module implements most of the\n[`store` interface ](./anno-store/README.md#interface) for document databases,\nsuch as [mongodb](https://mongodb.com) or\n[NeDB](https://github.com/louischatriot/nedb).\n\n\u003cimg src=\"./doc/assets/img/store-hierarchy.png\" height=\"300\" title=\"Hierarchy of stores\"/\u003e\n\n\n\n### Authentication\n\nAuthentication is based on [JSON Web Tokens](https://jwt.io/).\n\nTo inspect your tokens, try [jwtinspector browser\nextension](https://www.jwtinspector.io/#) which will detect JWT in HTTP traffic\nand localStorage.\n\n\u003cimg src=\"./doc/assets/img/authentication.png\" height=\"400\" title=\"Authentication flow\"/\u003e\n\n### Revisions\n\nAn `oa:Annotation` has `1..n` `annox:hasVersion` `annox:AnnotationRevision`.\n\n`annox:hasVersion` is an ordered List.\n\nThe top-level `oa:Annotation` has the data from the latest revision as\n\n* `body`\n* `target`\n* `creator`\n\nThe `modified` of the top-level `oa:Annotation` is the `created` of the latest\nrevision.\n\n`hasVersion` is part of the\n[`getMetadata`](https://github.com/kba/anno/tree/master/anno-store/#getmetadata)\nstore call/`HEAD` HTTP call.\n\n### Comments / Replies / Nesting\n\n### URL schema\n\nID is a [nice slugid](https://www.npmjs.com/package/slugid), based on uuid v4\nwithout leading dash\n\n```\n\u003cBASE_URL\u003e/\u003cID\u003e[.\u003cREPLY_ID\u003e]*[~\u003cREVISION_ID\u003e]\n```\n\nE.g.\n\n* `http://localhost:3000/ewnfkjewnfew~2` Second revision\n* `http://localhost:3000/ewnfkjewnfew.2.1~5` Fifth revision of first answer to second answer\n\nReplies reply to the generic not versioned annotation (for sanity)\n\n### Extensions to Web Annotation Data Model\n\nNamespace for extensions is `https://kba.github.io/anno/#`, short `annox`.\n\nContext is at `https://anno.github.io/anno/context.jsonld`\n\n## Hacking\n\nModules are managed by [lerna](https://github.com/lerna/lerna)\n\n```\nnpm install -g lerna\nlerna bootstrap\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkba%2Fanno-common","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkba%2Fanno-common","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkba%2Fanno-common/lists"}