Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thoth-pub/thoth
Metadata management and dissemination system for Open Access books
https://github.com/thoth-pub/thoth
bibliographic-data books graphql metadata openaccess rust webassembly
Last synced: 3 months ago
JSON representation
Metadata management and dissemination system for Open Access books
- Host: GitHub
- URL: https://github.com/thoth-pub/thoth
- Owner: thoth-pub
- License: apache-2.0
- Created: 2020-02-11T09:51:09.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-12T09:00:06.000Z (7 months ago)
- Last Synced: 2024-04-12T16:32:38.931Z (7 months ago)
- Topics: bibliographic-data, books, graphql, metadata, openaccess, rust, webassembly
- Language: Rust
- Homepage: https://thoth.pub
- Size: 6.07 MB
- Stars: 43
- Watchers: 9
- Forks: 8
- Open Issues: 79
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Support: SUPPORT.md
Awesome Lists containing this project
README
## 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](https://api.thoth.pub), implementing a data model specifically designed for OA books
* A [REST API](https://export.thoth.pub) to export metadata in formats like ONIX, MARC, etc.
* A [WebAssembly GUI](https://thoth.pub) to manage metadata records.For more information about Thoth, its data and metadata formats, and more, see the repo's [wiki](https://github.com/thoth-pub/thoth/wiki). You can also use GraphiQL to [explore the GraphQL API](https://api.thoth.pub/graphiql) (click on "Docs" at the top right), or RapiDoc to [inspect the REST API](https://export.thoth.pub).
## Getting Started
### Requirements
- [Rustup](https://rustup.rs/)
- Stable Toolchain: `rustup default stable`
- [wasm-pack](https://rustwasm.github.io/docs/wasm-pack/introduction.html)
- [rollup](https://www.npmjs.com/package/rollup)
- A PostgreSQL database (included in docker-compose.yml if ran using docker)
- `libssl-dev`### Running with docker (development)
#### Config
```sh
git clone https://github.com/thoth-pub/thoth.git
cd thoth
cp .env.example .env # Edit the credentials in .env
```
#### Run
```sh
make docker-dev
```
or
```sh
docker-compose -f docker-compose.dev.yml build
docker-compose -f docker-compose.dev.yml up
```### Running with docker (production)
```sh
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
```sh
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
```#### GraphQL API
```sh
cargo run init
```#### Export API
```sh
cargo run start export-api
```#### GUI
```sh
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](https://www.copim.ac.uk) 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](https://re.ukri.org/funding/our-funds-overview/research-england-development-red-fund/), and [Arcadia](https://www.arcadiafund.org.uk/), a charitable fund of Lisbet Rausing and Peter Baldwin.