Amplication is ramping up to be a true enterprise-level solution, and with the support for microservices introduced in v0.14.0 we have taken a major step towards this goal, enabling users to scale up to larger backend projects.
Flexibility is the key, and we have further enhanced Amplication’s scalability through the introduction of a separate Docker file for each component. Further flexibility is provided through the Modular Code Generation feature, enabling you to select from REST API, GraphQL API, and Admin UI.
Not stopping there, we are moving towards a monorepo model by enabling the sync of multiple apps from Amplication to a single repository in GitHub, through custom directories for the generated components.
The Sandbox feature has been removed, as it is no longer aligned with Amplication’s focus and vision.
Continue reading for more information about these new features:
Microservices
Amplication 0.14.0 introduces initial support for microservices architecture, making applications developed with Amplication easier to scale and faster to develop.
Modular Code Generation
Everything you need, and nothing you don’t.
Starting from Amplication 0.14.0 you can choose which of the following to generate in your app:
- REST API
- GraphQL API
- Admin UI
Note that the Admin UI works with GraphQL API, so you must select GraphQL if using Admin UI.
This replaces the previous opinionated structure which generated all these elements (whether you needed them or not) with a fixed directory structure that synced a single app to a dedicated GitHub repository.
Custom directories for the generated code components
With Amplication 0.14.0, you can customize the default directories for generated code (such as Server and Admin UI). This makes generated projects more modular. For example, each project can have its own Docker files, README files etc.
We have added two new parameters for each app, providing you with the option to override the default directories for the Server and Admin UI. Also, we cleaned things up by removing the files in the root directory.
This is the first step toward full support for a monorepo model, which will eventually replace the existing monolithic structure. While we enable you to sync multiple services to a single repository, for now, you should still manage your favorite monorepo tool manually.
Example - setting two separate apps to work with a monorepo in GitHub:
We have two apps, “Customer Service” and “Order Service”, and we want all services to sync to the ./packages
directory in the same repo. To achieve that we use the following settings:
Customer Service
Server base directory: packages/customer-service
Admin UI base directory: packages/customer-service-admin
Order Service
Server base directory: packages/order-service
Admin UI base directory: packages/order-service-admin
A separate Docker file for each component
As a further boost to scalability, Amplication now generates two separate Docker files, one for the Server and another one for the Admin UI. Also, we removed all other files that were generated in the root folder and created new files in each directory separately.
Previously, Amplication generated the app with a single Docker file that included both the server and the admin files. The admin files were served using the static-files module of NestJS, which allowed a straightforward deployment strategy, but didn't scale well.
Removal of Sandbox Deployment
In previous releases, every app created on Amplication Cloud was deployed to a sandbox environment. After listening to our users, we decided to remove this feature, and think it is important to share some of the reasons with you:
Firstly, sandbox deployments could not include any custom code managed by the user. This made it redundant as soon as users start adding functionality to their app.
Secondly, the sandbox environments did not scale very well to support our vision of monorepos and microservices.
Lastly, deployment times were long, with a detrimental effect on productivity.
Overall, we believe that by removing this feature we can focus on more important things and provide you with great value so you can focus on coding what matters.
What's happening next in Amplication's roadmap?
We are continuing to develop powerful new capabilities such as advanced architecture and plugins. To find out more about what we have planned, check out our roadmap.