Coder Social home page Coder Social logo

beedleka / thoth Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thoth-pub/thoth

0.0 0.0 0.0 3.71 MB

Metadata management and dissemination system for Open Access books

Home Page: https://thoth.pub

License: Apache License 2.0

Shell 0.03% JavaScript 0.01% Rust 99.44% CSS 0.05% Makefile 0.06% HTML 0.10% PLpgSQL 0.24% Dockerfile 0.08%

thoth's Introduction

Thoth

Open bibliographic metadata management and dissemination system

GitHub Workflow Thoth Releases License Info

About

Thoth (/toʊt, θoʊθ/, Greek Θώθ < Coptic Ⲑⲱⲟⲩⲧ < Egyptian ḏḥwtj) is an Open Dissemination System for Open Access books. Written purely in rust, it consists of:

  • A GraphQL API, implementing a data model specifically designed for OA books
  • A REST API to export metadata in formats like ONIX, MARC, etc.
  • A WebAssembly GUI to manage metadata records.

For more information about Thoth, its data and metadata formats, and more, see the repo's wiki. You can also use GraphiQL to explore the GraphQL API (click on "Docs" at the top right), or RapiDoc to inspect the REST API.

Getting Started

Requirements

  • Rustup
  • Stable Toolchain: rustup default stable
  • wasm-pack
  • rollup
  • A PostgreSQL database (included in docker-compose.yml if ran using docker)
  • libssl-dev

Running with docker

git clone https://github.com/thoth-pub/thoth.git
cd thoth
cp .env.example .env  # Edit the credentials in .env
docker-compose up

Running with rust (cargo)

Config

git clone https://github.com/thoth-pub/thoth.git
cd thoth
cp .env.example .env  # Edit the credentials in .env

Creating Postgres DB and User

psql
psql -U postgres
CREATE ROLE thoth SUPERUSER LOGIN PASSWORD 'thoth';
CREATE DATABASE thoth WITH OWNER thoth; 

Exit the psql command line with:

\q

An example of a .env file:

THOTH_GRAPHQL_API=http://localhost:8000
# THOTH_EXPORT_API is used at compile time, must be a public facing URL
THOTH_EXPORT_API=http://localhost:8181
# Authentication cookie domain
THOTH_DOMAIN=localhost
# Full postgres URL (With the role and db we created in the orevious step, it will look like this)
DATABASE_URL=postgres://thoth:thoth@localhost/thoth
# Authentication cookie secret key (can be any string really)
SECRET_KEY=we_like_s%_books_255
# Logging level
RUST_LOG=info

Proceed to install Wasm

cargo install wasm-pack

Install rollup:

sudo npm install --global rollup

Export the ENV variables, THOTH_GRAPHQL_API and THOTH_EXPORT_API:

export THOTH_GRAPHQL_API=http://localhost:8000
export THOTH_EXPORT_API=http://localhost:8181

API

cargo run init

Wasm GUI

wasm-pack build thoth-app/ --target web \
  && rollup thoth-app/main.js --format iife --file thoth-app/pkg/thoth_app.js \
  && cargo run start app

Building with docker

The wasm APP needs to know the endpoint the API will be running at compile time, we must provide THOTH_API as a build argument to the docker daemon upon build:

docker build \
    --build-arg THOTH_GRAPHQL_API=https://api.thoth.pub \
    --build-arg THOTH_EXPORT_API=https://export.thoth.pub \
    . -t openbookpublishers/thoth

Acknowledgements

Thoth is being developed as part of the COPIM project, an international effort to build community-owned, open systems and infrastructures to enable Open Access book publishing to flourish. COPIM is funded by the Research England Development (RED) Fund, and Arcadia, a charitable fund of Lisbet Rausing and Peter Baldwin.

thoth's People

Contributors

ja573 avatar rhigman avatar vincentwj avatar eshellman avatar kkoci avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.