Skip to content

NCATS-Gamma/robokache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robokache

The Q&A store for qgraph.

Workflow:

  1. authenticate via JWT (Google, GitHub, etc.)
  2. push/get your files

Getting started

Prebuilt Images

Prebuilt container images can be found in the following registry: github.com/orgs/NCATS-Gamma/packages/container/package/robokache.

You can pull the latest image using the following command:

docker pull ghcr.io/ncats-gamma/robokache

Local Docker Build

Build the image:

>> docker build -t robokache .

Run the image:

>> docker run -it --name robokache -p 8080:8080 robokache

Native

Install:

>> go get -t ./...

Run:

>> go run ./cmd
  • Go to http://localhost:8080/
  • Sign in via the buttons at the top of the page
  • Copy ID token into authentication field
  • Have fun

Testing

Set up testing certificate:

>> openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout test/certs/test.key -out test/certs/test.cert

Run tests and print coverage:

>> go test ./internal/robokache -coverprofile=cover.out
>> go tool cover -func=cover.out

How it works

Security

  • Auth0 Sign-in
  • document visibility levels:
    • private (1) - only the owner
    • shareable (2) - anyone with the link
    • public (3) - anyone
  • visibility is assigned to both questions and answers
    • the effective visibility of an answer is min(answer.visibility, question.visibility)