DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • SelfService HR Dashboards with Workday Extend and APIs
  • How We Reduced LCP by 75% in a Production React App
  • Shipping GenAI Into an Existing App: How to Integrate AI Features Without Rewriting Your Stack
  • Modernizing Applications with the 7 Rs Strategy – A CTO's Guide

Trending

  • Setting Up Claude Code With Ollama: A Guide
  • The Prompt Isn't Hiding Inside the Image
  • How AI Coding Assistants Are Changing Developer Flow
  • Vercel AI SDK Middleware vs Genkit Middleware: A Hands-On Comparison

Guide to Add Custom Modules in ABP.IO App

This guide explains how to create shared and application-layer custom modules in ABP.IO, configure dependencies, and integrate them into your app using CLI and code.

By 
Harsh Gupta user avatar
Harsh Gupta
·
Dec. 08, 25 · Tutorial
Likes (0)
Comment
Save
Tweet
Share
935 Views

Join the DZone community and get the full member experience.

Join For Free

If you want to extend your ABP.IO application with a custom module, like Vineforce.Test—this guide is for you. Whether you’re building a new feature or organizing your code into reusable parts, creating a custom module helps keep your application clean, scalable, and maintainable.

In this guide, we’ll walk through the full integration process step by step, covering both the backend and the Angular frontend. You’ll learn how to properly register the module, configure dependencies, and connect the UI layer to your logic. By the end, you’ll have a working module fully integrated into your ABP.IO solution that follows best practices.

No guesswork, no skipping steps—just a clear path to getting your custom module up and running.

Prerequisites

1. Install ABP CLI

Run the following command:

HTML
 
dotnet tool install -g Volo.Abp.Cli

2. Create the main Apb.io application with the name “Vineforce.Admin”

HTML
 
abp new Vineforce.Admin -t app -u angular -m none --separate-auth-server --database-provider ef -csf

It creates the structure of backend of the main abp application as follows:

3. Configure appsettings.json of the main ABP.IO

Edit the appsettings.json files in the two projects below to include the correct connection strings:

Projects: 

  • Vineforce.Admin.HttpApi.Host
  • Vineforce.Admin.DbMigrator 

4. Create the Module folder in the main application. Follow the official guide to create your module.        


     


If you choose Angular as the UI framework (by using the -u angular option), the generated solution will include a folder named angular. This folder contains all the client-side code for the application. 

Example: A module named Vineforce.Test was created using the Angular UI option.

1. When you open the angular folder in an IDE, the folder structure will appear as follows:

2. And backend structure as follows:

3. Configure appsettings.json

Edit appsettings.json in the Host projects to include correct connection strings: 

Projects: 

  • Vineforce.Test.AuthServer  
  • Vineforce.Test.HttpApi.Host  
  • Vineforce.Test.Web. Unified 
HTML
 
"ConnectionStrings": { "Default": "Server=servername;Database=Test_Main;Trusted_Connection=True;TrustServerCertificate=True", "Test": "Server=VINEFORCE-SHIVA;Database=Test_Module;Trusted_Connection=True;TrustServerCertificate=True" }

Make sure the server names and database details match your development environment.

4. Apply Database Update 

In the Package Manager Console (under the EntityFrameworkCore project), run:

HTML
 
Update-Database


5. Run the Application

Set Vineforce.Test.Web. Unified as the startup project and launch the application using the default credentials:

  • Username: admin 
  • Password: 1q2w3E*

6. Ensure Redis Is Running

Redis is used for distributed caching. Make sure Redis is installed and running before starting the application.

Application Startup Order

Run the following projects in order: 

HTML
 
*.AuthServer or *.IdentityServer
*.HttpApi.Host
*.Web.Unified

1. Adding a Module to the Backend of the Main Application 

HTML
 
cd C:\Users\Vineforce\source\repos\AbpAdmin

2. Add All Required Projects of the module to the Main ABP.IO Solution

To include various parts of your module (such as Domain, Application, EntityFrameworkCore, and HttpApi) in the main ABP solution, run the following commands:


HTML
 
dotnet sln add modules\vineforce.test\src\Vineforce.Test.Domain\Vineforce.Test.Domain.csproj
dotnet sln add modules\vineforce.test\src\Vineforce.Test.Application\Vineforce.Test.Application.csproj
dotnet sln add modules\vineforce.test\src\Vineforce.Test.EntityFrameworkCore\Vineforce.Test.EntityFrameworkCore.csproj
dotnet sln add modules\vineforce.test\src\Vineforce.Test.HttpApi\Vineforce.Test.HttpApi.csproj


Projects are added as below:


Add Project References Using Visual Studio 

In the Vineforce.Admin.HttpApi.Host project: Right-click the project and select “Add” → “Project Reference”. 

