Directory Layout

From CollectiveAccess Documentation
Revision as of 20:42, 1 November 2012 by Julia (talk | contribs)
Jump to: navigation, search

The Providence installation package is a single directory designed to be "droppable" onto a web server for easy installation. The default directory structure is:

  • /app - contains much of the code that implements Providence, with the exception of the views that define what the user interface looks like (these are housed in the /themes directory further described below). /app contains the following sub-directories:
    • /app/conf - contains all application configuration files with the exception of the bootstrap setup.php file located in the Providence root directory.
    • /app/helpers - function libraries implementing various helpful functions used internally by Providence.
    • /app/locale - contains GetText-format .po and .mo message catalogues used to localize the Provider user interface.
    • /app/models - contains classes defining interfaces to most database tables (which generally correspond on a 1-to-1 basis with data entities) in the Providence schema. These classes are used to manipulate data in the database - virtually all write operations on the database take place through these classes.
    • /app/sphinx - contains files specific to the operation of the Sphinx search engine.
    • /app/lucene - contains files specific to the operation of the [SearchEngines Lucene] search engine.
    • /app/controllers - contains all action controllers - the classes that actually handle requests, invoke library and model methods and load views for display. All controller classes are organized into subdirectories under /controllers that mirror the structure of the URLs used to invoke them.
    • /app/lib - contains code libraries used by Providence. It is divided into two subdirectories:
      • /app/lib/core - contains "core" libraries implementing generally useful functions in a manner not specific to Providence. (Or to put it another way: core libraries are reusable across applications and make few, if any, assumptions specific to Providence).
      • /app/lib/ca - contains libraries implementing Providence-specific functionality.
    • /app/plugins - contains modules implementing various types of functionality. This directory currently houses code for generating GoogleMaps and ID numbers brought over from CollectiveAccess 0.5x and not yet used. We may consolidate this directory into /app/lib/core/Plugins at some point in the near future.
    • /app/tmp - a temporary directory used for queuing media for background processing, for housing of cache files, and for processing of uploaded batches of media. This directory must be write-able by the user the web server runs under, otherwise errors will occur.
  • /install - contains the Providence installer. This should be deleted once Providence is successfully installed.
  • /doc - contains all bundled documentation.
  • /js - contains all Javascript libraries.
  • /media - contains all uploaded media (images, audio, video, PDF documents, etc.) and files derived from that media.
  • /support - contains various support files and useful administrative utilities in the following subdirectories:
    • /support/sql - contains the Providence database schema and migrations. Useful for developers.
    • /support/media_icons - contains graphics used as default icons for uploaded media in cases where a thumbnail image cannot be derived (for audio files, for example).
    • /support/data - contains utilities for importing specific types of data from external sources into Providence. This directory includes, for instance, a script for importing the Getty Art & Architecture Thesaurus.
    • /support/utils - contains various administrative utilities, including scripts to reindex the database for full text search (reindex.php), to generate configuration files for various support search engines (createSphinxConfiguration.php and friends) and a CRON-compatible script for background processing of uploaded media (processTaskQueue.php).
  • /themes - contains the "views" defining what various parts of the Providence user interface look like. You can have multiple views defining different look-and-feels for the software. Each theme is contained in its own subdirectory. The standard Providence package ships with a single default theme contained in /themes/default Each theme contains multiple view directories.
  • /viewers - contains web-based viewing software for various types of media.

It also contains the following files (not including informational README and licensing text files):

  • index.php - the "front controller" of the system; all requests go through this PHP script and are subsequently dispatched to action controllers in /app/controllers using information specified in the URL.
  • setup.php-dist - the distribution copy of the bootstrap configuration file used by the application to find its components and configuration files. The distribution copy is meant to be copied to setup.php and modified to suit the installation.

Personal tools