AML/CLAUDE.md

4.4 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Repository Overview

This is a monorepo containing two main applications:

  • AML_Backend: ASP.NET Core backend using ABP (ASP.NET Boilerplate) framework
  • AML_Frontend: Angular 11 frontend using ABP Angular framework

Build Commands

Frontend (AML_Frontend)

cd AML_Frontend
npm install --legacy-peer-deps      # Install dependencies
npm start                           # Start dev server with --open
npm run build:dev                    # Build for development
npm run build:prod                  # Build for production
npm run build:prod2                 # Build for production2 (alternative env)
npm test                            # Run unit tests
npm run lint                        # Run linter
npm run e2e                         # Run e2e tests

Backend (AML_Backend)

# Build with dotnet CLI
dotnet build iCON.Abp.AMLSolution.sln

# Run migrations (Visual Studio Package Manager Console)
# 1. Set EntityFrameworkCore.DbMigrations as startup project
# 2. Set default project to: src\EntityFrameworkCore.DbMigrations
# 3. Run: Add-Migration <MigrationName>

Architecture

Backend Architecture (ABP Framework)

Solution Structure: AML_Backend/iCON.Abp.AMLSolution.sln

Core Modules:

  • modules/iCON.Abp.AML/ - Main AML (Anti-Money Laundering) module with:
    • Application.Contracts - Service interfaces and DTOs
    • Application - Service implementations
    • Domain - Entities, domain logic
    • Domain.Shared - Shared enums, constants
    • EntityFrameworkCore - Repositories, DbContext
    • HttpApi - API controllers

Key Services in iCON.Abp.AML:

  • DetectionService - AML detection logic
  • CRCheckerService - Compliance checking
  • ConsumerPortalService - Consumer-facing portal operations
  • CorporationService / IndividualService - Entity management
  • DataCollectService - Data collection pipeline
  • STRService - Suspicious Transaction Reporting
  • ReportService - Report generation

Host Projects:

  • src/iCON.Abp.FX.HttpApi.Host - Main API host (Program.cs entry point)
  • src/iCON.Abp.FX.Web.Public - Public web portal
  • src/iCON.Abp.FX.DbMigrator - Database migration runner

Infrastructure Projects:

  • infrastructure/iCON.Core.Infrastructure.* - Shared infrastructure utilities

Frontend Architecture (Angular 11 + ABP)

Main Application (AML_Frontend/src/app/):

  • app.module.ts - Root module with ABP configuration
  • Feature modules under modules/:
    • aml-query/, agent/, configuration/, document/, form/, home/, investigate-setting/, llm/, log/, operator/, plan/, realtime-screening/, report/, risk-report/, screen-report/, stats/, str/, tenant-info/, transaction-report/, white-list/

Shared Components (src/app/shared/):

  • shared.module.ts - Shared module exports

Viewer Components (src/app/components/components-viewer/):

  • viewer-account-select/, viewer-account-form/, viewer-confirm-status/, viewer-customer-info/, viewer-print-list/, viewer-scan-modal/, viewer-upload-modal/

External Module Dependencies:

  • @volo/abp.ng.* - ABP Angular modules (account, identity, saas, audit-logging, language-management, etc.)
  • @abp/ng.* - ABP Angular core modules
  • ng-zorro-antd - UI component library
  • primeng - PrimeNG components
  • @ngxs/store - State management
  • ngx-echarts - Charting
  • @syncfusion/ej2-angular-* - Syncfusion components

Build Configuration:

  • Angular 11 with angular.json defining build targets
  • Multiple environment configurations (environment.ts, environment.dev.ts, environment.prod.ts, environment.prod2.ts)
  • Uses SCSS for styling, HashLocationStrategy for routing

Database Migrations

Migrations use Entity Framework Core. To create a migration:

  1. Set EntityFrameworkCore.DbMigrations as the startup project in Visual Studio
  2. Open Package Manager Console, set default project to src\EntityFrameworkCore.DbMigrations
  3. Run Add-Migration <MigrationName>
  4. Migrations apply automatically on next run

Notes

  • The backend uses ABP's modular architecture - each module (AML, AMLPortal, Basic, MediaStore) follows the same layer pattern
  • Frontend proxies API calls through the Angular dev server configuration
  • Both frontend and backend share the same solution but are in separate directories