Mendel
Mendel is a tool for tagging keywords from sets of data.
Running Locally
Prerequisites
Install the following:
- Python
- NodeJS
- Heroku Toolbelt
- Postgres (Postgres.app recommended, don't forget to set up the command line tools)
API
First, clone the repository:
$ git clone git@github.com:Architizer/mendel.git
$ cd mendel
Next, ensure Postgres is running and run our setup script:
$ ./bin/setup_local
(A super user is automatically created with the username admin and the password architizer)
Finally, start the development API server:
$ heroku local
On Windows:
$ heroku local -f Procfile.windows
The Mendel API should now be running on http://localhost:5000/api/.
Front End
The front end is generated from the gulp-angular generator for Yeoman.
To work on the front end in development, run the following:
$ cd mendel/angular
$ gulp serve
This will open the front end app in a browser using BrowserSync, which will live-reload when changes are made inside the mendel/angular
directory.
Note: you will need the API running locally to serve data to the front end. Keep heroku local
running in a separate terminal window.
Deploying to Heroku
Use the Deploy button:
Or, run the commands by hand:
# 1. Run our Heroku setup script
$ ./bin/heroku_create
# 2. Push repo to Heroku
$ git push heroku master
# 3. Create an initial admin user
$ heroku run python manage.py createsuperuser
# 4. Open the app in a browser
$ heroku open
Connecting to SOLR
At Architizer, we connect Mendel to an internal Apache Solr instance which indexes data from our application and other sources.
You can configure Mendel to import contexts and documents from your own Solr instance by specifying the path to your Solr instance as the WEBSOLR_URL
environment variable on Heroku.
Heroku supports an add-on called Websolr for creating your own Solr instance.
We have set up two (somewhat proprietary) management commands to import contexts and documents into Mendel. These commands are available in the mendel/management/commands
folder for your reference if you wish to set up your own.