a libre collaborative resource mapper powered by open-knowledge, starting with books! 📚
CoffeeScript HTML Shell JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

Inventaire

Libre collaborative resource mapper powered by open-knowledge
License RoadMap Node Code Climate
Come to say hi on your prefered chat
Join the chat at https://gitter.im/inventaire/inventaire IRC

inventory-georges

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 Trello. In doubt, just use your best guess :)

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)
  • 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

# 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 6
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

  • If your computer has many CPU cores, you can make Brunch compile even faster by setting an environment variable: BRUNCH_JOBS=4

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.
  • 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

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:

  • port to custom desktop clients using node-webkit or alike
  • port to an app for personal cloud platforms: Cozy, OwnCloud...
  • server-less/P2P inventory sharing using WebRTC DataChannel / WebTorrent / IPFS / Ethereum / you name it
  • any other IndieWeb / Unhosted crazyness? :)

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