A modern, secure Angular web application for managing people data. This project serves as the frontend interface for the People API backend service.
This is the frontend component of a full-stack people management system:
- Frontend: Angular 21 single-page application (this repository)
- Backend: Spring Boot REST API (people-api)
- Angular 21.0 - Modern web framework with standalone components
- TypeScript 5.9 - Strongly typed JavaScript
- Angular Material 21.0 - Material Design UI components
- RxJS 7.8 - Reactive programming library
- Angular CLI 21.0 - Command-line interface for Angular
- Vite 7.2 - Fast build tool and dev server
- Vitest 4.0 - Unit testing framework
- Node.js 24.12 - JavaScript runtime
- Express 5.2 - Node.js web server
- Winston 3.19 - Structured logging
- http-proxy-middleware 3.0 - API proxy for backend communication
- Docker - Containerization
- Kubernetes - Container orchestration
- GitHub Actions - CI/CD pipeline
- Docker Scout - Vulnerability scanning
- Cosign - Container image signing
people-frontend/
├── src/
│ ├── app/
│ │ ├── models/ # Data models
│ │ ├── pages/ # Page components
│ │ │ ├── people-form/ # Create/Edit person
│ │ │ └── people-list/ # List people
│ │ ├── services/ # API services
│ │ ├── app.config.ts # Application configuration
│ │ ├── app.routes.ts # Route definitions
│ │ └── app.ts # Root component
│ ├── custom-theme.scss # Material Design theme
│ ├── main.ts # Application entry point
│ └── styles.css # Global styles
├── .k8s/
│ └── frontend/
│ ├── deployment.yaml # Kubernetes deployment
│ └── service.yaml # Kubernetes service
├── .github/
│ └── workflows/
│ └── ci.yaml # CI/CD pipeline
├── server.js # Production Express server
├── Dockerfile # Multi-stage Docker build
├── compose.yaml # Docker Compose configuration
└── package.json # Dependencies and scripts
- Node.js 24.12 or higher
- npm 11.6.2 or higher
- Angular CLI 21.0 or higher (optional)
- Docker 20.10 or higher
- Kubernetes 1.25 or higher (for orchestration)
- kubectl configured for your cluster
- The People API backend service must be running and accessible
-
Clone the repository:
git clone https://github.com/mcqueide/people-frontend.git cd people-frontend -
Install dependencies:
npm install
-
Configure environment:
- Copy
.env.exampleto.env - Set
API_URLto your backend API endpoint
- Copy
-
Start the development server:
npm start
Navigate to
http://localhost:4200/
Build the application for production:
npm run buildThe build artifacts will be stored in the dist/ directory.
Run the production Express server:
npm run start:prodThe server will start on port 3000 and serve the built application with API proxying.
Run unit tests with Vitest:
npm test-
Build and run:
docker compose up -d
-
Access the application:
- The app runs on port 3000 (internal)
- Configure your reverse proxy to route traffic
docker build -t mcqueide/people-frontend:latest .- Base stage: Node.js 24.12 Alpine with updated npm
- Deps stage: Production dependencies installation
- Build stage: Application compilation with dev dependencies
- Final stage: Minimal runtime with only necessary files
- Security: Runs as non-root user, minimal attack surface
- Size: ~66 MB optimized image
- Kubernetes cluster configured
- kubectl access
- Backend API deployed and accessible
-
Configure environment variables:
cd .k8s/frontend cp env.yaml.example env.yaml # Edit env.yaml and update API_URL and other variables as needed
-
Apply Kubernetes manifests:
kubectl apply -f .k8s/frontend/
Deployment (.k8s/frontend/deployment.yaml):
- 3 replicas for high availability
- Resource limits: 256Mi memory, 0.5 CPU
- Resource requests: 128Mi memory, 0.25 CPU
- Security hardening:
- Runs as non-root (UID 1000)
- No privilege escalation
- All capabilities dropped
- seccomp profile applied
Service (.k8s/frontend/service.yaml):
- Type: ClusterIP
- Port: 3000
- Internal cluster communication
Scale the deployment:
kubectl scale deployment people-frontend --replicas=5Check deployment status:
kubectl get pods -l app=people-frontend
kubectl logs -l app=people-frontend --tail=100The GitHub Actions workflow (.github/workflows/ci.yaml) implements comprehensive security measures:
- Docker Scout CVE Analysis: Scans for critical and high severity vulnerabilities
- Only Fixed CVEs: Fails build if fixable vulnerabilities exist
- SARIF Upload: Sends security results to GitHub Security tab
- Pull Request Summaries: Automatic security reports on PRs
- Cosign v2.2.4: Signs published images using keyless signing
- OIDC Authentication: Uses GitHub's OIDC provider for verification
- Provenance: Full build provenance metadata included
- SBOM: Software Bill of Materials generated and attached
- Provenance mode=max: Maximum build attestation detail
- Layer caching: GitHub Actions cache for faster, reproducible builds
- Multi-arch support: Buildx configuration ready
Verify a signed image:
# Install cosign
curl -O -L "https://github.com/sigstore/cosign/releases/download/v2.2.4/cosign-linux-amd64"
sudo mv cosign-linux-amd64 /usr/local/bin/cosign
sudo chmod +x /usr/local/bin/cosign
# Verify image signature
cosign verify mcqueide/people-frontend:v1.0.0 \
--certificate-identity-regexp="https://github.com/mcqueide/people-frontend" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com"Container Security:
- Non-root user execution (UID 1000)
- Read-only root filesystem compatible
- No privilege escalation allowed
- All Linux capabilities dropped
- Seccomp profile applied
Docker Compose Security:
no-new-privileges:truesecurity option- All capabilities dropped
- Resource limits enforced
- Internal network isolation
The CI/CD pipeline automatically:
-
On Pull Requests:
- Builds the Docker image
- Scans for critical/high CVEs (fails if found)
- Posts security summary to PR
-
On Push to Main:
- Performs all PR checks
- Uploads SARIF report to GitHub Security
- Builds and pushes signed images
- Tags images with commit SHA and version
-
On Version Tags (v..):*
- Creates semantic version release
- Publishes versioned Docker images
- Signs images with Cosign
- Generates SBOM and provenance
Published images use multiple tags:
v1.0.0- Semantic versionabc1234- Git commit SHAlatest- Latest main branch
This frontend communicates with the People API backend through:
- Development: Angular proxy configuration (
proxy.conf.json) - Production: Express server proxy (
server.js) - Kubernetes: Service-to-service communication via ClusterIP
Configure the backend URL via the API_URL environment variable.
- Angular CLI Reference
- Angular Material Components
- Docker Documentation
- Kubernetes Documentation
- Cosign Documentation
- Backend API Repository
This project is part of a demonstration application showcasing modern cloud-native development practices.