Help: Source Code
e621's source code is a heavily modified fork of the Danbooru code. It is a Ruby on Rails application. It has been made officially Open Source on March 5th 2020.
You can find the newest version of e621 at Github. https://github.com/zwagoth/e621ng.
You can also get the original/latest Danbooru source code from GitHub. https://github.com/danbooru/danbooru