An Angular web application for managing fraud alerts in financial systems. This frontend provides a comprehensive interface for viewing, filtering, and managing fraud alerts through an intuitive dashboard and detailed alert management interface.
- Dashboard with Pipeline Overview: Visual representation of the fraud alert pipeline with key metrics
- Alert Management: List, filter, search, and bulk operations on fraud alerts
- Alert Details: Comprehensive view of individual alerts with customer, transaction, and risk information
- Responsive Design: Mobile-friendly interface built with Angular Material
- Real-time Updates: Integration with fraud alert management API
- Node.js (version 22 or higher)
- npm (comes with Node.js)
- Docker (optional, for containerized deployment)
- Clone the repository:
git clone <repository-url>
cd fraud-alert-management-front- Install dependencies:
npm install- Configure environment variables (optional):
Create a .env file in the root directory (copy from .env.example):
cp .env.example .envEdit .env with your values:
API_URL=https://your-api-url.com
API_KEY=your-api-key- Start the development server:
npm startThe application will be available at http://localhost:4200.
npm start: Start development servernpm run build: Build for productionnpm run build:dev: Build for developmentnpm test: Run unit tests
docker build -t fraud-alert-management-front:latest .docker run -d \
-p 8080:80 \
-e API_URL=https://your-api-url.com \
-e API_KEY=your-api-key \
--name fraud-alert-app \
fraud-alert-management-front:latestCreate a .env file (copy from .env.example):
cp .env.example .envEdit .env with your values:
API_URL=https://your-api-url.com
API_KEY=your-api-keyRun with the .env file:
docker run -d \
-p 8080:80 \
--env-file .env \
--name fraud-alert-app \
fraud-alert-management-front:latestCreate a docker-compose.yml:
version: '3.8'
services:
fraud-alert-app:
build: .
ports:
- "8080:80"
env_file:
- .env
restart: unless-stoppedRun with Docker Compose:
docker-compose up -dOpen your browser and navigate to:
http://localhost:8080
docker logs fraud-alert-appdocker stop fraud-alert-appdocker start fraud-alert-appdocker rm -f fraud-alert-appdocker exec fraud-alert-app cat /usr/share/nginx/html/assets/env.jsThe application supports runtime configuration through environment variables:
API_URL: Backend API endpoint URL (default:http://localhost:8080/v1)API_KEY: API subscription key for authentication
- Build Stage: The Dockerfile uses Node.js to build the Angular app
- Runtime Stage: The built app is served by Nginx
- Environment Injection: The
docker-entrypoint.shscript creates/assets/env.jswith the environment variables at container startup - Angular Usage: The app reads
window.env.API_URLandwindow.env.API_KEYfrom the injected script
The application integrates with the Fraud Alert Management API and supports all operations defined in the OpenAPI specification.
API Source Code: fraud-alert-management-api
- GET /alerts: List and filter alerts
- GET /alerts/{id}: Get alert details
- PATCH /alerts/{id}: Update alert status and notes
- PATCH /alerts/bulk: Bulk update alerts
- GET /alerts/stats: Get alert statistics
- GET /customers/{id}/alerts: Get customer alert history
- POST /alerts/{id}/notes: Add notes to alerts
src/
├── app/
│ ├── components/
│ │ ├── dashboard/ # Main dashboard component
│ │ ├── alert-list/ # Alert listing and filtering
│ │ └── alert-detail/ # Individual alert details
│ ├── models/ # TypeScript models
│ ├── services/ # API services
│ └── environments/ # Environment configurations
├── assets/ # Static assets
└── styles.scss # Global styles
- Displays fraud pipeline overview cards
- Shows transaction summary table
- Displays alert statistics
- Responsive design matching the provided design
- Paginated list of alerts
- Advanced filtering options (status, severity, customer, assignee)
- Bulk operations for alert management
- Sortable columns
- Comprehensive alert information
- Customer and transaction details
- Risk factors and decision information
- Notes management
- Edit functionality
The project includes a GitHub Actions workflow that automatically builds and pushes Docker images to GitHub Container Registry (ghcr.io) on every push to the main branch.
- Builds the Docker image on push to
mainbranch or when a version tag is created - Pushes the image to GitHub Container Registry (ghcr.io)
- Creates multiple tags:
latestfor main branchv1.0.0,v1.0,v1for version tagsmain-<sha>for specific commits
- Supports multi-platform builds (amd64, arm64)
- Caches layers for faster builds
Pull and run the latest image from GitHub Container Registry:
# Pull the image
docker pull ghcr.io/dsanchor/fraud-alert-management-front:latest
# Run the container
docker run -d \
-p 8080:80 \
-e API_URL=https://your-api-url.com \
-e API_KEY=your-api-key \
--name fraud-alert-app \
ghcr.io/dsanchor/fraud-alert-management-front:latestOr use a specific version:
docker pull ghcr.io/dsanchor/fraud-alert-management-front:v1.0.0To trigger a versioned build:
# Create and push a tag
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0This will create images with tags: v1.0.0, v1.0, v1, and latest
# Login to GitHub Container Registry
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
# Tag and push
docker tag fraud-alert-management-front:latest ghcr.io/dsanchor/fraud-alert-management-front:latest
docker push ghcr.io/dsanchor/fraud-alert-management-front:latestdocker tag fraud-alert-management-front:latest yourusername/fraud-alert-management-front:latest
docker push yourusername/fraud-alert-management-front:latest# Login to ACR
az acr login --name yourregistry
# Tag and push
docker tag fraud-alert-management-front:latest yourregistry.azurecr.io/fraud-alert-management-front:latest
docker push yourregistry.azurecr.io/fraud-alert-management-front:latestdocker exec fraud-alert-app cat /usr/share/nginx/html/assets/env.jsdocker logs fraud-alert-appdocker exec -it fraud-alert-app shdocker build --no-cache -t fraud-alert-management-front:latest .- Never commit
.envfile to git (it's in.gitignore) - Keep your API keys secure
- Use Docker secrets or Azure Key Vault in production
- The entrypoint script only shows first 10 characters of API_KEY in logs
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.