joyce/README.md

59 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2017-11-07 03:08:08 +00:00
# Joyce
_A Reader and Editor for Hypertext_
2018-05-10 02:35:43 +00:00
2018-05-10 03:00:44 +00:00
Joyce is a web app for reading and annotating texts. It was designed to power [The Joyce Project](http://www.joyceproject.com/), a website to help introduce James Joyce's Ulysses to new readers with the full-text and detailed annotations.
Joyce uses Python and Flask for the backend, Elasticsearch for the datastore, and React and Bootstrap for the front end, bundled with Webpack. The text editor is built on DraftJS.
2018-05-10 02:52:38 +00:00
## Setup
2018-05-10 02:35:43 +00:00
2018-05-10 02:52:38 +00:00
This assumes you have Node, npm, pip and optionall virtualenv installed.
Install Elasticsearch:
```
2018-05-10 02:35:43 +00:00
brew install elasticsearch
2018-05-10 02:52:38 +00:00
```
Joyce requires Python 2.7:
```
virtualenv -p /usr/bin/python2.7 joyce_flask
2018-05-10 02:35:43 +00:00
source bin/activate
2018-05-10 02:52:38 +00:00
```
2018-05-10 02:35:43 +00:00
2018-05-10 02:52:38 +00:00
Install the Python backend:
```
2018-05-10 02:35:43 +00:00
pip install -r requirements.txt
2018-05-10 02:52:38 +00:00
```
Install the Javascript frontend:
```
npm install
```
2018-05-10 02:35:43 +00:00
2018-05-10 02:52:38 +00:00
Setup the Elasticsearch indexes:
```
2018-05-10 02:35:43 +00:00
python setup.py
2018-05-10 02:52:38 +00:00
```
2018-05-10 02:35:43 +00:00
2018-05-10 02:52:38 +00:00
## Run Locally
Start Elasticsearch:
```
2018-05-10 02:35:43 +00:00
elasticsearch
2018-05-10 02:52:38 +00:00
```
Start Webpack in watch mode:
```
npm run watch
```
2018-05-10 02:35:43 +00:00
2018-05-10 02:52:38 +00:00
Start Python application:
```
2018-05-10 02:35:43 +00:00
python application.py
2018-05-10 02:52:38 +00:00
```
2018-05-10 02:35:43 +00:00
2018-05-10 02:52:38 +00:00
You should now find Joyce running locally at:
```
localhost:5000
```