Difference between revisions of "Directory Structure"

From Dreamwidth Notes
Jump to: navigation, search
(Clarified/extended cgi-bin/ definition)
m (Complete rewrite/refactor that I've had on my talk page)
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 development folder checked out by <code>bootstrap.pl</code>.
 
  
=Directories you will use a lot=
+
= bin =
  
== [[Main development folder/bin|bin]] ==
+
Backend utilities for maintaining and upgrading the site.
  
This directory contains backend utilities for maintaining and upgrading the site.  
+
Commonly used programs in this directory include:
 +
* [[Script: checkconfig.pl|checkconfig.pl]]
 +
* [[Script: create-users|create-users.pl]]
 +
* cvsreport.pl
  
== [[Main development folder/cgi-bin|cgi-bin]] ==
+
= cgi-bin =
  
This directory contains the code that runs the site.  This is the base of the library path--that is <code>use Net::OpenID::Consumer;</code> refers to the code in <code>cgi-bin/Net/OpenID/Consumer.pm</code>. It contains all the custom Perl libraries functions that the code references, including the <code>LJ::*</code> and <code>DW::*</code> libraries.
+
Code libraries that power the site.  This directory is the base of the library path--that is <code>use Net::OpenID::Consumer;</code> refers to the code in <code>cgi-bin/Net/OpenID/Consumer.pm</code>. It contains all the custom Perl libraries and functions that the code references including the <code>LJ::*</code> and <code>DW::*</code> libraries. Code in <code>*.pl</code> files in this directory are also library files but in an older style ([http://bugs.dwscoalition.org/show_bug.cgi?id=1726 bug 1726] refers to these updates).
  
== [[Main development folder/htdocs|htdocs]] ==
 
  
This directory contains most of the user-facing 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. To see your changes on your development site, you need to make the changes to the appropriate file in this directory.
+
= cvs =
  
== [[Main development folder/ssldocs|ssldocs]] ==
+
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]].
  
This contains pages that are transmitted over SSL instead of being unencrypted. Regular files live in <code>htdocs</code>.
+
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.)
  
== [[Main development folder/views|views]] ==
 
  
This contains [[Template Toolkit]] files, as part of our conversion from BML to Template Toolkit.  The controllers for the templates are in <tt>cgi-bin/DW/Controller/</tt>.
+
= doc =
  
=Special directory=
+
Unedited versions of some configuration files are stored here, plus the DocBook manual.
  
== [[Main development folder/cvs|cvs]] ==
+
== raw ==
  
The cvs folder contains a local checkout of the [http://hg.dwscoalition.org Mercurial repositories]. To generate a patch for your changes that can be applied, you need to make the changes to the appropriate changes in this directory, <em>after</em> you have verified that the changes work, testing them by putting them in <code>htdocs</code>, <code>cgi-bin</code>, or <code>ssldocs</code> and viewing them (and testing them) on your development site. Once you've done that, you can use the automatic tools to sync your "live" directories and your cvs directory. More information can be found at [[http://wiki.dwscoalition.org/notes/Dev_Initial_Programming_Notes]].  
+
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.
  
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.)
 
  
 +
= 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.
 +
 +
 +
= htdocs =
 +
 +
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.
 +
 +
 +
= logs =
 +
 +
Some of the Dreamwidth sub-systems keep log files here, including the journal importer.
 +
 +
 +
= schemes =
 +
 +
[[Template Toolkit]] (<code>*.tt</code>) files for generating the site schemes used on Dreamwidth.
  
=Directories you will not need to change often=
 
  
These are directories you won't need to change often, unless you're working on some specific task related to them.
+
= src =
  
== doc ==
+
TODO: Check this
 +
Source code for some of the packages the code uses.  Perhaps this is the folder that comes with the distribution and <code>cvs</code> is checked out from the other repositories?  Does not contain all of the ones in <code>cvs</code> though.
  
Most notable thing in here is the docbook code for the server and LJ programming guides.
 
  
== etc ==
+
= ssldocs =
  
Empty in a clean checkup.  Your site's <code>ljconfig.pl</code> will go here, to make sure the original <code>ljconfig.pl</code> can be updated without ill effects on a running installation.
+
[[BML]] pages that are transmitted over SSL instead of being unencrypted (regular files live in <code>htdocs</code>). This includes the shop and the admin tools, amongst other things.
  
== logs ==
 
  
Looks to be an empty folder to store logs during running the code.
+
= t =
  
== [[Main development folder/src|src]] ==
+
Tests that use the testing framework in main/test.  See [[Dev Testing]] for how to use them.
  
Confusingly enough, contains source for some of the packages the code uses.  Perhaps this is the folder that comes with the distribution and <code>cvs</code> is checked out from the other repositories?  Does not contain all of the ones in <code>cvs</code> though.
 
  
== [[Main development folder/t|t]] ==
+
= temp =
  
Looks like this contains the tests that use the testing framework in main/test.  See [[Dev Testing]] for how to use them.
+
TODO: Probably used for temporary file storage, but what temporary files?
  
== temp ==
 
  
Empty in a clean install.  Probably used for temporary file storage.
+
= test =
  
== test ==
+
TODO: What's this?
  
Very sparse directory; really not much here.
 
  
== var ==
+
= [[Main development folder/views|views]] =
  
A clean install of this only includes devdata/evillaugh.wavNobody remembers what this is for.
+
[[Template Toolkit]] files which are gradually replacing the BML filesThe controllers for the templates are in <tt>cgi-bin/DW/Controller/</tt>.

Revision as of 22:24, 15 September 2011

This documents the contents of the $LJHOME development folder as checked out by bootstrap.pl and present on all Dreamhacks.


bin

Backend utilities for maintaining and upgrading the site.

Commonly used programs in this directory include:

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).


cvs

Local version of the Mercurial repositories. Information about use of these repositories can be found in the [Developers' Initial Programming Notes].

The two Mercurial source branches you'll be using most often are dw-free dw-free and 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.)


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 ljconfig.pl. These files are not copied to the Mercurial repositories so they can be updated without affecting other running installations.


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.


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

TODO: Check this Source code for some of the packages the code uses. Perhaps this is the folder that comes with the distribution and cvs is checked out from the other repositories? Does not contain all of the ones in cvs though.


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.


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/.