I tried Amplication so you don't have to. Here is my experience

Recently , I read about this service while doom scrolling on Instagram and decided to give it a go. Amplication is a service that generates typescript node.js endpoints automatically based on the definition of data and service.

I was wondering how would this work, so I created a small pet project to see how the service behaved.

The pet project. is to create a simple mood tracker, where users can each day post a record of how they felt, and tag it so they can keep track of their mood.  I called it Pixel, so each pixel describes a given mood for a user at a given time.

The first thing to notice about this service is the entity manager. You design the entity manager how you want it, and can also decide what type of database you are going to have. In my case, I decided to go along with mongo DB. I defined the fields and general settings of each of the entities. Regarding the userbase, amplication provides with an authentication scheme pre built in, so you don't need to program this.

You can define pretty much anything in your domain and create all sort of modules using Graph QL API or REST API. To be honest I was very impressed with what it was doing.

You can also personalize and install many modules, like Terraform, Message queues and brokers, or connect your service to github actions ( i didn't explore this part, though)

When you have designed the microservice, you can sync your code with a Github repo and it will automatically sync the code, create a PR that you can then merge into your masterbranch.

(very impressive).

It also built in an admin panel using react that allows you to interact with all of the project. Create all sorts of tests (both unit and integration tests)  And will deploy the whole project in your localhost using Docker. (and there are more plugins).

I was very impressed because it worked like a charm from the first try.  Take a look at the generated code here.

The pros and the cons

After my first pre test. I must say I liked how it worked. The code was deployed and i only needed to run docker compose up and everything started working, I had access to a backend panel and I could test my endpoint easily using the right tools and having the right auth token.

Regarding the code, there's a couple of things I have to say. The code shipped uses NestJS, which , to my opinion is by far the best Typescript framework you can find out there.

The code produced also looks relatively robust and safe. However, I did find it was producing and INSANE amount of files and sub divisions for such a small project. If you take a look at the code you can see how separated each part of the business logic is, regarding the tiny project that was created. (This is one of the cons in my opinion).

What this means is that, I believe if you want to start from scratch and then build upwards, it makes mantaining this code a bit more complicated. However, the code is not really meant to be used like this, but by modifying the values and the parameters in the amplication webpage, so that it can re generate the code, and then create a PR and you can merge it into the original code.

The good side, is that I literally created an endpoint in under an hour of work.

The bad side, is that it doesn't feel so safe to personalize, or to keep developing. Is it safe to push changes? Amplication has an .amplicationignore file to ignore your files and it kind of works a little bit like .gitignore

It also allows you to build your own business logic into the service, and it it is relatively well documented. (though I have not diven deep enough into this).

So, is it the end of programming as such?

No, definately I don't think so, but it is something worth the while exploring. I'm sure what they have created can suite your needs for many things. In my case it was just a test demonstration project and it came along allright in simply 1 hour of work. What would have previously cost me 15 -20 days  to build was automatically generated in one hour.

But, would you rely on amplication to deploy all of the infrastructure of one of your applications? What if you want to connect to other external services that are not within the amplication's parameters?

​I must say I have not explored this path at all, but Amplication docs say you can, and I'm sure if needed be I'd definately give it a try. Plus it runs nestjs, which is awesome.

Be the first to comment