a libre collaborative resource mapper powered by open-knowledge, starting with books! 📚
CoffeeScript HTML Shell JavaScript
Clone or download
maxlath create_entity: deduplicate claims values
especially to avoid "claim property new value already exist" errors during entity scaffold
Latest commit d7cb02c Jul 17, 2018
Permalink
Failed to load latest commit information.
.githooks/pre-commit pre-commit script: fixed exit code on error Mar 3, 2018
api_tests items: get by-users: improve filter test Jun 27, 2018
config jobs config: restructuring to be able to customize workers intervals Jun 25, 2018
db/couchdb when a task is updated, update relationScore of tasks with same suspect Jun 25, 2018
docs/visualizations updating the readme concepts map Mar 16, 2016
lib_tests/tasks collect_entities: renaming and cleaning Jun 25, 2018
scripts
server create_entity: deduplicate claims values Jul 17, 2018
test task model: harmonizing validation Jun 25, 2018
.gitignore gitignore: updated May 30, 2018
LICENSE license: fix detection issue Jun 28, 2018
README.md readme: + repository and branches section Mar 1, 2018
package-lock.json package: run npm audit fix Jun 7, 2018
package.json upgrade levels-jobs to 2.1.0 Jun 25, 2018
server.coffee couch init: improving error message when there is an issue with Couch… Oct 10, 2017

README.md

Inventaire

Libre collaborative resource mapper powered by open-knowledge
License Node Code Climate

chat general wiki technical wiki roadmap

inventory-graph

This repository hosts Inventaire.io source code. Its a collaborative resources mapper project, while yet only focused on exploring books mapping with wikidata and ISBNs

This repository tracks the server-side developments, while the (heavy) client-side can be found here. Client-related technical issues should go in the client repo, while this repo gathers all other technical issues. Non-technical discussions such as feature requests should preferably happen in the roadmap. In doubt, just use your best guess or come ask on the chat :)

Summary

Installation

This is the installation documentation for a developement environment. For production setup, see: inventaire-deploy

Dependencies to install manually:

  • git, curl (used in some installation scripts), graphicsmagick (used to resize images), zsh (used in some scripts, no need to make it your default shell), inotify-tools (used in API tests scripts)
  • NodeJS (>=6, NVM is a great way to install it)
  • a CouchDB (>=1.6) instance (on port 5984 for default config)
  • an ElasticSearch (>=2.4) instance (on port 9200 for default config)

To install those on Ubuntu that could give something like:

sudo add-apt-repository ppa:couchdb/stable -y
sudo apt-get update
sudo apt-get install git curl wget graphicsmagick zsh couchdb cowsay inotify-tools

# Install ElasticSearch and its main dependency: Java
# You might want to make sure that no previous version of Java is installed first as it might trigger version issues:
# ElasticSearch requires Java 8/Oracle JDK version 1.8. See https://www.elastic.co/guide/en/elasticsearch/reference/current/_installation.html
# (yes, piping a script to bash is a bad security habit, just as is executing anything on your machine coming from the wild and internet without checking what it does, but we trust this source. For the sake of good practices, you may want to read the script first though ;) )
curl https://raw.githubusercontent.com/inventaire/inventaire-deploy/d8c8bee46c241ceca0ddf3d9c319d84bfb0734d9/install_elasticsearch | bash

# Installing NodeJs and NPM using NVM, the Node Version Manager https://github.com/creationix/nvm
# (same remarque as above on piping a script)
curl https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
exit

(reopen terminal)

# Check that the nvm command can be found
# If you get a 'command not found' error, check NVM documentation https://github.com/creationix/nvm#installation
nvm
nvm install 8
cowsay -f dragon "♫ ♪ copy/paste code, copy/paste code, the world is beautiful when all's in simple mode ♪ ♫"

Project development environment installation

git clone https://github.com/inventaire/inventaire.git
cd inventaire
npm install
# If you haven't done it previously, set an admin on CouchDB and update ./config/local.coffee accordingly
curl -XPUT http://localhost:5984/_config/admins/yourcouchdbusername -d '"'yourcouchdbpassword'"'

We are all set! You can now start the server (in watch mode so that it reboots on file changes)

npm run watch

If you want to work on the client code, we also need to start Brunch in another terminal

cd client
npm run watch

Installation tips

  • To use executable that are used by the project (such as coffee, mocha,couch2elastic4sync), you can either find them in ./node_modules/.bin or install them globally with npm: npm install -g coffee-script mocha brunch bower supervisor etc.
  • If your computer has many CPU cores, you can make Brunch compile even faster by setting an environment variable: BRUNCH_JOBS=4

Repositories and Branches

server

  • master: the stable branch. Unstable work should happen in feature-specific branches and trigger pull requests when ready to be merged in master. See Code Contributor Guidelines.
  • i18n: the branch tracking strings used in emails in all the supported languages (contributions should happen in Transifex: emails)

client

  • master: the stable branch. Unstable work should happen in feature-specific branches and trigger pull requests when ready to be merged in master. See Code Contributor Guidelines.
  • i18n: the branch tracking strings used in the client in all the supported languages (contributions should happen in Transifex: fullkey (strings where the key match the English value), shortkey (strings where the key doesn't match the English value: usually a short key with underscores used to point to long piece of text, possibly with variables))

deploy

tracking installation scripts and documentation to run inventaire in production

  • master: the main implementation targeting Ubuntu 16.04. Additional branches can be started to document installation on other environments

Inventaire stack map

stack

Concepts map

the whole app turns around a few core concepts:

  • Users
  • Entities : encompass authors (ex: wd:Q353), books (ex: wd:Q393018) and books' specific editions (ex: isbn:9782070389162). The term entities is inherited from wikidata terminology. See the entities map.
  • Items : instances of book entities that a user declare to own. Can be an instance of a work or a specific edition of a work.
  • Transactions : discussion between two users involving a specific item with an open transaction mode (giving, lending, selling). Transactions have effects on items: giving and selling an item make it move from the owner to the requester inventory; lending an item make it appear as unavailable.
  • Groups: groups of users with one or more admins

concepts map

entities map

Contribute

see wiki to get started, especially the new contributors section

API

see wiki: API

Day-dreaming on future evolutions

Inventaire.io is a hub for open-knowledge-based peers inventory data. This prototype uses a centralized database to make the early development easier, while being as easy as possible to 'install' and use: well, it's just a "classic" social network. Meanwhile, this repository is public as there is no reason it should always stay centralized: this is a research work in progress, if you can think of a better/more decentralized way for peers to keep their inventory data and share it with others, you are very welcome to join the effort or experiment on your own with what you can find here. The hard point being sharing data between this centralized website and other inventory implementations. Works on a standard data model and an API would be a priority as soon as meaningful.

Ideas for experimentations:

Already experiementing

  • the API should allow a first level of decentralization: having personal clients allowing to manage an inventory out of inventaire.io but that could publish on inventaire.io what belongs there, public and semi public items, while keeping private items private. see Labs settings

License

AGPL