DEV Community

Cover image for AMPLICATION: Get your new Node.js app within 5 minutes
Pragya Sapkota
Pragya Sapkota

Posted on • Originally published at pragyasapkota.Medium

AMPLICATION: Get your new Node.js app within 5 minutes

We might have heard of Amplication 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

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

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

<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

<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

<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

<Connect> your code using REST or GraphQL

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

Connect

Creating a new app with Amplication

  • Sign in to app.amplication.com. 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

It will open an overview window.

Overview Window

  • 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

  • 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

  • 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

  • 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.

GitHub logo pragyaasapkota / Node-and-NPM

A blog repo with the topics related to Node js and NPM

Node and NPM

Node and NPM

Node js is an open source development platform for executing JAvascript code server-side.

NPM (Node Package Manager) is the world's largest Software Registry with over 800,000 code packages. Open source developers use npm to share software.

This is a index for the concepts of Node js and NPM.

If you wish to open these in a new tab, Press CTRL+click

S.N. Table of Content
1. npm install
2. Amplication

Thank you!!!


Show some ❤️ by starring this repository!



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!!!

Top comments (0)