Help: Source Code
e621's source code is a heavily modified fork of the Danbooru code. It is a Ruby on Rails application. It is not currently available to users.
You can get the original Danbooru source code using Subversion. Run svn co svn://donmai.us/danbooru/trunk for the latest copy.