aboutsummaryrefslogtreecommitdiffstats
path: root/notes
diff options
context:
space:
mode:
Diffstat (limited to 'notes')
-rw-r--r--notes/INSTALL110
-rw-r--r--notes/code_structure.txt11
-rw-r--r--notes/glossary.txt12
-rw-r--r--notes/osgb36_to_wgs84_notes.txt77
4 files changed, 210 insertions, 0 deletions
diff --git a/notes/INSTALL b/notes/INSTALL
new file mode 100644
index 000000000..fcb1f5579
--- /dev/null
+++ b/notes/INSTALL
@@ -0,0 +1,110 @@
+# INSTALLING FROM SCRATCH
+
+# mySociety applications are intended to be run on a Debian system. Other Linux
+# distributions may well work but may also require some tweaking.
+
+# This document assumes that you are starting with a bare Debian Lenny box and
+# that you want to install the latest code from GitHub. For some step you will
+# need root access (via sudo)
+
+
+
+# GETTING THE CODE
+
+
+# bring your system up-to-date
+# FIXME - ???should we specify any extras apt sources???
+sudo apt-get update
+sudo apt-get upgrade
+
+# ensure that you have 'git' installed
+sudo apt-get install git-core
+
+# fetch the FixMyStreet code from GitHub:
+git clone https://github.com/mysociety/fixmystreet.git
+
+# fetch the submodules too
+cd fixmystreet
+git submodule update --init
+
+
+# SETTING UP SYSTEM
+
+# change into project directory
+cd ~/fixmystreet
+
+# check that you have all the packages needed. mySociety projects always have a
+# file in 'conf/packages' where any debian ones needed are listed
+sudo apt-get install `cat conf/packages`
+
+# also install these that are available by default on mySoc boxes:
+sudo apt-get install \
+ libregexp-common-perl php5-cli perl-doc libtest-exception-perl
+
+
+# SETTING UP APACHE
+
+cd /etc/apache2
+
+# there is an apache config file in 'conf/httpd.conf' - insert it as per sample
+# config at top of file into your /etc/apache2/ config setup
+sudo nano sites-available/fixmystreet
+sudo ln -s ../sites-available/fixmystreet sites-enabled/
+
+# you may need to enable some modules too
+sudo ln -s ../mods-available/rewrite.load mods-enabled/
+sudo ln -s ../mods-available/proxy.load mods-enabled/
+sudo ln -s ../mods-available/proxy_http.load mods-enabled/
+
+# check the config and restart apache
+sudo apache2ctl configtest
+sudo apache2ctl restart
+
+cd -
+
+# You may need to change the permissions on your files so that apache can read them
+
+
+# SETTING UP EMAIL SENDING
+
+# FixMyStreet sends lots of email - your dev server should be able to deliver
+# them. If you're running a virtual machine consider sending all email via
+# Gmail by replacing exim with ssmtp.
+apt-get install ssmtp # will probably uninstall existing MTA
+apt-get install mailx # for testing email is working
+
+nano /etc/ssmtp/ssmtp.conf # see http://wiki.debian.org/sSMTP for details
+mail youremail@example.com # send a test message
+
+# SETTING UP CONFIG FILES
+
+# the setup is configured using the file 'conf/general' - copy the example one and then edit it
+cp conf/general-example conf/general
+nano conf/general
+
+# You may need to alter:
+# * the database connection details
+# * the OPTION_BASE_URL to be where your test site will run - eg 'http://localhost'
+# * the OPTION_EVEL_URL to '' - this will cause some emails not to be sent but warned to STDERR instead - proper email handling is being worked on
+# * the OPTION_SMTP_SMARTHOST to '' if routing mail via ssmtp as described above - otherwise your SMTP server
+# * set OPTION_EMAIL_VHOST to the same as OPTION_BASE_URL minus the 'http://' - eg 'localhost'
+# * set OPTION_UPLOAD_CACHE and OPTION_GEO_CACHE to your preferred values
+# * set OPTION_COUNTRY to your ISO3166 alpha2 code ('GB' for the United Kingdom: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
+
+# SETTING UP THE DATABASES
+
+# create your own db user (as a superuser to make things easier)
+sudo su - postgres
+createuser -s your_username
+exit
+
+# You'll need to create a database, enable plpgsql and load in the schema
+createdb -E SQL_ASCII bci
+createlang plpgsql bci
+psql bci < db/schema.sql
+psql bci < db/alert_types.sql
+
+
+# LOOK AT THE SITE IN YOUR BROWSER
+
+# everything should now be set up - please try to load the site in your browser
diff --git a/notes/code_structure.txt b/notes/code_structure.txt
new file mode 100644
index 000000000..8c01fba8b
--- /dev/null
+++ b/notes/code_structure.txt
@@ -0,0 +1,11 @@
+The code is broken down into the following sections:
+
+website: code to display the website and handle user submissions
+
+backend: send alerts to the councils, work out who should get the alert, various
+confirmtaion emails
+
+mobile apps: currently for iPhone and Android - two separate apps
+
+utility scripts: odds and ends - eg importing photos from Flickr tagged
+'fixmystreet'
diff --git a/notes/glossary.txt b/notes/glossary.txt
new file mode 100644
index 000000000..0c533a944
--- /dev/null
+++ b/notes/glossary.txt
@@ -0,0 +1,12 @@
+Unfamiliar terms that you may come across in the code:
+
+
+BCI: Broken Civic Infrastructure - project name before it became FixMyStreet -
+still to be found used in some config variable names
+
+MaPit: The mySociety database and web service that maps postcodes and points to
+current or past administrative area information and polygons for all the United
+Kingdom. http://mapit.mysociety.org/
+
+EvEl: A generic email sending and mailing list functionality, with bounce
+detection: https://secure.mysociety.org/cvstrac/dir?d=mysociety/services/EvEl
diff --git a/notes/osgb36_to_wgs84_notes.txt b/notes/osgb36_to_wgs84_notes.txt
new file mode 100644
index 000000000..3deca19de
--- /dev/null
+++ b/notes/osgb36_to_wgs84_notes.txt
@@ -0,0 +1,77 @@
+These notes are for the FMS migration from OSGB36 to WGS84 coordinates.
+
+Reference:
+
+ easting === longitude
+ northing === latitude
+
+ http://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid
+ http://en.wikipedia.org/wiki/World_Geodetic_System
+
+DB:
+
+ * dump schema from live db and confirm it matches schema.sql (you never know...)
+ DONE: use PledgeBank's 'nearby' logic in problem_find_nearby() SQL function
+ DONE: in 'alerts' table convert parameter and parameter2 if alert is 'local_problems' or 'local_problems_state'
+
+CODE:
+
+ DONE: update all calls to problem_find_nearby swapping parameter order.
+ * find all occurences of 'easting', 'northing', $e, $n etc and migrate
+
+ * email me link broken on http://herring/?lat=51.4545595517093;lon=-0.23100115932431
+
+ * Cobrand.pm
+ * Cobrands/Barnet/Util.pm
+ * Cobrands/Emptyhomes/Util.pm
+ * CronFns.pm
+ * CrossSell.pm
+ * EastHantsWSDL.pm
+ * FixMyStreet/Alert.pm
+ * FixMyStreet/Geocode.pm
+ * FixMyStreet/Map.pm
+ * FixMyStreet/Map/Bing.pm
+ * FixMyStreet/Map/BingOL.pm
+ * FixMyStreet/Map/Google.pm
+ * FixMyStreet/Map/OSM.pm
+ * FixMyStreet/Map/OSM/CycleMap.pm
+ * FixMyStreet/Map/OSM/StreetView.pm
+ * FixMyStreet/Map/Tilma/OL/1_10k.pm
+ * FixMyStreet/Map/Tilma/OL/StreetView.pm
+ * FixMyStreet/Map/Tilma/Original.pm
+ * FixMyStreet/Map/Tilma/Original/1_10k.pm
+ * FixMyStreet/Map/Tilma/Original/StreetView.pm
+ * Memcached.pm
+ * Page.pm
+ * PoChange.pm
+ * Problems.pm
+ * Standard.pm
+ * Utils.pm
+
+ * web/about.cgi
+ * web/ajax.cgi
+ * web/alert.cgi
+ * web/confirm.cgi
+ * web/contact.cgi
+ * web/faq.cgi
+ * web/flickr.cgi
+ * web/fun.cgi
+ * web/import.cgi
+ * web/index.cgi
+ * web/json.cgi
+ * web/photo.cgi
+ * web/questionnaire.cgi
+ * web/reports.cgi
+ * web/rss.cgi
+ * web/test.cgi
+ * web/tms-signup.cgi
+ * web/upload.cgi
+
+ DONE: all scripts checked
+
+UI maps:
+
+ * Tilma js code will still need eastings and northings
+ * All other maps should be able to switch to latlon
+
+