Bible translation project management API.
- Docker
- Node 16+
- yarn
API can be started directly with:
docker-compose up
- Ensure you are using at least node v12.17+. Node 14 is recommended.
- Use docker to run a database locally:
docker-compose up -d db. To update your db image:docker-compose pull db. - Create a
.env.localfile in the root of the project and specify your username and password used at database creation:NEO4J_USERNAME=neo4j NEO4J_PASSWORD=admin
- Run
yarnto install dependencies
Develop: yarn start:dev
Test: yarn test:e2e
See scripts in package.json for other commands to run
Delete all data, for small data sizes (n < 100k-ish)
match (n) detach delete n
Delete all data in a large DB (must have the APOC plugin installed)
call apoc.periodic.iterate("MATCH (n) return n", "DETACH DELETE n", {batchSize:1000})
yield batches, total return batches, total
Delete all constraints and indexes (must have the APOC plugin installed)
call apoc.schema.assert({}, {})
Return number of nodes in DB
match (n) return count(n)
Return all data (don't use for large DBs)
match (n) return n
Cord Database Schema
Cord Property Table
Nest.js
Cypher Query Builder
Cypher Syntax
GraphQL
- When an API server bootstraps, it will create a root
:Userand a:RootSecurityGroupusing theROOT_ADMIN_EMAILandROOT_ADMIN_PASSWORDenvironment variables. It is not necessary to define those variables as defaults are used (devops@tsco.organdadmin); - User permissions are granted by their role. Roles are defined in the
authorizationservice. Currently roles are only updated via the graphql API (http://localhost:3000/graphql), there is no front end UI for changing roles.
CORD is MIT licensed.