Difference between revisions of "Directory Structure"

From Dreamwidth Notes
Jump to: navigation, search
m (Added more subdirectories)
(updated, mostly to refer to new directory structure post-git)
Line 1: Line 1:
 
[[Category: Development]]
 
[[Category: Development]]
This documents the contents of the $LJHOME development folder as checked out by <code>bootstrap.pl</code> and present on all Dreamhacks.
+
This documents the contents of the $LJHOME development folder as present on all Dreamhacks.
 
+
  
 
= bin =
 
= bin =
Line 9: Line 8:
 
Commonly used programs in this directory include:
 
Commonly used programs in this directory include:
 
* [[Script: checkconfig.pl|checkconfig.pl]]
 
* [[Script: checkconfig.pl|checkconfig.pl]]
* cvsreport.pl
 
  
 
Subdirectories are:
 
Subdirectories are:
Line 23: Line 21:
 
All subdirectories here map to library names, so <code>DW::Foo</code> goes in <code>cgi-bin/DW/Foo.pm</code> and so forth.
 
All subdirectories here map to library names, so <code>DW::Foo</code> goes in <code>cgi-bin/DW/Foo.pm</code> and so forth.
  
= cvs =
+
== LJ ==
  
Local version of the [http://hg.dwscoalition.org Mercurial repositories]. Information about use of these repositories can be found in the [[http://wiki.dwscoalition.org/notes/Dev_Initial_Programming_Notes Developers' Initial Programming Notes]].  
+
Original LJ modules.
  
The two Mercurial source branches you'll be using most often are <code>dw-free</code> [http://hg.dwscoalition.org/dw-free/ dw-free] and <code>dw-nonfree</code> [http://hg.dwscoalition.org/dw-nonfree/ dw-nonfree]. (When viewing the Mercurial page for each repo, the 'Manifest' link in the top menu bar will allow you to browse the source tree.)
+
== DW ==
  
 +
Newer, DW-based modules.
  
 
= doc =
 
= doc =
Line 37: Line 36:
  
 
Docbook formatted source for the old and very much out of date docbook code for the LiveJournal server. LiveJournal's version is visible at <code>http://livejournal.com/doc/server/</code> but Dreamwidth has not generated a user-visible copy.
 
Docbook formatted source for the old and very much out of date docbook code for the LiveJournal server. LiveJournal's version is visible at <code>http://livejournal.com/doc/server/</code> but Dreamwidth has not generated a user-visible copy.
 
  
 
= etc =
 
= etc =
  
Various configuration files specific to the local site, such as <code>ljconfig.pl</code>. These files are not copied to the Mercurial repositories so they can be updated without affecting other running installations.
+
Various configuration files specific to the local site, such as <code>config.pl</code>. These files are not copied to the Mercurial repositories so they can be updated without affecting other running installations.
 +
 
 +
= ext =
  
 +
This directory contains any local repository checkouts--for instance, <tt>dw-nonfree</tt>, Dreamwidth's non-open source code, goes here.
 +
 +
This directory also contains local config files in <tt>ext/local/etc</tt>, so they won't be affected by source code updates.
  
 
= htdocs =
 
= htdocs =
Line 48: Line 51:
 
User-facing [[BML]] pages, with the directory structure used on the main website. That is to say, anything that appears at <code>http://www.dreamwidth.org/filename.bml</code> will be here, as <code>htdocs/filename.bml</code>; anything at <code>http://www.dreamwidth.org/directory/filename.bml</code> will be here as <code>htdocs/directory/filename.bml</code>, etc.
 
User-facing [[BML]] pages, with the directory structure used on the main website. That is to say, anything that appears at <code>http://www.dreamwidth.org/filename.bml</code> will be here, as <code>htdocs/filename.bml</code>; anything at <code>http://www.dreamwidth.org/directory/filename.bml</code> will be here as <code>htdocs/directory/filename.bml</code>, etc.
  
 +
We are in the process of translating these files into controllers, found in <code>cgi-bin/DW/Controller/</code>, and templates, found in <code>views</code>.
  
 
= logs =
 
= logs =
  
 
Some of the Dreamwidth sub-systems keep log files here, including the journal importer.
 
Some of the Dreamwidth sub-systems keep log files here, including the journal importer.
 
  
 
= schemes =
 
= schemes =
  
 
[[Template Toolkit]] (<code>*.tt</code>) files for generating the site schemes used on Dreamwidth.
 
[[Template Toolkit]] (<code>*.tt</code>) files for generating the site schemes used on Dreamwidth.
 
  
 
= src =
 
= src =
  
 
Source code for some of the packages the code uses. The [[http://hg.dwscoalition.org/dw-free/file/e6e054bc4933/cvs/multicvs.conf list of what gets checked out]] says which files are pulled down to go in <code>src/</code>. In that file the second column on lines 38 onwards lists destinations, so anything with <code>src/*</code> in that column goes in <code>src/</code>.
 
Source code for some of the packages the code uses. The [[http://hg.dwscoalition.org/dw-free/file/e6e054bc4933/cvs/multicvs.conf list of what gets checked out]] says which files are pulled down to go in <code>src/</code>. In that file the second column on lines 38 onwards lists destinations, so anything with <code>src/*</code> in that column goes in <code>src/</code>.
 
  
 
= ssldocs =
 
= ssldocs =
Line 69: Line 70:
  
 
Subdirectories here work the same as those in <code>htdocs</code>.
 
Subdirectories here work the same as those in <code>htdocs</code>.
 
  
 
= t =
 
= t =
  
 
Tests that use the testing framework in main/test.  See [[Dev Testing]] for how to use them.
 
Tests that use the testing framework in main/test.  See [[Dev Testing]] for how to use them.
 
  
 
= temp =
 
= temp =
  
 
TODO: Probably used for temporary file storage, but what temporary files?
 
TODO: Probably used for temporary file storage, but what temporary files?
 
  
 
= test =
 
= test =
  
 
TODO: What's this?
 
TODO: What's this?
 
  
 
= views =
 
= views =
  
 
[[Template Toolkit]] files which are gradually replacing the BML files.  The controllers for the templates are in <tt>cgi-bin/DW/Controller/</tt>.
 
[[Template Toolkit]] files which are gradually replacing the BML files.  The controllers for the templates are in <tt>cgi-bin/DW/Controller/</tt>.

Revision as of 03:07, 21 August 2012

This documents the contents of the $LJHOME development folder as present on all Dreamhacks.

bin

Backend utilities for maintaining and upgrading the site.

Commonly used programs in this directory include:

Subdirectories are:

dev

maint

misc

upgrading

cgi-bin

Code libraries that power the site. This directory is the base of the library path--that is use Net::OpenID::Consumer; refers to the code in cgi-bin/Net/OpenID/Consumer.pm. It contains all the custom Perl libraries and functions that the code references including the LJ::* and DW::* libraries. Code in *.pl files in this directory are also library files but in an older style (bug 1726 refers to these updates).

All subdirectories here map to library names, so DW::Foo goes in cgi-bin/DW/Foo.pm and so forth.

LJ

Original LJ modules.

DW

Newer, DW-based modules.

doc

Unedited versions of some configuration files are stored here, plus the DocBook manual.

raw

Docbook formatted source for the old and very much out of date docbook code for the LiveJournal server. LiveJournal's version is visible at http://livejournal.com/doc/server/ but Dreamwidth has not generated a user-visible copy.

etc

Various configuration files specific to the local site, such as config.pl. These files are not copied to the Mercurial repositories so they can be updated without affecting other running installations.

ext

This directory contains any local repository checkouts--for instance, dw-nonfree, Dreamwidth's non-open source code, goes here.

This directory also contains local config files in ext/local/etc, so they won't be affected by source code updates.

htdocs

User-facing BML pages, with the directory structure used on the main website. That is to say, anything that appears at http://www.dreamwidth.org/filename.bml will be here, as htdocs/filename.bml; anything at http://www.dreamwidth.org/directory/filename.bml will be here as htdocs/directory/filename.bml, etc.

We are in the process of translating these files into controllers, found in cgi-bin/DW/Controller/, and templates, found in views.

logs

Some of the Dreamwidth sub-systems keep log files here, including the journal importer.

schemes

Template Toolkit (*.tt) files for generating the site schemes used on Dreamwidth.

src

Source code for some of the packages the code uses. The [list of what gets checked out] says which files are pulled down to go in src/. In that file the second column on lines 38 onwards lists destinations, so anything with src/* in that column goes in src/.

ssldocs

BML pages that are transmitted over SSL instead of being unencrypted (regular files live in htdocs). This includes the shop and the admin tools, amongst other things.

Subdirectories here work the same as those in htdocs.

t

Tests that use the testing framework in main/test. See Dev Testing for how to use them.

temp

TODO: Probably used for temporary file storage, but what temporary files?

test

TODO: What's this?

views

Template Toolkit files which are gradually replacing the BML files. The controllers for the templates are in cgi-bin/DW/Controller/.