@moatamed-sce/feature-inspection
v0.1.5
Published
SCE Platform inspection-agency portal — auth, onboarding, company profile, and qualification applications.
Maintainers
Readme
@moatamed-sce/feature-inspection
The inspection-agency portal as a mountable feature library: auth pages, company onboarding, company profile, qualification applications, the dashboard shell and its offline fixtures.
Extracted from apps/inspection-agencies, which is now only a bootstrap shell.
Entry points
| Specifier | Contents |
| ----------------------------------------- | ---------------------------------------------------------- |
| @moatamed-sce/feature-inspection | provideInspection(), models, services, constants, guards |
| @moatamed-sce/feature-inspection/routes | inspectionRoutes and each sub-tree, route-only |
| @moatamed-sce/feature-inspection/mocks | provideInspectionMocks() and friends — offline fixtures |
Prefer /routes and /mocks over the barrel at call sites that only need those: mounting the
portal should not evaluate the whole domain.
Mounting it in an app
import { provideInspection } from '@moatamed-sce/feature-inspection';
import { inspectionRoutes } from '@moatamed-sce/feature-inspection/routes';
export const appConfig: ApplicationConfig = {
providers: [
provideRouter(inspectionRoutes),
provideSceCore({ environment, translateLoader }),
provideSceUi(),
...provideInspection(),
],
};provideInspection() needs no arguments — every option (login path, post-login return URL,
callback branding) falls back to the portal's own defaults. Override any of them:
...provideInspection({
defaultReturnUrl: '/dashboard/home',
branding: { logoSrc: '/logo_dark.png', logoAlt: 'معتمد' },
}),What a host app must still provide
These are deliberately not bundled, because each app owns them:
Assets. Add the library's icons and images to the app's
build.options.assets:{ "glob": "**/*", "input": "libs/feature-inspection/src/lib/assets/icons", "output": "/assets/icons" }, { "glob": "**/*", "input": "libs/feature-inspection/src/lib/assets/images", "output": "/assets/images" }Translations. The
INSPECTION.*/COMPANY_ONBOARDING.*copy lives atsrc/lib/assets/i18n/inspection.{ar,en}.json.tools/inspection-merge-i18n.mjsoverlays it on the marketplace dictionary and writes the merged files into the host app:node tools/inspection-merge-i18n.mjs --out=apps/<your-app>/public/assets/i18nWire it as a
merge-i18ntarget thatbuilddepends on (seeapps/inspection-agencies/project.json).HTTP interceptor.
inspectionSessionIdInterceptormust be appended toSCE_HTTP_INTERCEPTORS— do not replace the chain, or mock mode and the auth/base-URL interceptors are lost.Offline fixtures, only while
AppEnvironment.mockModeis on:...provideInspectionMocks(), ...provideInspectionPlatformMocks(), provideMockInspectionSession({ autoLogin: MOCK_AUTO_LOGIN }),
Layout
src/lib/
core/ constants · models · services · interceptors · SEO · utils
auth/ login, forgot/reset password, OTP, Nafath pages + guard
dashboard/ shell container, nav config, dashboard + settings routes
features/ home · profile · register · company-onboarding
company-profile · qualification-applications
assets/ icons · images · i18n overlayBoundaries
Everything outside this library is reached through a package specifier
(@moatamed-sce/core, @moatamed-sce/ui-components, @moatamed-sce/features/*) — never a
@libs/* deep path. ng-packagr treats peer dependencies as external; a deep path instead compiles
the other library's source into this package and fails with TS6059.
