pkeane/dase
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
DASe — Digital Archive Systems and Exchange
============================================
DASe is a web-based digital collections management and repository system
for storing, organizing, browsing, and exposing digital objects and their
metadata through a web interface and REST API.
Originally developed at The University of Texas at Austin.
OVERVIEW
--------
DASe allows institutions or individuals to:
- Manage digital collections with hierarchical organization
- Create and edit items with customizable metadata (attributes, item types)
- Upload and manage media files (images, audio, video, documents)
- Search and browse collections via database queries or Apache Solr
- Expose collections via REST API (Atom Publishing Protocol, JSON, XML)
- Control access with user roles and visibility levels
- Tag and categorize items
TECH STACK
----------
- Language: PHP 5.x (custom MVC framework, no external PHP frameworks)
- Database: MySQL, PostgreSQL, or SQLite (via PDO)
- Search: Apache Solr 2.2+ (optional; falls back to database search)
- Templating: Smarty (with Django-style template inheritance)
- Cache: File-based (or memcached)
- API formats: Atom/APP, JSON, XML, CSV
- Frontend: jQuery + custom CSS/JS
- Media: ImageMagick (thumbnails), getid3 (audio metadata)
DIRECTORY STRUCTURE
-------------------
index.php Application entry point
inc/ Bootstrap, configuration files
lib/ Core framework (Dase PHP classes)
Dase.php Main application class
Dase/
Handler.php Base REST handler with routing logic
DBO.php ORM base class (database abstraction)
DB.php PDO database wrapper
Config.php Configuration manager
Solr.php Apache Solr integration
Atom.php Atom Publishing Protocol support
Template.php Smarty template wrapper
Http/ HTTP request/response classes
DBO/ Data objects (Item, Collection, User, Media, Tag, etc.)
Handler/ REST endpoint handlers (23 handlers)
modules/ Optional plugin modules
install/ Web-based installation wizard
admin/ Admin panel
audio/ Audio-specific features
dbadmin/ Database administration
google/ Google API integrations
local/ Local customizations
uteid/ UT EID institutional login integration
templates/ Smarty HTML templates (layout, collections, items, etc.)
bin/ Command-line maintenance and admin scripts (~31 scripts)
solr_index.php Index items into Solr
build_json.php Generate JSON documents from items
migrate_collection.php Migrate data between systems
www/ Static web assets (CSS, JavaScript, images)
files/ Runtime directory (writable by web server)
media/ Uploaded media file storage
log/ Application logs
cache/ Smarty template cache
framework_setup/ Boilerplate for creating custom DASe-based applications
solr_schema.xml Apache Solr field definitions
REQUEST FLOW
------------
1. index.php loads inc/bootstrap.php (config, autoloader, constants)
2. Dase::run() initializes DB, parses HTTP request
3. URI template matching routes to appropriate Handler subclass
4. Handler method queries DBO objects (ORM layer) against database
5. Response rendered as HTML (Smarty), JSON, Atom, or XML
INSTALLATION
------------
1. Place the 'dase' directory inside your web server docroot.
2. Edit .htaccess and set RewriteBase to match the URL path.
Example: if accessible at http://example.com/dase, set:
RewriteBase /dase
3. Create an empty MySQL (or PostgreSQL) database.
4. Make the dase/files directory writable by the web server:
chmod -R 775 dase/files
chown -R www-data:www-data dase/files
5. Open a browser and navigate to the dase directory.
The installation wizard will guide you through database setup
and creating the initial admin user.
REQUIREMENTS
------------
- Apache with mod_rewrite enabled
- PHP 5.x+ with PDO extension
- MySQL 5.x, PostgreSQL, or SQLite
- ImageMagick (convert binary) for image thumbnails
- Apache Solr 2.2+ (optional, for full-text search)
CONFIGURATION
-------------
inc/config.php Default settings (do not edit directly)
inc/local_config.php Local overrides — set database credentials,
paths, site title, and other options here.
Key settings in local_config.php:
$conf['db']['type'] // mysql, sqlite, or pgsql
$conf['db']['host'] // database host
$conf['db']['name'] // database name
$conf['db']['user'] // database username
$conf['db']['pass'] // database password
$conf['app']['main_title'] // site title shown in UI
$conf['app']['media_dir'] // path to writable media storage
$conf['search']['engine'] // 'db' or 'solr'
$conf['app']['convert'] // path to ImageMagick convert binary
$conf['auth']['superuser'] // admin username
$conf['auth']['service_token'] // API access token
API
---
DASe exposes collections and items via REST using Atom Publishing Protocol.
Resources are available in multiple formats by appending an extension:
/collection/{id} HTML view
/collection/{id}.json JSON format
/collection/{id}.atom Atom feed
/collection/{id}/item/{n} Individual item (also available as .json, .atom)
Authentication uses HTTP Basic Auth or a service token for API access.