Storybase
The code behind Floodlight
Install / Use
/learn @denverfoundation/StorybaseREADME
Floodlight
What is Floodlight?
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/
Development Setup
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
Dependencies
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
Codebase
~~~~~~~~
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 <https://virtualenv.pypa.io/en/latest/>`_, install the dependencies with pip::
$ pip install -r requirements.txt
Database
~~~~~~~~
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";
Search Platform
Clone the modified Solr::
$ git clone https://github.com/denverfoundation/storybase_solr.git
Putting it all together
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
Rebuild/Refresh Solr Indexes
To rebuild the indexes (destructive), run::
$ python manage.py rebuild_index
To refresh the indexes, run::
$ python manage.py update_index
License
This software is licensed under the `MIT License <http://opensource.org/licenses/MIT>`_
Authors
- Geoff Hing - https://github.com/ghing/
- Eric Miller - https://github.com/patternleaf/
On the shoulders of giants
This project includes a number of excellent open-source libraries:
The 1140px Grid V2 <http://cssgrid.net/>_ by Andy TaylorBackbone <http://documentcloud.github.com/backbone/>_ by Jeremy Ashkenas, DocumentCloudD3 <http://mbostock.github.com/d3/>_ by Michael BostockFont Awesome <http://fortawesome.github.com/Font-Awesome/>_ by Dave GandyGuiders.js <https://github.com/jeff-optimizely/Guiders-JS>_ by OptimizelyHandlebars <http://handlebarsjs.com/>_ by Yehuda KatzHTML5 Boilerplate <http://html5boilerplate.com/>_imagesLoaded <https://github.com/desandro/imagesloaded>_ by David DeSandroJavaScript Pretty Date <http://ejohn.org/blog/javascript-pretty-date/>_ by John ResigjQuery <http://jquery.org/>_ by John ResigjQuery Cookie <https://github.com/carhartl/jquery-cookie/>_ by Klaus HartljQuery Condense Plugin <https://github.com/jsillitoe/jquery-condense-plugin>_ by Joe SillitoejQuery Iframe Transport <http://cmlenz.github.com/jquery-iframe-transport/>_ by Christopher LenzjQuery Masonry <http://masonry.desandro.com/>_ by David DeSandrojson2.js <https://github.com/douglascrockford/JSON-js/>_ by Douglas CrockfordFormalize <http://formalize.me/>_ by Nathan SmithLeaflet <http://leaflet.cloudmade.com/>by CloudMade, Vladimir AgafonkinLeafClusterer <https://github.com/ideak/leafclusterer/>_ by Imre DeakModernizr <http://modernizr.com/>_Normalize.css <http://github.com/necolas/normalize.css>_ by Nicolas Gallagher and Jonathan NealRespond.js <https://github.com/scottjehl/Respond>_ by Scott JehlSelect2 <http://ivaynberg.github.com/select2/>_ by Igor VaynbergTooltipster <http://calebjacob.com/tooltipster/>_ by Caleb JacobTinyMCE <http://tinymce.com/>_ by Moxiecode Systems ABUnderscore <http://documentcloud.github.com/underscore/>_ by Jeremy Ashkenas, DocumentCloudWYSIHTML5 <http://xing.github.com/wysihtml5/>_ by XING AG
