arocapi 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/package.json +4 -2
- package/prisma/models/entity.prisma +17 -0
package/README.md
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
[RO-Crate]: https://www.researchobject.org/ro-crate/specification
|
|
2
|
-
[OCFL]: https://ocfl.io/
|
|
3
|
-
[PILARS]: https://w3id.org/ldac/pilars
|
|
4
|
-
[REMS]: https://trust.aaf.edu.au/rems/
|
|
5
1
|
|
|
6
|
-
|
|
7
|
-
# An RO-Crate API for Data Collections : Arocapi
|
|
2
|
+
# An RO-Crate API for Data Collections : Arocapi
|
|
8
3
|
|
|
9
4
|
This project is a prototype implementation of an RO-Crate based collections archive and data portal based on the Portland Common Data model of collections suitable use in long-term archival repository systems that aim to follow the Protocols for Long Term Archival Repository Services ([PILARS]) <https://w3id.org/ldac/pilars>.
|
|
10
5
|
|
|
11
6
|
The aim is to provide an API-centred reference implementation of a repository with an access-controlled web portal for data dissemination and deposit:
|
|
12
7
|
|
|
13
|
-
- Backend-agnostic RO-Crate storage using pluggable storage-layers
|
|
8
|
+
- Backend-agnostic RO-Crate storage using pluggable storage-layers
|
|
14
9
|
- [OCFL] - the Oxford Common File Layout specification on disk or cloud-based object storage
|
|
15
10
|
- Object Storage as used in [PARADISEC]
|
|
16
11
|
- A simple RO-Crate file layout (TODO - likely a super-simple protocol for directory hierarchy with the presense on RO-Crate used to indicate that everythig under that directory is a single RO-Crate)
|
|
@@ -18,8 +13,6 @@ The aim is to provide an API-centred reference implementation of a repository wi
|
|
|
18
13
|
- Based on the princuple that all data MUST have a implementation-neutral natural-language description of its access conditiions stored with it
|
|
19
14
|
- Licenses may be based on 'traditional' access control lists maintained in software such as PARADISEC or a license manager such as REMS, (TODO: an example implementation using github groups to manage license access, a simple ACL manager?)).
|
|
20
15
|
|
|
21
|
-
|
|
22
|
-
|
|
23
16
|
## Getting started
|
|
24
17
|
|
|
25
18
|
This project was bootstrapped with [Fastify-CLI](https://www.npmjs.com/package/fastify-cli)
|
|
@@ -32,7 +25,9 @@ docker compose up
|
|
|
32
25
|
|
|
33
26
|
# Generate db client
|
|
34
27
|
npx prisma generate
|
|
35
|
-
|
|
28
|
+
|
|
29
|
+
# Apply db migrations
|
|
30
|
+
npx prisma migrate deploy
|
|
36
31
|
|
|
37
32
|
# Run the app
|
|
38
33
|
pnpm run dev
|
|
@@ -59,6 +54,11 @@ Run the test cases.
|
|
|
59
54
|
|
|
60
55
|
Connect to mysql console
|
|
61
56
|
|
|
62
|
-
##
|
|
57
|
+
## Resources
|
|
58
|
+
|
|
59
|
+
- [RO-Crate](https://www.researchobject.org/ro-crate/specification)
|
|
60
|
+
- [OCFL](https://ocfl.io/)
|
|
61
|
+
- [PILARS](https://w3id.org/ldac/pilars)
|
|
62
|
+
- [REMS](https://trust.aaf.edu.au/rems/)
|
|
63
63
|
|
|
64
64
|
To learn Fastify, check out the [Fastify documentation](https://fastify.dev/docs/latest/).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "arocapi",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.5",
|
|
5
5
|
"description": "An RO-Crate API",
|
|
6
6
|
"main": "dist/app.js",
|
|
7
7
|
"exports": {
|
|
@@ -70,7 +70,9 @@
|
|
|
70
70
|
"lint:types": "tsc --noEmit",
|
|
71
71
|
"prepublishOnly": "npm run lint:biome && npm run lint:types && npm run build:ts",
|
|
72
72
|
"generate": "npx prisma generate",
|
|
73
|
-
"postinstall": "npm run generate"
|
|
73
|
+
"postinstall": "npm run generate",
|
|
74
|
+
"db:generate": "prisma generate",
|
|
75
|
+
"db:migrate": "prisma migrate deploy"
|
|
74
76
|
},
|
|
75
77
|
"repository": {
|
|
76
78
|
"type": "git",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
model Entity {
|
|
2
|
+
id Int @id @default(autoincrement())
|
|
3
|
+
rocrateId String @db.VarChar(2048)
|
|
4
|
+
name String @db.VarChar(1024)
|
|
5
|
+
description String @db.Text
|
|
6
|
+
conformsTo String @db.VarChar(2048)
|
|
7
|
+
// NOTE: How should we do recordType, can we infer it from conformsTo?
|
|
8
|
+
// recordType String??
|
|
9
|
+
memberOf String? @db.VarChar(2048)
|
|
10
|
+
root String? @db.VarChar(2048)
|
|
11
|
+
/// RecordType[]
|
|
12
|
+
recordType Json
|
|
13
|
+
rocrate Json
|
|
14
|
+
|
|
15
|
+
createdAt DateTime @default(now())
|
|
16
|
+
updatedAt DateTime @updatedAt
|
|
17
|
+
}
|