How to Build a CRUD Application with Aurelia? A Comprehensive Tutorial
In this guide, you will learn how to create simple CRUD (create, read, update, delete) application using the Aurelia framework.
This tutorial explains how to build an application capable of handling essential data operations by integrating Aurelia with Back4app as your backend service.
Initially, you will set up a Back4app project titled Basic-CRUD-App-Aurelia to serve as your robust data management system.
Next, you'll outline a scalable database structure by manually defining collections and fields—or by utilizing the Back4app AI Agent—to ensure reliable data operations.
Subsequently, you will take advantage of the Back4app Admin App, which offers a drag-and-drop interface for managing your data effortlessly.
Finally, you will connect your Aurelia frontend with Back4app using REST/GraphQL calls (or the Parse SDK where applicable), and secure your backend with detailed access control.
By the end of this tutorial, you'll have a production-ready web application with complete CRUD functionality, user authentication, and secure data handling.
- Master building CRUD applications with a reliable backend service.
- Acquire practical skills for designing a scalable backend and linking it to an Aurelia frontend.
- Explore a no-code admin interface (Back4app Admin App) for seamless data operations.
- Learn how to deploy your application using modern techniques, including containerization.
Before you begin, make sure you have the following:
- A Back4app account with an active project. Visit Getting Started with Back4app if you need guidance.
- An Aurelia development setup. Use the Aurelia CLI or a similar tool; ensure you have Node.js (version 14 or later) installed.
- Basic proficiency in JavaScript, Aurelia, and REST APIs. Consult the Aurelia documentation for more details if required.
- Sign in to your Back4app account.
- Press the “New App” button from your dashboard.
- Enter the project name: Basic-CRUD-App-Aurelia and complete the setup steps.

After creation, your project will be visible on your dashboard, ready for backend configuration and data management.
For this CRUD application, you'll define multiple collections. Below are examples of the collections required along with the fields and data types needed to support CRUD operations effectively.
Field | Data Type | Details |
---|---|---|
_id | ObjectId | Auto-generated primary key. |
title | String | Name or title of the item. |
description | String | A short description of the item. |
created_at | Date | Timestamp when the item was created. |
updated_at | Date | Timestamp when the item was last modified. |
Field | Data Type | Details |
---|---|---|
_id | ObjectId | Auto-generated primary key. |
username | String | Unique identifier for the user. |
String | Unique email address for account validation. | |
password_hash | String | Encrypted password for user authentication. |
created_at | Date | Account creation timestamp. |
updated_at | Date | Timestamp of the last account update. |
You can create these collections manually in the Back4app dashboard by adding a new class for each and defining the necessary columns.

Easily set up your database fields by choosing the correct data type, specifying field names, setting default values, and indicating if the field is mandatory.

The Back4app AI Agent simplifies schema generation by letting you describe your data model through prompts. This tool automatically creates collections and fields based on your requirements.
- Launch the AI Agent: Open your Back4app dashboard and locate the AI Agent under the project settings.
- Describe Your Schema: Input a detailed prompt that outlines the collections and fields you require.
- Review and Confirm: Examine the generated schema suggestions and apply them to your project.
This method accelerates the schema creation process and guarantees a consistent structure for your application.
The Back4app Admin App is a robust, no-code solution that enables you to manage your backend data through a user-friendly drag-and-drop interface. This tool simplifies the execution of CRUD operations.
- Open the “More” menu in your Back4app dashboard.
- Select “Admin App” and then click “Enable Admin App.”
- Set up your admin credentials by creating your initial admin account, which also establishes default roles (such as B4aAdminUser) and system collections.

After enabling, sign in to the Admin App to start managing your data.

Within this interface you can:
- Create Entries: Use the “Add Record” option in a collection (e.g., Items) to add new data.
- View/Modify Entries: Click on any record to inspect its details or make changes.
- Remove Entries: Select the delete option to eliminate data that is no longer needed.
This interface streamlines your data operations, enhancing user experience with its intuitive design.
With your backend configured and managed via the Admin App, it's time to connect your Aurelia frontend to Back4app.
You can use REST or GraphQL APIs. For instance, to fetch items via REST:
Integrate these API calls within your Aurelia components as necessary.
Enhance security by assigning ACLs to your data objects. For instance, to create a private item:
Within the Back4app dashboard, adjust the CLPs for each collection to enforce default security rules, ensuring only authenticated or authorized users can access sensitive information.
Back4app uses Parse’s User class to handle authentication. In your Aurelia app, you can manage user registration and login as illustrated below:
A similar pattern can be implemented for login and session management. Additional functionalities, like social login integration, email verification, and password reset, can be configured through the Back4app dashboard.
Back4app’s Web Deployment feature allows you to host your Aurelia application efficiently by deploying code from a GitHub repository.
In this section, you will prepare your production build, commit your code to GitHub, connect your repository with Web Deployment, and deploy your site.
- Open your project directory in the terminal.
Execute the build command:
- Confirm the Build: Ensure that the dist folder includes an index.html and the necessary subdirectories for JavaScript, CSS, and images.
Your GitHub repository should house all source files for your Aurelia frontend. An example structure might be:
src/parse-config.js
src/app.js
Initialize Git in your project folder (if not already done):
Stage your files:
Commit your changes:
- Create a repository on GitHub (e.g., Basic-CRUD-App-Aurelia-Frontend).
Push your code to GitHub:
- Access Web Deployment: Log in to your Back4app dashboard, navigate to your project (Basic-CRUD-App-Aurelia), and select the Web Deployment option.
- Connect to GitHub: Follow the prompts to integrate your GitHub account, granting Back4app access to your repository.
- Choose Your Repository and Branch: Select the repository (e.g., Basic-CRUD-App-Aurelia-Frontend) and the branch (e.g., main) containing your code.
Set the following configuration details:
- Build Command: If the dist folder isn't pre-built, specify a command (e.g., au build --env production) for Back4app to execute.
- Output Directory: Set this to dist so Back4app knows where your static files are located.
- Environment Variables: Add any required environment variables (like API keys) in the configuration settings.
If you prefer Docker deployment, include a Dockerfile in your repository similar to the following:
Configure the Docker deployment option in Web Deployment accordingly.
- Press the Deploy Button: After configuring deployment, click Deploy.
- Monitor the Build Process: Back4app will fetch your code from GitHub, execute the build command if needed, and deploy your application in a container.
- Retrieve Your URL: Once deployment is complete, Back4app will provide the URL where your Aurelia application is hosted.
- Open the Provided URL: Visit the URL in your browser to see your live site.
- Test the Application: Ensure that your application loads correctly, routes function as intended, and all assets (CSS, JavaScript, images) are served.
- Troubleshoot if Necessary: Use browser developer tools to diagnose any issues, and review Back4app deployment logs if needed.
Congratulations! You have successfully built a complete CRUD application using Aurelia and Back4app.
You have set up a project named Basic-CRUD-App-Aurelia, defined comprehensive database schemas for Items and Users, and managed your data using the Back4app Admin App.
You’ve also integrated your Aurelia frontend with the backend and implemented robust security measures.
Next Steps:
- Enhance Your UI: Expand your Aurelia application with detailed views, search functionalities, and real-time data updates.
- Add Advanced Features: Consider incorporating cloud functions, third-party APIs, or role-based permissions.
- Explore Further: Check out the Back4app documentation and additional Aurelia resources for more in-depth guidance on optimization and customization.
Happy coding and best of luck on your development journey!
