obsidian/wiki/client-knowledge/barclays.md
2026-04-27 18:22:09 +01:00

3.9 KiB

title description tags created updated
Client Knowledge: Barclays Barclays-specific context: projects, tech constraints, deployment quirks, and lessons learned
client-knowledge
barclays
2026-04-27 2026-04-27

Client Knowledge: Barclays

Key Takeaways

  • Two active projects: Mod Comms (GCP, multi-agent AI) and Banner Builder (optical-dev, React+FastAPI)
  • Barclays requires strict brand compliance — logo versions matter, Barclays design tokens used in UI
  • GCP deployment = no WebSockets — REST polling is mandatory for Mod Comms
  • Banner Builder uses Zustand for workflow state management (journey store pattern)

Projects

Project Server Stack Status Purpose
01 Projects/modcomms/Mod Comms GCP FastAPI + React + Gemini + PostgreSQL active AI proof review — compliance/brand/tone/channel checks
01 Projects/Barclays-banner-builder/Barclays Banner Builder optical-dev FastAPI + React + PostgreSQL + Docker active AI banner generation tool — Brief → Variants → Edit → Export

Mod Comms — Key Facts

What it does: Upload proof (image/PDF) → 4 AI agents analyze in parallel → lead agent synthesizes verdict

4 agents: Legal compliance, Brand adherence, Tone of Voice, Channel suitability

AI: Google Gemini Pro (primary) + Flash (fallback) — chosen for GCP co-location

Critical incident (2026-03-18): WebSocket connections dropped at 30s on GCP LB → switched to REST polling. See wiki/architecture/gcp-deployment-lb-timeout.

Auth: Azure AD (MSAL) — uses DISABLE_AUTH=true locally

Dev start:

# Backend
cd backend && uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

# Frontend
cd frontend && npm install && npm run dev

# DB migrations
cd backend && alembic upgrade head

Env vars (backend):

GEMINI_API_KEY=
DATABASE_URL=postgresql+asyncpg://user:pass@localhost:5432/modcomms
AZURE_TENANT_ID=
AZURE_CLIENT_ID=
DISABLE_AUTH=true

Banner Builder — Key Facts

What it does: AI-assisted banner creation. Workflow: Brief → Edit Variants → Banner Editor → Export CSV/PDF

Workflow state: Managed with Zustand journey store — backward navigation allowed, forward steps grayed out until completed. See wiki/concepts/export-endpoint-filter-pattern.

Export quirk: PDF/CSV exports must receive variant_ids from frontend — backend cannot infer selection. Always pass explicitly.

Deploy: optical-dev at /barclays-banner-builder/ subpath. Deploy via bash deploy.sh on server.

Apache config: Barclays Include fragment at /opt/barclays-banner-builder/deploy/apache-barclays.conf. Port: 8010.

Critical incident (2026-04-17): Apache Include directive ordering — Banner Builder's conf was loading after hp-prod-tracker's catch-all ProxyPass / http://..., which intercepted all requests. Fixed by reordering Include lines in vhost config.

Stack:

  • Frontend: React + TypeScript + Vite + Zustand
  • Backend: FastAPI + Python + Alembic + PostgreSQL
  • Auth: Azure AD (MSAL)
  • Deploy: Docker Compose + Apache subpath

Brand Requirements

  • Logo versions matter — track which version is active (v4, v5, v6)
  • Barclays design tokens used in UI (Zustand journey stepper used Barclays color tokens)
  • Export outputs go to OMG media booking system — format must be exact