https://github.com/cheminfo/rest-on-couch

Interface to couchDB with user rights management

https://github.com/cheminfo/rest-on-couch

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.8%) to scientific vocabulary

Keywords

couchdb

Keywords from Contributors

nmr nmr-spectroscopy archival projection interactive generic sequences versions tracing charts
Last synced: 6 months ago · JSON representation

Repository

Interface to couchDB with user rights management

Basic Info
Statistics
  • Stars: 13
  • Watchers: 4
  • Forks: 2
  • Open Issues: 41
  • Releases: 42
Topics
couchdb
Created over 10 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License

README.md

rest-on-couch

NPM version build status codecov npm download

Interface to CouchDB that allows the control of permissions on the documents.

REST API

API documentation

Configuration

The configuration is being read on-load from many sources, in the following order (ascending priority):

  1. Default configuration. Some configuration elements have default values. They are defined in the source code
  2. Main configuration file (config.js or config.json in ROC's home directory). See this configuration example which is used for the dev server.
  3. Database configuration file (config.js in database's subdirectory)
  4. Environment variable (uppercase snake-case with REST_ON_COUCH_ prefix)
  5. Custom config file passed with --config in the CLI

Main options

url

Type: string
Default: 'http://localhost:5984'
URL of the CouchDB server.

username

Type: string
Default: undefined
Username for CouchDB connection.

password

Type: string
Default: undefined
Password for CouchDB connection.

logLevel

Type: string
Default: 'WARN'
Level of the logs stored in the database. Possible values are FATAL (1), ERROR (2), WARN (3), INFO (4), DEBUG (5) and TRACE (6). Logs are only inserted if the current level is equal or higher to the log's level.

authRenewal

Type: number
Default: 570
Time in seconds that the application waits before revalidating the session with CouchDB. This number should be smaller than the session's cookie life.

Server options

port

Type: number
Default: 3000
Port used by the rest-on-couch server.

auth

Type: object
Default: {couchdb:{}}
Object describing the authentication strategies that are available and providing options to them.

proxy

Type: boolean
Default: true
Set to true if your application is behind a proxy and needs to trust X-Forwarded- headers.

proxyPrefix

Type: string
Default: '/'
If the proxy is not at the root level of the URL, set this value to the corresponding prefix.

allowedOrigins

Type: array<string>
Default: []
If cross-origin calls need to be done, set the list of trusted origins here.

sessionDomain

Type: string
Default: undefined
Domain of the session cookie.

sessionKey

Type: string Default: 'roc:sess' Key of the session cookie.

sessionPath

Type: string Default: '/' Path of the session cookie.

sessionSecure

Type: boolean
Default: false
Set to true if the cookie should only be valid on secure URLs.

sessionSameSite

Type: string Default: 'lax' Value of the "SameSite" cookie option. Set to 'strict', 'lax', or 'none'.

debugrest

Type: boolean
Default: false
If set to true, a stack trace will be print to the body of the response when an error occurs.
Do not use this in production!

Setup environment with Docker (for running tests)

bash docker-compose up -d

Go to http://localhost:5984/_utils/#setup

  • Single node
  • username: admin, password: admin
  • bind address: 0.0.0.0
  • Execute the bash script ./setupDatabase.sh
  • Execute the tests: npm t

Automatic importation

rest-on-couch is able to watch folders and to automatically import data in the database.

A specific userguide is available here.

License

MIT

Owner

  • Name: Cheminfo
  • Login: cheminfo
  • Kind: organization

GitHub Events

Total
  • Create event: 25
  • Issues event: 7
  • Release event: 5
  • Delete event: 21
  • Issue comment event: 38
  • Push event: 28
  • Pull request event: 37
  • Pull request review event: 11
  • Pull request review comment event: 7
Last Year
  • Create event: 25
  • Issues event: 7
  • Release event: 5
  • Delete event: 21
  • Issue comment event: 38
  • Push event: 28
  • Pull request event: 37
  • Pull request review event: 11
  • Pull request review comment event: 7

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 1,236
  • Total Committers: 9
  • Avg Commits per committer: 137.333
  • Development Distribution Score (DDS): 0.603
Past Year
  • Commits: 8
  • Committers: 2
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.375
Top Committers
Name Email Commits
Daniel Kostro k****d@g****m 491
Michaël Zasso t****s@p****m 455
Michaël Zasso m****e@g****m 202
cheminfo-bot 1****t 35
dependabot[bot] 4****] 17
lpatiny l****y 15
Luc Patiny l****c@p****m 8
Kevin Jablonka 3****m 7
cheminfo bot a****n@c****g 6
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 36
  • Total pull requests: 150
  • Average time to close issues: 3 months
  • Average time to close pull requests: 22 days
  • Total issue authors: 3
  • Total pull request authors: 4
  • Average comments per issue: 1.03
  • Average comments per pull request: 1.2
  • Merged pull requests: 106
  • Bot issues: 0
  • Bot pull requests: 48
Past Year
  • Issues: 6
  • Pull requests: 58
  • Average time to close issues: 5 days
  • Average time to close pull requests: 14 days
  • Issue authors: 2
  • Pull request authors: 4
  • Average comments per issue: 0.0
  • Average comments per pull request: 1.26
  • Merged pull requests: 31
  • Bot issues: 0
  • Bot pull requests: 27
Top Authors
Issue Authors
  • stropitek (17)
  • targos (16)
  • lpatiny (3)
Pull Request Authors
  • stropitek (53)
  • dependabot[bot] (48)
  • cheminfo-bot (41)
  • targos (8)
Top Labels
Issue Labels
bug (5) enhancement (2) import (1) server (1) core (1)
Pull Request Labels
dependencies (48) autorelease: tagged (31) javascript (19) autorelease: pending (10)

Packages

  • Total packages: 1
  • Total downloads:
    • npm 61 last-month
  • Total dependent packages: 2
  • Total dependent repositories: 1
  • Total versions: 92
  • Total maintainers: 4
npmjs.org: rest-on-couch

Interface to CouchDB that allows the control of permissions on the documents

  • Versions: 92
  • Dependent Packages: 2
  • Dependent Repositories: 1
  • Downloads: 61 Last month
Rankings
Downloads: 8.4%
Stargazers count: 8.8%
Dependent packages count: 8.8%
Average: 9.2%
Forks count: 9.8%
Dependent repos count: 10.3%
Last synced: 6 months ago

Dependencies

package-lock.json npm
  • 743 dependencies
package.json npm
  • @vitejs/plugin-react-refresh ^1.3.6 development
  • dotenv ^16.0.1 development
  • dotenv-cli ^5.1.0 development
  • eslint ^8.18.0 development
  • eslint-config-cheminfo ^8.0.1 development
  • eslint-config-cheminfo-react ^9.0.1 development
  • jest ^28.1.1 development
  • jquery ^3.6.0 development
  • make-promises-safe ^5.1.0 development
  • nodemon ^2.0.16 development
  • prettier ^2.7.1 development
  • prop-types ^15.8.1 development
  • react ^17.0.2 development
  • react-dom ^17.0.2 development
  • react-redux ^7.2.8 development
  • react-router-dom ^5.3.1 development
  • react-select2-wrapper ^1.0.4-beta6 development
  • redux ^4.2.0 development
  • redux-actions ^2.6.5 development
  • redux-persist ^6.0.0 development
  • redux-promise-middleware ^6.1.2 development
  • redux-thunk ^2.4.1 development
  • rimraf ^3.0.2 development
  • select2 ^4.0.13 development
  • supertest ^6.2.3 development
  • vite ^2.9.12 development
  • @koa/router ^10.1.1
  • commander ^9.3.0
  • debug ^4.3.4
  • delay ^5.0.0
  • extend ^3.0.2
  • fold-to-ascii ^5.0.0
  • fs-extra ^10.1.0
  • got ^11.8.3
  • has-own ^1.0.1
  • immer ^9.0.15
  • kcors ^2.2.2
  • klaw ^4.0.1
  • koa ^2.13.4
  • koa-bodyparser ^4.3.0
  • koa-compose ^4.1.0
  • koa-hbs ^1.0.0
  • koa-passport ^4.1.4
  • koa-response-time ^2.1.0
  • koa-session ^6.2.0
  • koa-static ^5.0.0
  • ldapjs ^2.3.3
  • lodash ^4.17.21
  • minimist ^1.2.6
  • object-hash ^3.0.0
  • passport-facebook ^3.0.0
  • passport-github ^1.1.0
  • passport-google ^0.3.0
  • passport-google-oauth20 ^2.0.0
  • passport-ldapauth ^3.0.1
  • passport-local ^1.0.0
  • randomatic ^3.1.1
  • raw-body ^2.5.1
  • zenodo ^1.0.2
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/init v2 composite
.github/workflows/dockerimage.yml actions
  • actions/checkout v3 composite
.github/workflows/nodejs.yml actions
  • actions/checkout v3 composite
  • actions/setup-node v3 composite
  • codecov/codecov-action v3 composite
  • couchdb latest docker
  • ghcr.io/zakodium/ldap-with-users 1 docker
.github/workflows/release.yml actions
  • actions/checkout v3 composite
  • actions/setup-node v3 composite
  • google-github-actions/release-please-action v3 composite
Dockerfile docker
  • node 16 build
docker-compose.yml docker
  • couchdb 3.2
  • ghcr.io/zakodium/ldap-with-users 1