AMPLICATION: Get your new Node.js app within 5 minutes
Tags: node, amplication, webdev, opensource
Published: 2022-11-24 13:08:05

We might have heard of [Amplication](https://amplication.com/) as an open-source tool to build a full-fledged backend application in very less time. These applications are of very high quality and save us time because we don’t need to have repetitive coding for them.

All you must do is create data models and configure them with interactive UI or CLI and Amplication will then build an application with a strong backend (Typescript and Node.js) and functional REST API that is accompanied by Admin UI authentication, and role-based authorization. To top it off, as a developer, we can download the generated code and customize it according to our needs in the application.

![Amplication](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w0j7aqtjmrb1rmeqy053.jpg)

In total, you can sum it up to a Docker container with your database, a Node.js application, and a React client.

The application includes the technologies like NestJS, Prisma, REST API, GraphQL API, a react admin UI, authentication, authorization, and logging.

![Developer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c6h87d8g6zwyyrl0k7cs.jpg)

In the app, there are two projects in a separate folder.

**1. Server**- There are all the server components in the folder with REST API, GraphQL, authentication, authorization, data validation, etc.

**2. Admin**- CRUD operations on the data models, a react app with ready-made forms for creating and editing the data models.

## How does Amplication work?

### `<Design> models & roles`

Here, the data entities are defined alongside the role-based access via Amplication’s User Interface or the Command Line Interface. Your database, an admin UI, and an API are auto-generated things.

![Design](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mkfew16c3ndb43qo7h2o.jpg)

### `<Deploy> your app`

You can choose either one of the following options to deploy your app.

- Deploy the app to the Amplication cloud.

- Get a Docker container to deploy your app somewhere else.

![Deploy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vdtvurxp4afsfofzu0xn.jpg)

### `<Sync> your app with GitHub`

The good feature of Amplication is that it syncs your app code in Node.js format and into your GitHub repository. This helps you to keep your code updated from your IDE.

![Sync](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k5jd9wjiph94f3nwk9ow.jpg)

### `<Access> your Node.js app`

Since the admin UI is auto-generated, you can access your data easily — they are based on their data model schema.

![Access](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6tclxxrjwst194ro8frj.jpg)

### `<Connect> your code using REST or GraphQL`

This lets us start working on our API from REST or GraphQL client.

![Connect](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n9ashzc6wmsqmz2lvcdy.jpg)

## Creating a new app with Amplication

- Sign in to [app.amplication.com](https://app.amplication.com/login). If you are directly led to New Service Page — see 3 but if you aren’t, click the Amplication logo on the top-left corner and reach the project page.

- Press the New Resource button and the Service.

- Leave the default selections in the New Service Page to create an empty service.

- Press the “Create Service” button.

![Create-Service](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xu9z7236yhr2sw2qacb8.jpg)

It will open an overview window.

![Overview Window](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a00gafy0jlvksxyt8a7e.jpg)

- The overview page has an option called ‘Go to Entities’ [alternatively the ‘Entities’ icon on the main menu toward the left sidebar]. Click it and the entities page opens where you can view the entities under your service.

![Entities](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t9ns1ub3vji2w97c8kbq.jpg)

- Click ‘Add Entity’ and type the entity name you want to add and click ‘Create Entity’. Those entities will also come with auto-generated values like ‘Plural Display Name’ and some default fields.

![New Entities](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2skyoz97kutmmwkesv2x.jpg)

- Add entity fields like name, description, start date, and owner. Just type the field name in the entity fields text box and click ‘add field’ so that the field’s property panel opens where you can have your property value opened.

- Create Roles to assure the role type like Admin or Manager or likewise.

- For the users to allow access to the entity, set the permissions like view, create, update, delete, search, etc. They can be set publicly, role-wise, or granularly. Entity permissions are also included in the step.

![Permissioms](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2zaplk47ihq6offsinyf.jpg)

- Commit your changes to include them in the next version of the generated application. Make sure to mention the description of the changes you’re committing. Further, click the download icon in the Generate Code row and get the .zip file for your app.

- You are ready. You can further customize it according to your need for your application.

{% embed https://youtu.be/wCJ2jF1IU7U %}

{% embed https://github.com/pragyaasapkota/Node-and-NPM %}

**_I hope this article was helpful to you._**

**_Please don’t forget to follow me!!!_**

**_Any kind of feedback or comment is welcome!!!_**

**_Thank you for your time and support!!!!_**

**_Keep Reading!! Keep Learning!!!_**