Alaveteli’s directory structure
This page gives you an overview of where to find things in Alaveteli's directories.
You’ll probably never need to worry about this if you’re just installing Alaveteli – this is really more useful if you’re a developer planning on making more substantive changes to the code. You don’t need to be familiar with Ruby to install or make basic customisations to your installation.
Alaveteli uses Ruby on Rails, which is a common “Model-View-Controller” web framework — if you’re familiar with Rails this will look very familiar. For more information about the Rails structure see the Ruby on Rails website.
Key directories and what they’re for
the core Alaveteli application code
static assets that require precompilation before being served
stylesheets in CSS or SCSS format.
SCSS stylesheets are compiled to CSS.
cached files for downloads, attachments and templates.
mySociety's library of common functions
We maintain a common library that we use across many of our projects (not just Alaveteli). This is implemented as a git submodule, so Alaveteli contains it even though the code is separate. Normally, you don't need to think about this (because git handles it automatically)... but if you really do need to change anything here, be aware that it is a separate git repository.
The primary configuration file is
general.yml. This file isn't in the git repository (since it will contain information specific to your installation, including the database password), but example files are.
- Rails' migration (updating the database scheme up or down as the code develops).
These are technical notes. This is in addition to the core documentation — which you are reading now — which is actually stored in the git repository in the
gh-pagesbranch, and published as GitHub pages.
- Rake tasks.
- This is where your Alaveteli theme lives.
The translation strings are stored in
.pofiles in directories specific to the locale and encoding. For example,
es/contains the translations for the Spanish site.
application log files.
static files that can be served directly.
server-side shell scripts
alert-overdue-requestsfor running the script which finds overdue requests and mails them out.
Alaveteli's test suite runs under rspec.
the bundle of gems needed to run Alaveteli
We’ve missed out some of the less important subdirectories here just to keep things clear.