Skip to content

Implement shared data model (database & API calls)

See parent ticket #25 (closed)

Leaving point for Yuci:

shared-data-model branch: https://gitlab.coko.foundation/xpub/xpub-epmc/tree/shared-data-model

I copied and modified the code from https://github.com/elifesciences/elife-xpub/tree/develop/server (they have since split their 'xpub' directory into 'xpub-model' and 'xpub-server', which we should as well, since Mohamed would prefer it!) to xpub-epmc/server/xpub on the shared-data-model branch. The system now creates a set of tables with the correct columns, both those from the shared data model and our EPMC-specific extensions.

Here's what still needs to be done:

  • In xpub-epmc/server/xpub/entities/file.index.js elife had integrated their file uploads with an AWS s3 server (commented out). What needs to be done/changed to integrate with Minio?
  • Split xpub into xpub-server and xpub-model, like elife have done since I copied their code.
  • Use GraphQL API (queries, mutations; see resolvers in xpub-epmc/server/xpub/entities/) to interact with database on frontend instead of collection/fragment API. This is a big job & can be left for me to help with when I come back!
  • More checking/removal of elife specific code, addition of necessary epmc code
  • Tests written as in elife component(s)
Edited by Audrey Hamelers