Uwazi is an open-source document manager.
Read the user guide
Before anything else you will need to install the application dependencies:
- NodeJs 14.6.x For ease of update, use nvm: https://github.com/creationix/nvm.
- ElasticSearch 7.9.1 https://www.elastic.co/guide/en/elasticsearch/reference/7.9/install-elasticsearch.html Please note that ElasticSearch requires java. Follow the instructions to instal the package manually, you also probably need to disable ml module in the ElasticSearch config file:
- ICU Analysis Plugin (recommended) installation Adds support for number sorting in texts and solves other language sorting nuances. This option is activated by setting the env var USE_ELASTIC_ICU=true before running the server (defaults to false/unset).
- MongoDB 4.2 https://docs.mongodb.com/v4.2/installation/ . If you have a previous version installed, please follow instructions on how to upgrade here.
- Yarn https://yarnpkg.com/en/docs/install.
- pdftotext (Poppler) tested to work on version 0.86 but its recommended to use the latest available for your platform https://poppler.freedesktop.org/. Make sure to install libjpeg-dev if you build from source.
and change some global settings:
$ npm config set scripts-prepend-node-path auto
- Download and unpack the latest stable code for production installs.
- Shutdown Uwazi if it is already running.
$ cd uwazi.
$ yarn installwill download all node modules, it may take a while.
$ yarn blank-stateimportant note: the first time you run Uwazi, you will need to initialize the database with its default blank values. Do not run this command if you are upgrading existing projects as it will erase the entire database. Note that from this point on you need ElasticSearch and MongoDB running.
$ ./install.sh [destination_path]if no
destination_pathis provided it will default to
- Start the server with
$ node [destination_path]/server.js.
By default, Uwazi runs on localhost on the port 3000, so point your browser to http://localhost:3000 and authenticate yourself with the default username "admin" and password "change this password now".
It is advisable to create your own system service configuration. Check out the user guide for more configuration options.
If you want to use the latest development code:
$ git clone https://github.com/huridocs/uwazi.git $ cd uwazi $ yarn install $ yarn blank-state
If you want to download the Uwazi repository and also download the included git submodules, such as the
uwazi-fixtures, which is used for running the end-to-end testing:
$ git clone --recurse-submodules https://github.com/huridocs/uwazi.git $ cd uwazi $ yarn install
If the main Uwazi repository had already been cloned/downloaded and now you want to load its sub-modules, you can run
$ git submodule update --init
There may be an issue with pngquant not running correctly. If you encounter this issue, you are probably missing library libpng-dev. Please run:
$ sudo rm -rf node_modules $ sudo apt-get install libpng-dev $ yarn install
$ yarn hot
This will launch a webpack server and nodemon app server for hot reloading any changes you make.
Unit and Integration tests
We test using the JEST framework (built on top of Jasmine). To run the unit and integration tests, execute
$ yarn test
This will run the entire test suite, both on server and client apps.
If the API tests timeout, the issue might be with mongodb-memory-server. See https://github.com/nodkz/mongodb-memory-server/issues/204. Memory server explicitly depends on a version of MongoDB that depends on libcurl3, but Debian 10 and other OS's come with libcurl4 installed instead.
To fix this, update node_modules/mongodb-memory-server-core/lib/util/MongoBinary.js#70.
exports.LATEST_VERSION = '4.3.3' or a similar new version.
End to End (e2e)
For End-to-End testing, we have a full set of fixtures that test the overall functionality. Be advised that, for the time being, these tests are run ON THE SAME DATABASE as the default database (uwazi_developmet), so running these tests will DELETE any exisisting data and replace it with the testing fixtures. DO NOT RUN ON PRODUCTION ENVIRONMENTS!
Running end to end tests require a running Uwazi app.
Running tests with Nightmare
$ yarn hot
On a different console tab, run
$ yarn e2e
Running tests with Puppeteer
$ DATABASE_NAME=uwazi_e2e INDEX_NAME=uwazi_e2e yarn hot
On a different console tab, run
$ yarn e2e-puppeteer
Note that if you already have an instance running, this will likely throw an error of ports already been used. Only one instance of Uwazi may be run in a the same port at the same time.
E2E Tests depend on electron. If something appears to not be working, please run
node_modules/electron/dist/electron --help to check for problems.
The application's default log in is admin / change this password now
Note the subtle nudge ;)
https://github.com/fititnt/uwazi-docker is a project with a Docker containerized version of Uwazi.