All checks were successful
Build and Publish / build-release (push) Successful in 2m11s
Policy UI
Nuxt.js application for managing insurance policies, quotes, and customer relationships.
Overview
Policy UI is a modern web application built with:
- Nuxt 4 - Vue 3 framework with server-side rendering
- @nuxt/ui - Component library for consistent UI
- Tailwind CSS - Utility-first CSS framework
- TypeScript - Type-safe development
Features
- Policy management and tracking
- Quote comparison and selection
- Customer relationship management
- Workload task management (back-office)
- Document handling and generation
- Responsive design
Development
Prerequisites
- Nix (recommended) or Node.js 20+ and pnpm 10+
Using Nix (Recommended)
The project uses Nix for reproducible development and builds.
# Enter the development shell
nix develop
# Install dependencies (first time only)
pnpm install
# Start development server
pnpm dev
The application will be available at http://localhost:3000.
Using Node.js/pnpm
If you don't have Nix installed:
# Install dependencies
pnpm install
# Start development server
pnpm dev
Building
With Nix
# Build the application
nix build .#policy-ui
# The built application will be in the Nix store
With pnpm
# Build the application
pnpm build
# Preview production build
pnpm preview
Infrastructure
Nix Flake
The project uses a Nix flake for reproducible builds and Docker image creation:
packages.policy-ui- Builds the Nuxt applicationpackages.dockerImage- Creates a Docker image with Node.js and the built appdevShells.default- Provides Node.js, pnpm, and Helm in the development shell
Docker Image
The Docker image is built using Nix and includes:
- Node.js runtime
- Built Nuxt application (
.outputandnode_modules) - Configured to run on port 3000
Helm Chart
A Helm chart is provided for Kubernetes deployment at ops/chart/:
# Install dependencies
helm repo add bjw-s https://bjw-s-labs.github.io/helm-charts
helm dependency build ops/chart
# Install the chart
helm install policy-ui ops/chart --namespace <namespace>
The chart includes:
- Deployment with 1 replica (configurable)
- ClusterIP service on port 3000
- Health checks (liveness/readiness)
- Environment variables for API endpoints
- Ingress support (disabled by default)
CI/CD
The .gitea/workflows/build-and-publish.yaml workflow:
- Triggers on push to
mainbranch - Builds Docker image using Nix
- Pushes to Gitea Container Registry
- Packages and pushes Helm chart to Gitea Helm registry
Configuration
Environment Variables
The application uses the following environment variables:
| Variable | Description | Default |
|---|---|---|
NUXT_PUBLIC_CUSTOMER_API_BASE |
Customer API base URL | https://dev.api.corredorconect.com/customer/api/v1 |
NUXT_PUBLIC_POLICY_API_BASE |
Policy API base URL | https://dev.api.corredorconect.com/policy/api/v1 |
NUXT_PUBLIC_PROVIDERS_API_BASE |
Providers API base URL | https://dev.api.corredorconect.com/provider/api/v1 |
NUXT_PUBLIC_WORKLOAD_API_BASE |
Workload API base URL | https://dev.api.corredorconect.com/workload/api/v1 |
NUXT_PUBLIC_DOCUMENT_API_BASE |
Document API base URL | https://dev.api.corredorconect.com/document/api |
NUXT_PUBLIC_POLICY_API_TOKEN |
Policy API authentication token | Required |
API Endpoints
The application connects to the following backend services:
- Customer API - Customer and policy data
- Policy API - Policy management and quotes
- Providers API - Insurance provider information
- Workload API - Back-office task management
- Document API - Document storage and retrieval
Deployment
Kubernetes
- Create the required secret:
kubectl create secret generic policy-ui-secrets \
--from-literal=policyApiToken='your-token-here' \
--namespace=<namespace>
- Install the Helm chart:
helm install policy-ui ops/chart --namespace <namespace>
- For production, override values:
helm install policy-ui ops/chart --namespace <namespace> \
--set controllers.main.containers.main.image.tag=<version> \
--set ingress.main.enabled=true \
--set ingress.main.hosts[0].host=policy-ui.example.com
Docker
# Build the image with Nix
nix build .#dockerImage
# Load the image
docker load < result
# Run the container
docker run -p 3000:3000 \
-e NUXT_PUBLIC_POLICY_API_TOKEN=your-token \
gitea.corredorconect.com/software-engineering/policy-ui:latest
Project Structure
policy-ui/
├── app/ # Nuxt app directory
│ ├── components/ # Vue components
│ ├── pages/ # File-based routing
│ └── assets/ # Static assets
├── ops/ # Infrastructure
│ └── chart/ # Helm chart
├── .gitea/ # CI/CD workflows
│ └── workflows/
├── flake.nix # Nix flake configuration
└── package.json # Node.js dependencies
License
[Your License Here]
Description
Languages
Vue
94.3%
TypeScript
3%
CSS
2.4%
Nix
0.2%