{"id":18345685,"url":"https://github.com/digital-science/physiome-coko","last_synced_at":"2025-10-30T16:30:55.510Z","repository":{"id":71331442,"uuid":"193111740","full_name":"digital-science/physiome-coko","owner":"digital-science","description":"Journal article submission system for the Physiome Journal.","archived":false,"fork":false,"pushed_at":"2020-04-26T02:53:08.000Z","size":3472,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-23T18:25:30.448Z","etag":null,"topics":["bpm","camunda","camunda-modeller","figshare","pegjs","postgres"],"latest_commit_sha":null,"homepage":"https://journal.physiomeproject.org","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digital-science.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-06-21T14:28:13.000Z","updated_at":"2022-09-25T02:44:58.000Z","dependencies_parsed_at":"2023-03-01T10:16:01.748Z","dependency_job_id":null,"html_url":"https://github.com/digital-science/physiome-coko","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/digital-science%2Fphysiome-coko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-science%2Fphysiome-coko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-science%2Fphysiome-coko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-science%2Fphysiome-coko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digital-science","download_url":"https://codeload.github.com/digital-science/physiome-coko/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239003243,"owners_count":19566258,"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":["bpm","camunda","camunda-modeller","figshare","pegjs","postgres"],"created_at":"2024-11-05T21:08:58.720Z","updated_at":"2025-10-30T16:30:53.788Z","avatar_url":"https://github.com/digital-science.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Physiome Submission System\n\n_Physiome_ publishes reproducible and reusable mathematical models of physiological processes where the experimental details and model validation have been published or accepted for publication in a recognised 'primary' peer-reviewed journal.\nPhysiome curators will help authors ensure that models and simulation experiments are made available using appropriate community standards prior to acceptance for publication in Physiome.\n\nMore details about the Physiome Journal itself can be found here:\u003cbr /\u003e\n\u003chttps://journal.physiomeproject.org\u003e\u003cbr /\u003e\n\u003chttps://auckland.figshare.com/articles/Presentation_COMBINE2019_pdf/9037403\u003e\n\nThe piece of software held in this repository is designed to facilitate the submission of manuscripts to the Physiome journal. Submitters\nare able to upload their manuscript file, specify additional metadata such as authors, funding etc. and then submit\nthese to the journal for consideration. Subsequently, the journals curators able to use the administrative functions within the software\nplatform to manage submissions, make editorial modifications and finally publish accepted manuscripts and models through\ninto the Physiome figshare instance.\n\nVideos showing briefly the functions of the software can be found on figshare here:\n\u003chttps://figshare.com/articles/Physiome_Submission_System_-_example_videos/9868016\u003e\n\nThis development utilises and builds upon the PubSweet application core managed by the Coko Foundation and wider PubSweet community.\n\nPubSweet Project:\u003cbr /\u003e\n\u003chttps://gitlab.coko.foundation/pubsweet/pubsweet\u003e\n\nCoko Foundation:\u003cbr /\u003e\n\u003chttps://coko.foundation/\u003e\n\n## Getting Started\n\n### Prerequisites\n\nFor local development the easiest way to get started is to have Docker installed and run the following services on Docker to link to the Physiome submission system instance.\n\n * NodeJS\n * Yarn\n * Docker (for local development ease)\n * Camunda BPM ([camunda/camunda-bpm-platform:latest](https://hub.docker.com/r/camunda/camunda-bpm-platform/)) \n * Postgres ([postgres:latest](https://hub.docker.com/r/camunda/camunda-bpm-platform/))\n * Camunda Modeller ([download](https://camunda.com/download/modeler/)) - for viewing/modifying BPM model documents\n\n### Services (local development)\n\nCreate a new Postgres instance\n```console\ndocker run -d --name physiome-postgres -p 5432:5432 postgres:latest\n```\n\nCreate a new Camunda BPM Engine instance\n```console\ndocker run -d --name physiome-camunda -p 8080:8080 camunda/camunda-bpm-platform:latest\n```\n\n### Setup\n\nFrom the root project directory perform the following\n```console\nyarn install\nyarn dsl-compile\n```\n\n### Configuration\n\nThe application itself pulls configuration from several different locations:\n\n * Within the file \u003ccode\u003e/packages/app/config/default.js\u003c/code\u003e an overview and the default values utilised within the application can be found.\n * Run-time environment can also effect the aggregated configuration. The default configuration\n noted above is then supplemented with \u003ccode\u003e/packages/app/config/test.js\u003c/code\u003e for example when running\n in the \"test\" environment.\n * Environment variables for the NodeJS application are utilised in certain defaults. These\n environment variables can be provided at run-time or via the .env located \u003ccode\u003e/packages/app/.env\u003c/code\u003e\n\nExample \".env\" file for local development:\n\n```\nPUBSWEET_SERVER_SECRET=\u003creplace with JWT secret\u003e\n\nWORKFLOW_FILE_IDENTIFIER_DOMAIN=physiome-submission-dev.ds-innovation-experiments.com\nAWS_S3_ACCESS_KEY=\u003creplace with S3 access key\u003e\nAWS_S3_SECRET_KEY=\u003creplace with S3 secret key\u003e\nAWS_S3_REGION=\u003creplace with S3 region\u003e\nAWS_S3_BUCKET=\u003creplace with S3 bucket name\u003e\n\nORCID_CLIENT_ID=\u003creplace with ORCiD API client ID\u003e\nORCID_CLIENT_SECRET=\u003creplace with ORCiD API client secret\u003e\n\nAWS_SES_ACCESS_KEY=\u003creplace with SES access key\u003e\nAWS_SES_SECRET_KEY=\u003creplace with SES secret key\u003e\nAWS_SES_REGION=\u003creplace with SES region\u003e\n\nFIGSHARE_API_BASE=https://api.figsh.com/v2/\nFIGSHARE_API_TOKEN=\u003creplace with figshare API token\u003e\n\nPUBLISH_FIGSHARE_TYPE=\"journal contribution\"\nPUBLISH_FIGSHARE_GROUP_ID=\u003creplace with figshare group id\u003e\nPUBLISH_FIGSHARE_CATEGORIES=4,12,135\n\nDIMENSIONS_API_BASE=https://app.dimensions.ai/api\nDIMENSIONS_API_USERNAME=\u003creplace with dimensions API username\u003e\nDIMENSIONS_API_PASSWORD=\u003creplace with dimensions API password\u003e\n\nSTRIPE_IS_PRODUCTION=false\nSTRIPE_SECRET_KEY=\u003creplace with stripe secret key\u003e\nSTRIPE_PUBLISHABLE_KEY=\u003creplace with stripe public key\u003e\nSTRIPE_WEBHOOK_SECRET_KEY=\u003creplace with stripe web hook secret key\u003e\n\nIDENTITY_ADMIN_USERS=\u003ccomma separated list of ORCID IDs for admin users\u003e\n\nEMAIL_SEND_FROM=Physiome Journal \u003cphysiome-curators@physiomeproject.org\u003e\nEMAIL_SUBJECT_PREFIX=\"Physiome submission system:\"\nEMAIL_SIGNATURE=\"Kind regards,\\nPhysiome curation team\\nphysiome-curators@physiomeproject.org\"\nEMAIL_RESTRICTED_TO=\u003creplace with restricted email addresses for dev/test environment, empty for production\u003e\nEMAIL_EDITORS_MAILING_LIST=\"physiome-editors@physiomeproject.org\"\n```\n\n * The business logic is described within \u003ccode\u003e/definitions/physiome-submission-v2.bpmn\u003c/code\u003e. This file\n can be opened using the Camunda Modeler application. It describes the tasks and steps a submission\n goes through, including any \"external tasks\" such as sending an email or publishing to figshare.\n * The description of how these components all fit together (the glue so to speak) is defined within the file \n \u003ccode\u003e/definitions/physiome-submission.wfd\u003c/code\u003e. This contains a custom domain-specific language that\n is \"compiled\" via PegJS into a JSON file representation. The compiled representation can be found\n within \u003ccode\u003e/packages/app/config/description.json\u003c/code\u003e\n \nThe minimum required to get this configured locally for testing things out is to create the .env\nfile and provide it with the required values for S3, SES and ORCID. The figshare options do\nnot need to be specified for local development purposes (unless you have access to a test figshare instance).\n\nFor deployment purposes or to utilise a database/BPM from another machine, it is also possible\nto define a Postgres database and Camunda engine located elsewhere using the following environment\nvariables:\n\n```\nDATABASE=\u003cpostgres database name\u003e\nDB_USER=\u003cpostgres username\u003e\nDB_PASS=\u003cpostgres password\u003e\nDB_HOST=\u003cpostgres server hostname\u003e\nWORKFLOW_API_URI=http://\u003ccamunda hostname\u003e:8080/engine-rest\n\n```\n\n## Deployment\n\nWe need to compile the current \"Workflow Description\". This will use the PegJS created processor to\nread in the file \u003ccode\u003e/definitions/award-submission.wfd\u003c/code\u003e and process it into the description JSON\nfile located within \u003ccode\u003e/packages/app/config/description.json\u003c/code\u003e\n```console\nyarn desc\n```\n\nIn order for Camunda to know about the business logic model we wish to use, it needs to be deployed to the Camunda instance.\nThis will happen automatically as part of a Knex database migration script.\n\n\n## Running\n\nWith all of the above configured and deployed it is now possible to run the application.\n\nFrom the root directory of the project, run the following command:\n```console\nyarn start\n```\n\nThis will kick off the initial database setup steps (including BPM deployments) and then run the backend GraphQL endpoint. It will also run webpack\nover the front-end application and expose it for testing.\n\nNavigate in your local browser of preference to: [http://localhost:3000](http://localhost:3000)\n\n## Notes\n\n![BPM workflow example](docs/screen-workflow-exmaple.png)\n\nThe BPMN workflow (as seen above from the Camunda Modeller) describes the workflow and possible actions at each stage a submission\nmay go through during its lifetime. It also describes any third-party integrations, defining where and when they are enacted\nduring the process of a submission. Each task within the BPM definition has specific attributes which tie into the workflow description\n(expressed in our custom DSL) which defines what form is associated with a task. The workflow description also includes\ndetails relating to user interface elements, data models, validations and access control restrictions on data.\n\n![DSL example](docs/screen-dsl-example.png)\n\nThe above example workflow description shows validations that are applied during the manuscript submission phase, including\nthe end-user warnings that are displayed when a validation fails. The example layout also shows how the\nsubmission form itself is generated, including the links between a form element and the data model it targets.\n\n\u003cbr /\u003e\nThe code relating to how the DSL language takes the data model and transforms this into a representation \nused within the PubSweet core is in need of a refactoring, so please ignore the code smell that lingers in these parts.\n\n\n\n## Videos/Screenshots\n\nScreenshot: Manuscript submission form\n![Screenshot, Manuscript Submission](docs/screen-submission.png)\n\nScreenshot: Administration view with submissions listing\n![Screenshot, Admin Listing](docs/screen-admin-list.png)\n\nScreenshot: Administration view, submission details\n![Screenshot, Admin Submission details](docs/screen-admin-details.png)\n\nVideos of functionality can be seen here:\n\u003chttps://figshare.com/articles/Physiome_Submission_System_-_example_videos/9868016\u003e\n\n## Contact\n\nPlease feel free to contact Jared Watts (j.watts@digital-science.com) about this project. To contact the Physiome journal, physiome@physiomeproject.org.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-science%2Fphysiome-coko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigital-science%2Fphysiome-coko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-science%2Fphysiome-coko/lists"}