CHARP Directory and File Structure - pupitetris/charp GitHub Wiki
As a reference, we list brief explanations of the most important directories and files of the CHARP code base. Directories are shown in bold, and files in italics.
-
conf - configuration files.
-
devel - sample configuration for development.
-
apache2 - configuration files for Apache2.
-
conf.d - virtual servers.
- charp.conf - a virtual server configuration file for a charp project.
- httpd.conf - Apache2 main configuration file.
-
conf.d - virtual servers.
-
apache2 - configuration files for Apache2.
- config.m4 - configuration file containing definitions to be processed by m4 before sql files are sent to psql.
- config.sh - configuration shell script called by initdb.sh and diff.sh.
- config_end.m4 - preparations ran after the m4 definition file, prior to the SQL inclusion.
- config_init.m4 - macros for the m4 preprocesor pass for the SQL files.
-
devel - sample configuration for development.
-
design - files related to the design process.
- charp.architect - a Power Architect file describing the CHARP tables and relations needed (three tables, one relation only).
-
scripts - shell scripts for setup, maintenance and testing.
-
bin - utilities and binary programs
- apgdiff.jar - Another PostgreSQL Diff Tool - database schema comparing tool. http://apgdiff.startnet.biz/
- closure-compiler.jar - A JavaScript code minifier. http://code.google.com/closure/compiler/
- client.pl - a CHARP client written in Perl.
- client.tcl - a CHARP client written in TCL.
- diff.sh - outputs the SQL required to upgrade the database to what the definitions on the sql directory describe.
- fix-architect.sh - fixes the XML in Power Architect native files to avoid unnecessary warnings when exporting SQL from the application.
- fix-sql.pl - manipulates Power Architect SQL exports to compensate for missing features.
- initdb.sh - creates a fresh database from scratch.
- kill-fcgi.sh - for Cygwin, kills all cgi-fcgi FastCGI scripts.
- test-wget.sh - checks if CHARP is sending challenges.
-
bin - utilities and binary programs
-
site - web resources.
-
cgi - web request processors.
- CHARP.pm - CHARP utility routines.
- errcodes.txt - File taken from PostgreSQL's source tree, for the interpretation of SQLSTATE codes http://www.postgresql.org/docs/9.0/interactive/errcodes-appendix.html.
- request - cgi-fcgi wrapper.
- request.pl - the actual RPC broker.
-
htdocs - project DocumentRoot for static web files. Entry point HTML documents go here.
-
img - images. Place all of your images here.
- icons - icons.
- pages - HTML fragments that are to be loaded by APP.js:loadLayout. NOT a place for HTML documents.
-
script - all of JavaScript code goes here.
-
lib - external JavaScript libraries and library plugins.
- src - un-minified versions of the libraries' code.
- jquery.min.js - jQuery: The Write Less, Do More, JavaScript Library. http://jquery.com/
- jquery.ui.min.js - jQuery UI: the jQuery toolkit. http://jqueryui.com/
- jquery.validate.min.js - jQuery validation plugin. http://docs.jquery.com/Plugins/Validation
- json2.min.js - a JSON parser and generator for old browsers that lack JSON. http://www.json.org/js.html
- sha256.min.js - a SHA-256 implementation, for signature generation. http://jssha.sourceforge.net/
- webtoolkit.md5.min.js - MD5 Message-Digest Algorithm, to encode the user's password. http://www.webtoolkit.info/
- app.js - Helper functions for dynamic module loading, user message creation, location argument parsing and much more.
- CHARP.js - The JavaScript CHARP client, depends on jQuery.
- entry.js - Code to enable an "entrypoint" feature, with signed URLs.
- fetch.js - A caching CHARP wrapper to fetch catalog data and such.
- login.js - An example module that implements a login screen and tests other CHARP functions.
-
lib - external JavaScript libraries and library plugins.
-
style - Cascading Stylesheets for all of the application.
-
theme - Theme-related files for libs like jQuery-ui or DataTables.
- images - Images for themes.
- jquery-ui.theme.css - Theme style definition for jQuery-ui. Build your own theme with Themeroller and replace these files with a theme of your own.
- app.css - A file like this should be created for the styling of your application.
-
theme - Theme-related files for libs like jQuery-ui or DataTables.
- app.html - An entrypoint for the example application. Could be index.html as well.
-
img - images. Place all of your images here.
-
cgi - web request processors.
-
sql - DDL statements and initialization or test data.
- catalogs - CSV files for catalog data.
- data - CSV files for data required for database initialization.
- testdata - CSV files for testing purposes.
- 01-database.sql - Database creation. Optional user and language creation.
- 02-charp.sql - Data types and functions relative to CHARP Remote Procedure processing. Tables must still live in 04-tables.sql.
- 02-pgcrypto.sql - Cryptography-related functions. We need gen_random_bytes and digest.
- 03-types.sql - User-defined datatypes, mostly enumerations.
- 04-tables.sql - Table structure and foreign key constraints. Optionally generated from a Power Architect file (through fix-sql.pl).
- 04-tables-constraints.sql - Check constraints.
- 05-functions.sql - Stored procedures for the CHARP infrastructure and your own remote procedures and functions.
- 06-catalogs.sql - Data for the initial information in your catalogs.
- 07-views.sql - Views creation.
- 09-data.sql - Other data insertions which may be required to initialize the system.
- 98-testdata.sql - Data COPYs into the newly created database for testing. Only processed by intidb.sh if -td and the file are present.
- 99-test.sql - Other INSERTs and procedure calls to allow for application testing. Only processed by intidb.sh if -td and the file are present. It should not be on the source repository.