Architecture Audit and Improvements for Thoughtful Automation

We’ve thoroughly studied the front end, back end, and AWS architecture for Thoughtful Automation — a platform that helps businesses automate their processes. We had to learn what wasn’t working correctly and implement all possible improvements.

TA automates repetitive clicks so people can shift their focus to value-adding activities. For example, a team member needs to draw up approximately 120 invoices a week. It can take a person 2-3 days to do. And with TA, the company can automate this work and have it done within a few hours without any manual labor, saving them money and time of their employees.

Learn more about them here: https://www.thoughtfulautomation.com/

descriptive text

What the task was

Their backend was built as an express server stored in 1 lambda, which caused many problems in runtime, so we decided autoto rewrite it from scratch, separating logic and lambdas for different processes. The same fate came upon the frontend and AWS architecture as they’ve failed to meet the client’s requirements.

task

How we solved it

Backend

So, as we’ve decided to completely re-do the backend, we chose to do it with Typescript to ensure backend work stability with a type-safe approach. We’ve also added VPC configurations for databases to improve the overall security and rebuilt the Postgres database to raise data manipulation speed.

Frontend

The frontend was initially build using JavaScript, so we’ve also decided to rewrite it with Typescript to improve stability with the type-safe approach.

AWS architecture

For the AWS architecture, we’ve used serverless for better CI/CD managing. So it was re-done by sticking to the microservices best practices and divided into separate AWS Lambdas parts. And we’ve also rebuilt rhe serverless configuration in a way that ensures errorless deployment.

Extra features:

Show bot’s actions in real-time (with <1-second delay)

We’ve used AWS Lambdas to get updates from the bots every second and updated database logs for it. We’re planning to add WebSockets API Gateway to make it even “more real-time.”

Add bot execution scheduling to any day and time in the future

For the scheduling job, we were considering different approaches and decided to use AWS Step Functions, which can invoke functions at some specific time in the future. It helped us make scheduling as accurate as possible.

Add high-performance and fast filtering and sorting features

For this task, the most critical moments were database structure and indexing. So we’ve designed the database structure so that any incoming request, instead of iterating through all data, used only the needed piece of data.

How it benefited our client

After our refactoring phase, the TA execution speed has improved dramatically. Backend response time and the frontend loading time decreased to <50 ms and <2 seconds for the main info pages for the first load. Also, we’ve fixed the AWS Lambda cold starts to handle any backend request in less than a second.

Moreover, we’ve made sure to improve security protection by:

doings

Adding VPC configurations for databases

doings

Creating better Auth handling

doings

Restructuring the database and credentials storage

After creating the additional features, TA’s services have raised in value. Now it’s possible to navigate through a large number of bot logs, job executions, and so on. Also, we‘ve addressed all the primary needs of their users, which allowed our client to promote their product as a highly effective service.

Our works

chart

Aim Gods

APIs, website, and security enhancement

chart

ELT Platform

Redevelopment