-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Introduction to the source
This is the official introduction to the source of etherpad. First, we're gonna take a look at the root directories...
etherpad
|- bin/
|- src/
|- doc/
|- tests/
|- node_modules/
|- var/
bin/
contains some useful scripts for e.g. running tests, checking pad integrity, deleting pads, migrating from DirtyDB to MySQL, etc.
src/
contains the etherpad source code.
doc/
contains the documentation in markdown format. Use $ make docs
in etherpad root to build the html docs.
tests/
contains backend and frontend tests. To run the frontend tests, point your browser to <yourdomainhere>/tests/frontend
. To run the backend tests, run bin/backendTests.sh
.
node_modules/
contains installed plugins. The contents of src/
are deployed to node_modules/ep_etherpad-lite
once you run bin\run.sh
.
var/
contains the DirtyDB and some other stuff.
Now, the source directory. This is what it looks like:
etherpad/src/
|- locales/
|- node/
|- static/
|- templates/
|- ep.json
|- package.json
locales/
contains the translations, which are managed by http://translatewiki.net
node/
contains server-side code.
etherpad/src/node
|- db
|- eejs
|- handler
|- hooks
|- utils
db/
contains modules for accessing the database as well as the code handling the HTTP API. A commonly used module for example is Pad.js
, which manages pad state. Take a peek!
eejs/
contains the templating engine. What's special about this is that templates are rendered on the server.
handler/
contains modules the handle stuff like import/export and collab messaging -- an important part of etherpad lives in PadMessageHandler.js
. Go check it out!
hooks/
contains mostly express-related code for registering specific routes. E.g. i18n.js
builds the translation files and registers routes to serve them; express/specialpages.js
registers the routes that serve pads, the timeslider and others; express/static.js
sets up a yajsml server which serves the client-side code. Click through the others to discover more!
utils/
contains modules for handling different import/export formats (e.g. ExportHtml.js
), as well as parsing the settings file (Settings.js
), the toolbar creation manager (toolbar.js
), etc.
static/
contains client-side js code, css and fonts. Most of this is self-explanatory.
etherpad/src/static
|- css/
|- custom/
|- font/
|- js/
js/
contains the client-side code.
templates/
contains the templates for the public pages index, pad and timeslider as well as the admin pages. Looking through the template code, you can find named eejs blocks. You can use these in your plugins to add custom html to the template.
- Docs
- Translating
- HTTP API
- Plugin framework (API hooks)
- Plugins (available)
- Plugins (list)
- Plugins (wishlist)
- Etherpad URIs / URLs to specific resources IE export
- Etherpad Full data export
- Introduction to the source
- Release Procedure
- Etherpad Developer guidelines
- Project to-do list
- Changeset Library documentation
- Alternative Etherpad-Clients
- Contribution guidelines
- Installing Etherpad
- Deploying Etherpad as a service
- Deploying Etherpad on CloudFoundry
- Deploying Etherpad on Heroku
- Running Etherpad on Phusion Passenger
- Putting Etherpad behind a reverse Proxy (HTTPS/SSL)
- How to setup Etherpad on Ubuntu 12.04 using Ansible
- Migrating from old Etherpad to Etherpad
- Using Etherpad with MySQL
- Customizing the Etherpad web interface
- Enable import/export functionality with AbiWord
- Getting a list of all pads
- Providing encrypted web access to Etherpad using SSL certificates
- Optimizing Etherpad performance including faster page loads
- Getting to know the tools and scripts in the Etherpad /bin/ folder
- Embedding a pad using the jQuery plugin
- Using Embed Parameters
- Integrating Etherpad in a third party app (Drupal, MediaWiki, WordPress, Atlassian, PmWiki)
- HTTP API client libraries