React frontend for the AI shopping agent powered by Visa Intelligent Commerce
- 🤖 AI Shopping Chat - Conversational interface for product search and recommendations
- 💳 Card Management - Add and manage payment cards
- 🔐 Passkey Authentication - Secure WebAuthn passkey setup and authentication
- 🛒 Agentic Checkout - AI-driven checkout with intent authorization
- 🎨 Visa Nova Design System - Built with Visa's official design components
- 🔒 HTTPS Support - Secure local development with SSL certificates
- Docker (recommended for running the application)
- mkcert (for generating HTTPS certificates)
- Node.js 22+ and npm (only required for local development without Docker)
- Reference Agent Backend running on port 8000. See reference-agent-backend for setup instructions.
The frontend requires HTTPS for passkey authentication. You need to generate SSL certificates using mkcert before running the application (both with Docker and locally).
- macOS:
brew install mkcert - Windows:
choco install mkcert - See mkcert repository for other installation methods
Add the root CA (one-time operation):
mkcert -installFrom the reference-agent-frontend directory:
mkcert localhost 127.0.0.1 ::1This creates:
localhost+2.pem(certificate)localhost+2-key.pem(private key)
The application requires a .env file. Copy .env.sample to .env and fill in the values:
# Visa Payment Passkey (VPP) Configuration
VITE_VPP_API_KEY=your-vpp-api-key
VITE_VPP_CLIENT_APP_ID=your-vpp-client-app-id
# Sent as X-Api-Key on every call to the agent backend; must match AGENT_API_KEY
# there. (Under Docker Compose this comes from the project-root .env.)
VITE_AGENT_API_KEY=your-agent-api-keyImportant: Before running the application, you must complete the SSL Certificate Setup and configure your .env file with the required credentials.
# Set up environment configuration
cp .env.sample .env
# Fill in all values in .env
# Build the image
docker build -t reference-agent-frontend .
# Run the container
docker run -p 3000:3000 reference-agent-frontend# Set up environment configuration
cp .env.sample .env
# Fill in all values in .env
# Install dependencies
npm install
# Start the development server
npm startThe application will be available at https://localhost:3000.
reference-agent-frontend/
├── public/ # Static assets
├── src/
│ ├── app/ # Main application components
│ ├── assets/ # Images and static resources
│ ├── config/ # Configuration files
│ ├── constants/ # Application constants
│ ├── features/ # Feature-based modules
│ ├── lib/ # Third-party library integrations
│ ├── middleware/ # Redux middleware
│ ├── store/ # Redux store configuration
│ ├── types/ # TypeScript type definitions
│ └── utils/ # Utility functions
├── index.html # HTML entry point
├── vite.config.ts # Vite configuration
├── tsconfig.json # TypeScript configuration
├── package.json # Dependencies and scripts
├── Dockerfile # Docker configuration
└── README.md # This file
Runs the app in development mode with HTTPS enabled.
Open https://localhost:3000 to view it in the browser.
The page will reload if you make edits.
Builds the app for production to the dist/ folder.
- UI Framework: React 19.0.0
- Language: TypeScript 4.9.5
- Build Tool: Vite 6.0.7
- State Management: Redux Toolkit 2.8.2
- Routing: React Router 6.28.0
- Design System: @visa/nova-react 2.5.4
- Encryption: jose 6.0.12 (JWT/JWE)
Solution:
- Ensure mkcert CA is installed:
mkcert -install - Restart your browser completely
- Clear browser SSL cache
- Regenerate certificates:
mkcert localhost 127.0.0.1 ::1
Solution:
- Ensure reference-agent-backend is running at
http://localhost:8000 - Check backend CORS settings allow
https://localhost:3000 - Verify backend
.envhas all required credentials
Solution:
- Ensure Node.js version is 22 or higher:
node --version - Clear npm cache:
npm cache clean --force - Delete
node_modules/andpackage-lock.json, then runnpm installagain
Solution:
- Stop other applications using port 3000
- Or change the port in
package.jsonscripts (also update backend CORS)
For issues and questions, please open an issue in the repository.