1. In the dialog that appears, check the following projects:

  • Vineforce.Test.Application 
  •  Vineforce.Test.EntityFrameworkCore 
  •  Vineforce.Test.HttpApi 

2. Click OK to confirm and add the references. 


3. After adding the project > reference, here you can add all module references you want.



Register Module Dependencies in AdminHttpApiHostModule.cs

HTML
 
In AdminHttpApiHostModule.cs, update the [DependsOn(...)] attribute:.

HTML
 
typeof(TestHttpApiModule),
typeof(TestApplicationModule),
typeof(TestEntityFrameworkCoreModule),
typeof(TestDomainSharedModule)


Also, add the necessary using statements:

HTML
 
using Vineforce.Test;
using Vineforce.Test.EntityFrameworkCore;

Configure the Module in the EntityFrameworkCore Project 

To ensure that schema, table mappings, and other Entity Framework configurations from the module are applied in the main ABP.IO application, follow these steps:

Add a Project Reference:

  • Right-click on the Vineforce.Admin.EntityFrameworkCore project.
  • Select Add → Project Reference.
  • Check and add: Vineforce.Test.EntityFrameworkCore


Update the DbContext Configuration

  • Open AdminDbContext.cs.
  • Inside the OnModelCreating method, add the following line to apply the module’s configuration: 
HTML
 
builder.ConfigureTest();



You can verify this by navigating to the Vineforce.Test.EntityFrameworkCore module and opening the TestDbContext class. 



Apply Migrations to Update the Database Schema

After completing the integration steps, you need to apply Entity Framework migrations to reflect the module’s schema changes in the database.

Option 1: Using PowerShell or Terminal

  • Open a PowerShell or terminal window. 
  • Navigate to the EntityFrameworkCore project directory of your main application, for example:cd src/Vineforce.Admin.EntityFrameworkCore
  • Run the following command to create a new migration:
HTML
 
dotnet ef migrations add Add_Test_Module


Option 2: Using the Package Manager Console in Visual Studio 

  • Open the Package Manager Console (Tools → NuGet Package Manager → Package Manager Console). 
  • Set the Default Project to src\Vineforce.Admin.EntityFrameworkCore. 
  • Run the following command:
HTML
 
PM> Add-Migration Add_Test_Module


This will generate a new migration that includes all Entity Framework changes from the integrated module. 


Then run the following command to apply the migration and update the database:

HTML
 
Update-Database

Steps to add the module application to the main ABP.IO application


Step 1: Build the Angular Module  

Navigate to the module’s frontend directory and build the module using the Angular CLI: 

HTML
 
ng build test --configuration production


This command compiles the test Angular module in production mode and outputs the build artifacts to the dist folder. 


Output folder:
C:\Users\Vineforce\source\repos\AbpAdmin\modules\Vineforce.Test\angular\dist 


Step 2: Copy Module Output to Main App

  • Go to your main app’s angular folder: C:\Users\Vineforce\source\repos\AbpAdmin\angular
  • Create a projects folder inside it. 
  • Copy the test folder from the dist directory into projects.
  • Final path: C:\Users\Vineforce\source\repos\AbpAdmin\angular\projects\test 



Step 3: Update App Routing 

 Open app-routing.module.ts in the main app: 

C:\Users\Vineforce\source\repos\AbpAdmin\angular\src\app\app-routing.module.ts 

In app-routing.module.ts, import the module’s routing configuration and add it to the main route definitions: 


HTML
 
{
  path: 'test',
  loadChildren: () =>
    import('test').then(m => m.TestModule.forLazy())
}


Step 4: Link the Module in package.json 

Open the package.json file having path C:\Users\Vineforce\source\repos\AbpAdmin\angular  add the following line under the “dependencies” section to link your local module:

HTML
 
"test": "file:projects/test"

Then install dependencies: 

HTML
 
npm install
You can now see the Test Module API controller in the Swagger UI of the main application.


You can now log in to the main application 


The Test module now appears in the main application. You can add, edit, or delete items according to the assigned permissions. 


Country ‘Russia’ has been added. You can view, edit, or delete it on the page


You can grant or revoke permission on the following page 


Now Edit permission has been disabled for the current user/page.


Currently, the delete option is visible, but the edit option is not showing on the pagepermission has been disabled for the current user/page.

app

Opinions expressed by DZone contributors are their own.

Related

  • SelfService HR Dashboards with Workday Extend and APIs
  • How We Reduced LCP by 75% in a Production React App
  • Shipping GenAI Into an Existing App: How to Integrate AI Features Without Rewriting Your Stack
  • Modernizing Applications with the 7 Rs Strategy – A CTO's Guide

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook