We finally decided to rewrite ToolJet server using TypeScript!
ToolJet has two main components, the client and the server. ToolJet client is a ReactJ

Migrating ToolJet server from Ruby on Rails to Node.js

submited by
Style Pass
2021-07-13 12:30:06

We finally decided to rewrite ToolJet server using TypeScript! ToolJet has two main components, the client and the server. ToolJet client is a ReactJS application and ToolJet server is a Ruby on Rails API-only application. Whenever a new application is built using ToolJet, the frontend ( client ) generates the definition of the app in JSON and the server persists the versioned definitions on a PostgreSQL database. The server also acts as a proxy that run queries on top of the data sources ( data sources in ToolJet includes databases like MongoDB and API based services like Google Sheets ).

Ruby accounts for only 14.5% of our codebase. When we built ToolJet, we chose Ruby on Rails as the backend because of its ability to quickly prototype and iterate due to its strong adherence to ‘convention over configuration’.

We open-sourced ToolJet with the eventual goal of letting everyone build plugins ( database integrations, API integrations & UI widgets ) for ToolJet easily. But with the current architecture, if a developer wants to build a new data source integration for  ToolJet, he/she should be familiar with both Ruby and JavaScript because running queries is handled by Rails and building queries is handled by query editors in the ReactJS frontend. Thus when we migrate the server to Node.js, the developers will be able to build ToolJet plugins using just one language.

Leave a Comment