This is the code base behind Floodlight, a powerful story-building website that enables community change makers to inspire action and advance their issues through more substantive, engaging and persuasive data-driven storytelling.
For more information, see http://www.floodlightproject.org/
Setting up the website can be broken into five parts:
- Install Server Dependencies
- Codebase - Django developement server
- Database - PostgreSQL with PostGIS
- Search Platform - Solr with GIS modification
- Put it all together - migrate and run
GDAL and GEOS are required for GeoDjango:
$ sudo apt-get install gdal-bin libgeos-dev
PostGIS is required for the spatial database requirements:
$ sudo apt-get install postgis
Start by cloning the project:
$ git clone https://github.com/denverfoundation/storybase.git $ cd storybase
Copy settings from settings/default.py
to settings/dev.py
:
$ cp settings/default.py settings/dev.py
In a virtual environment, install the dependencies with pip:
$ pip install -r requirements.txt
The database name, user, and password are set in settings/dev.py
.
They are set to a default floodlight
.
After creating a database, you will need to add the postgis extension:
CREATE EXTENSION postgis;
OR:
# psql floodlight -c "CREATE EXTENSION postgis";
Clone the modified Solr:
$ git clone https://github.com/denverfoundation/storybase_solr.git
Start by spinning up the Solr system:
$ cd storybase_solr $ java -Dsolr.solr.home=multicore -jar start.jar
Sync and Migrate the database from the codebase directory:
$ python manage.py syncdb $ python manage.py migrate
Finally, run the app:
$ python manage.py runserver
To rebuild the indexes (destructive), run:
$ python manage.py rebuild_index
To refresh the indexes, run:
$ python manage.py update_index
This software is licensed under the MIT License
- Geoff Hing - https://github.com/ghing/
- Eric Miller - https://github.com/patternleaf/
This project includes a number of excellent open-source libraries:
- The 1140px Grid V2 by Andy Taylor
- Backbone by Jeremy Ashkenas, DocumentCloud
- D3 by Michael Bostock
- Font Awesome by Dave Gandy
- Guiders.js by Optimizely
- Handlebars by Yehuda Katz
- HTML5 Boilerplate
- imagesLoaded by David DeSandro
- JavaScript Pretty Date by John Resig
- jQuery by John Resig
- jQuery Cookie by Klaus Hartl
- jQuery Condense Plugin by Joe Sillitoe
- jQuery Iframe Transport by Christopher Lenz
- jQuery Masonry by David DeSandro
- json2.js by Douglas Crockford
- Formalize by Nathan Smith
- Leaflet <http://leaflet.cloudmade.com/> by CloudMade, Vladimir Agafonkin
- LeafClusterer by Imre Deak
- Modernizr
- Normalize.css by Nicolas Gallagher and Jonathan Neal
- Respond.js by Scott Jehl
- Select2 by Igor Vaynberg
- Tooltipster by Caleb Jacob
- TinyMCE by Moxiecode Systems AB
- Underscore by Jeremy Ashkenas, DocumentCloud
- WYSIHTML5 by XING AG