Potlatch 1/Development overview/File-by-file
From OpenStreetMap Wiki
Like the rest of OSM, all the Potlatch source is in svn.
These are static files at sites/rails_port/public/potlatch/. They are delivered to the user.
- potlatch.swf is the main (compiled) SWF client. The user runs this within their browser.
- swfobject.js is an open-source SWF embedding library.
- ymap.swf is Yahoo!'s interface to their API. This SWF is compiled with Adobe Flash rather than Ming. (The .fla is not necessary to run Potlatch but is available on request, and consists simply of the Yahoo component and six lines of ActionScript.)
These run on the server to do the database interaction (see server overview).
- sites/rails_port/app/controllers/amf_controller.rb is the serverside script which receives requests from the SWF, accesses the database, then returns the result.
- sites/rails_port/app/controllers/swf_controller.rb is the serverside script which draws GPS traces.
- sites/rails_port/config/potlatch/presets.txt is a CSV-like list of common way and node key/value pairs.
- sites/rails_port/config/potlatch/colours.txt is a tab-separated list of fill and stroke colours used when drawing the map.
- sites/rails_port/config/potlatch/relation_colours.txt is a tab-separated list of highlight colours used when drawing relations on the map.
- sites/rails_port/config/potlatch/autocomplete.txt is a tab-separated list of keys and values used for the autocomplete menus.
- potlatch.as is the main ActionScript source code.
- Other .as files are includes for the above. They have fairly obvious names.
- potlatch_assets.pl contains Ming-Perl drawing primitives for the icons.
- potlatch.pl (can be called from the command line or as a CGI) just compiles an SWF from the above. You probably won't need to change this.