{"id":18257027,"url":"https://github.com/mediacomem/biopocket-backend","last_synced_at":"2025-08-11T22:37:33.405Z","repository":{"id":42362731,"uuid":"111081423","full_name":"MediaComem/biopocket-backend","owner":"MediaComem","description":"Backend API of the BioPocket project","archived":false,"fork":false,"pushed_at":"2023-01-11T00:56:10.000Z","size":2819,"stargazers_count":1,"open_issues_count":20,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-02T16:39:36.770Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mediacomem.github.io/biopocket-backend/","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/MediaComem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-17T08:58:10.000Z","updated_at":"2024-05-21T03:19:17.000Z","dependencies_parsed_at":"2023-02-08T21:02:44.020Z","dependency_job_id":null,"html_url":"https://github.com/MediaComem/biopocket-backend","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/MediaComem/biopocket-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaComem%2Fbiopocket-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaComem%2Fbiopocket-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaComem%2Fbiopocket-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaComem%2Fbiopocket-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MediaComem","download_url":"https://codeload.github.com/MediaComem/biopocket-backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaComem%2Fbiopocket-backend/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269969584,"owners_count":24505430,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-05T10:24:36.493Z","updated_at":"2025-08-11T22:37:33.367Z","avatar_url":"https://github.com/MediaComem.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BioPocket Backend\n\nThe API for the BioPocket project, implemented with a Node.js Express server.\n\n[![Dependency Status](https://gemnasium.com/badges/github.com/MediaComem/biopocket-backend.svg)](https://gemnasium.com/github.com/MediaComem/biopocket-backend)\n[![Build Status](https://travis-ci.org/MediaComem/biopocket-backend.svg?branch=master)](https://travis-ci.org/MediaComem/biopocket-backend)\n[![Coverage Status](https://coveralls.io/repos/github/MediaComem/biopocket-backend/badge.svg?branch=master)](https://coveralls.io/github/MediaComem/biopocket-backend?branch=master)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE.txt)\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n\n- [Requirements](#requirements)\n- [Development](#development)\n  - [First-time setup](#first-time-setup)\n  - [Run the server](#run-the-server)\n  - [Upgrade to the latest version](#upgrade-to-the-latest-version)\n  - [Contribute](#contribute)\n- [Configuration](#configuration)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n\n\n## Requirements\n\n* [Node.js][node] 8.x\n* [PostgreSQL][postgresql] 9+\n  * [PostGIS][postgis] 2.2+ extension\n  * [uuid-ossp][uuid-ossp] extension\n\nOptional development utilities:\n\n* [Knex][knex] (install with `npm install -g knex`)\n\n\n\n## Development\n\nHow to set up your machine to contribute to the project.\n\n### First-time setup\n\n* Clone this repository:\n\n      git clone https://github.com/MediaComem/biopocket-backend.git\n\n* Install the application's dependencies:\n\n      cd biopocket-backend\n      npm ci\n\n* Create a `config/local.js` configuration file to customize the database\n  connection URL and other properties (see [Configuration][config]):\n\n      cp config/local.sample.js config/local.js\n\n* Create a PostgreSQL database consistent with your configuration (a `biopocket`\n  database on `localhost` by default). If the user you connect as does not have\n  the necessary privileges to create extensions, you should make sure that the\n  `postgis` and `uuid-ossp` extensions are already created in the database:\n\n      psql -c 'CREATE EXTENSION \"postgis\"; CREATE EXTENSION \"uuid-ossp\";' biopocket\n\n* Migrate the database:\n\n      npm run migrate\n\n* Generate sample data:\n\n      npm run sample-data\n\n### Run the server\n\n* Run the `dev` npm script:\n\n      npm run dev\n\n### Upgrade to the latest version\n\n* Update your branch (and resolve any conflicts):\n\n      git pull\n\n* Install new application dependencies (if any):\n\n      rm -fr node_modules\n      npm ci\n\n* Migrate the database (if new migrations were added):\n\n      npm run migrate\n\n* Run the server:\n\n      npm run dev\n\n### Contribute\n\nRead the [development guide][dev-guide].\n\n\n\n## Configuration\n\nThe application can be configured through environment variables or a configuration file.\nEnvironment variables always take precedence over properties from the\nconfiguration file.\n\n| Environment variable      | Config property | Default                          | Purpose                                                                                                                    |\n| :---                      | :---            | :---                             | :---                                                                                                                       |\n| `$BCRYPT_COST`            | `bcryptCost`    | 10                               | bcrypt cost parameter (should be at least 10; see [bcrypt][bcrypt])                                                        |\n| `$CONFIG`                 |                 | `config/local.js`                | Path to the local configuration file to load                                                                               |\n| `$CORS`                   | `cors.enabled`  | `false`                          | Whether to enable Cross-Origin Request Sharing (CORS)                                                                      |\n| `$CORS_ORIGIN`            | `cors.origin`   |                                  | Comma-delimited whitelist of origins that are allowed to use CORS (setting this enables CORS by default)                   |\n| `$DATABASE_URL`           | `db`            | `postgres://localhost/biopocket` | PostgreSQL database URL to connect to                                                                                      |\n| `$IMAGES_BASE_URL`        | `imagesBaseUrl` |                                  | Base URL where theme, action and task images are stored.                                                                   |\n| `$INTERFACE_DATABASE_URL` | `interfaceDb`   |                                  | PostgreSQL database URL for the data collection interface database (see [Synchronization](DEVELOPMENT.md#synchronization)) |\n| `$LOG_LEVEL`              | `logLevel`      | `INFO`                           | Log level (`TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL`)                                                             |\n| `$NODE_ENV`               | `env`           | `development`                    | Application environment (`development` or `production`)                                                                    |\n| `$PORT`                   | `port`          | `3000`                           | Port to run the Node.js Express server on                                                                                  |\n| `$SESSION_SECRET`         | `sessionSecret` |                                  | Session secret used to sign JWT tokens (a long random string, e.g. 100 chars)                                              |\n\nIf the database URL is not specified with `$DATABASE_URL` or `db`, you can use these environment variables instead:\n\n| Environment variable | Default     | Purpose                                   |\n| :---                 | :---        | :---                                      |\n| `$DATABASE_HOST`     | `localhost` | Host to connect to                        |\n| `$DATABASE_PORT`     | `5432`      | Port to connect to on the host            |\n| `$DATABASE_NAME`     | `biopocket` | Name of the database to connect to        |\n| `$DATABASE_USERNAME` | none        | Name of the PostgreSQL user to connect as |\n| `$DATABASE_PASSWORD` | none        | Password to authenticate with             |\n\nIf the database URL for the data collection interface is not specified with `$INTERFACE_DATABASE_URL` or `interfaceDb`, you can use these environment variables instead:\n\n| Environment variable           | Default     | Purpose                                   |\n| :---                           | :---        | :---                                      |\n| `$INTERFACE_DATABASE_HOST`     | `localhost` | Host to connect to                        |\n| `$INTERFACE_DATABASE_PORT`     | `5432`      | Port to connect to on the host            |\n| `$INTERFACE_DATABASE_NAME`     | `biopocket` | Name of the database to connect to        |\n| `$INTERFACE_DATABASE_USERNAME` | none        | Name of the PostgreSQL user to connect as |\n| `$INTERFACE_DATABASE_PASSWORD` | none        | Password to authenticate with             |\n\nThe following properties can be used in development to customize how the project's documentation is served locally:\n\n| Environment variable | Config property | Default     | Purpose                                                                                                           |\n| :---                 | :---            | :---        | :---                                                                                                              |\n| `$DOCS_BROWSER`      | `docs.browser`  |             | Browser to open                                                                                                   |\n| `$DOCS_HOST`         | `docs.host`     | `127.0.0.1` | Host to serve the documentation on                                                                                |\n| `$DOCS_OPEN`         | `docs.open`     | `false`     | Whether to automatically open the browser with the documentation when running `npm run dev` or `npm run dev:docs` |\n| `$DOCS_PORT`         | `docs.port`     |             | Port to serve the documentation on (a free random port will be found by default)                                  |\n\n\n\n[bcrypt]: https://en.wikipedia.org/wiki/Bcrypt\n[config]: #configuration\n[dev-guide]: DEVELOPMENT.md\n[knex]: http://knexjs.org\n[node]: https://nodejs.org\n[postgis]: http://postgis.net\n[postgresql]: https://www.postgresql.org\n[uuid-ossp]: https://www.postgresql.org/docs/current/static/uuid-ossp.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmediacomem%2Fbiopocket-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmediacomem%2Fbiopocket-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmediacomem%2Fbiopocket-backend/lists"}