In this section, we will proceed to build the auth module.
Before going further, we need to set up a few things as follows:
auth folder.auth folder, create constants, data-model, functions, helpers, and ports.constants folder, we will need to create files such as roles.ts, teams.ts, and index.ts.Now open roles.ts and add the following code.
export const ROLES = {
EMPLOYEE: {
NAME: "employee",
SCORE: 1,
},
ADMIN: {
NAME: "admin",
SCORE: 99,
},
};
Open teams.ts and add the following code.
export const TEAMS = {
MARKETING: {
NAME: "marketing",
},
SALES: {
NAME: "sales",
},
};

And add the following code to index.ts.
export * from "./roles";
export * from "./teams";
After adding this code, we can also see that the import errors for ROLES and TEAMS in modules/pcustomer-management/ports have been resolved.

OK, the pre-setup step is done; now we will proceed to build this module step by step just like the potential customer management module.