This page is still being edited and reviewed.
Both the native and Docker installation for development will result in cloning the source code (or a fork of it) of the Chemotion ELN project. The source code can be found on GitHub. The images in this chapter are from the Docker installation.
The project is built with the Ruby on Rails framework in version 5. It uses the Model-View-Controller (MVC) architectural pattern. However, this project differs from a typical Rails project:
- It is using a JSON API.
- Rails comes with built-in support for SQLite, but the project is using PostgreSQL. Redis might be used in the future as well.
- The front-end is built using the React framework. The main page is a single-page application (SPA) along with a few other pages.
Since we upgraded from Rails 4 to 5, assets are compiled with Webpacker in addition to (or in the future replacement of)
the Rails Asset Pipeline.
There are currently multiple directories containing assets (e.g., under
The app/assets directory was the main directory for storing assets in the previous version with Rails 4.
With the implementation of Webpacker the assets moved to app/packs.
app/packs/src contains a directory for each single-page application (SPA). For example, the user-facing SPA lives in is the
The stylesheets directory is still located under
Contains the configuration of the application. For example, database.yml contains the configuration of the database. The environments subdirectory contains the three environments provided by Rails by default (i.e., development, production, and test). The initializers subdirectory contains the configuration of extensions. For instance, in the devise subdirectory, we configure a package for authentication which takes care of the mail sender and passwords.
Modules related to the application are added to this directory, such as PubChem, DataCite, OpenBabel. It also has the storage directory where the files are uploaded.
Contains static files, such as images of molecules. Iit is difficult to query them as they have hexadecimal identifiers. When creating, e.g., a new reaction, the application will create an image for it and store it in the images/reactions directory.
Contains attachments uploaded by the user.