HaimKortovich 6424dc4e85
All checks were successful
Build and Publish / build-release (push) Successful in 2m11s
minimize cookie and simplify roles
2026-05-15 13:06:16 -05:00
2026-04-29 16:42:50 -05:00
2026-05-15 13:06:16 -05:00
2026-04-16 11:11:44 -05:00
2026-05-14 16:06:09 -05:00
2026-04-29 16:25:11 -05:00
2026-05-15 13:06:16 -05:00
WIP
2026-03-05 11:36:23 -05:00
WIP
2026-03-05 11:36:23 -05:00
2026-04-16 11:11:44 -05:00
2026-04-29 16:25:11 -05:00
2026-04-29 16:25:11 -05:00
2026-05-15 13:06:16 -05:00
2026-05-14 16:29:20 -05:00
2026-05-14 12:12:03 -05:00
2026-04-29 16:35:39 -05:00
WIP
2026-03-05 11:36:23 -05:00

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+

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 application
  • packages.dockerImage - Creates a Docker image with Node.js and the built app
  • devShells.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 (.output and node_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 main branch
  • 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

  1. Create the required secret:
kubectl create secret generic policy-ui-secrets \
  --from-literal=policyApiToken='your-token-here' \
  --namespace=<namespace>
  1. Install the Helm chart:
helm install policy-ui ops/chart --namespace <namespace>
  1. 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
No description provided
Readme 1.7 MiB
Languages
Vue 94.3%
TypeScript 3%
CSS 2.4%
Nix 0.2%