Flamework is a PHP web-application framework, born out of the processes and house-style developed at Flickr.com.
This library is a work in progress. It is immediately usable, but lacks many of the components needed to create a fully featured modern application. These pieces are being added as the individual contributors find a need to in their personal projects. If you've written a missing piece of the puzzle, please send a pull-request.
Installation - As a base for a new project
- Copy everything in
wwwto a web server running Apache with
AllowOverrides allfor the root.
- If some of your rewrite rules like
^account/password$aren't working, try
include/config.phpand edit it.
- Ensure that the
templates_cdirectory can be written to by your webserver.
- Load the schema into mysql:
mysql -uwww -Dflamework -p < schema/db_main.schema
For a longer version, read the installation guide.
If you'd like to use Flamework as an external library, read this.
To install Flamework on AppFog.com, read this.
Flamework uses and assigns global PHP variables on the grounds that it's really just not that big a deal. A non-exhaustive list of global variables that Flameworks assigns is:
$GLOBALS['cfg']-- A great big hash that contains all the various site configs and runtime user authentication info.
$GLOBALS['smarty']-- A Smarty templating object.
$GLOBALS['timing_keys']-- Hashs used to store site performance metrics.
Some libraries use their own globals internally, usually prefixed with
Libraries & Tools
There are several drop-in external libraries for common tasks:
- flamework-geo - Geo libraries and helper functions
- flamework-aws - S3 upload library
- flamework-api - Add an external API
- flamework-invitecodes - Generate invite codes
- flamework-useragent - Parse useragent strings
- flamework-JSON - Parse invalid JSON
- flamework-sendgrid - Use the SendGrid SMTP Service
Aaron has created several starter configurations for using delegated auth:
- flamework-flickrapp - Authenticate using Flickr
- flamework-twitterapp - Authenticate using Twitter
- flamework-foursquareapp - Authenticate using foursquare
- flamework-osmapp - Authenticate using OpenStreetMap
- flamework-tumblrapp - Authenticate using Tumblr
And some random odds and ends:
- flamework-tools - Automation scripts
If you have
make and and recent
perl installed (you almost certainly do), you can run the tests using:
If you also have
PHP_CodeCoverage installed, you can generate test coverage information:
Test coverage needs some serious improvement.
If you don't want to mess with your local development environment, you can run the tests under Vagrant by doing:
vagrant up vagrant ssh cd /vagrant make test