Skip to content

mabaeyens/cm-llm-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cm-llm-proxy

Local HTTPS proxy that forwards requests from the Qlik Sense AnthropicExtension to the Anthropic API.

Why is this needed?

Qlik Sense Server enforces CORS restrictions and does not allow direct calls to external APIs from the browser. This proxy runs on the Qlik server (or locally) and acts as a secure intermediary.

Qlik Sense (browser) → https://localhost:3000/api/anthropic → api.anthropic.com

Requirements

  • Node.js >= 18
  • SSL certificates for localhost:3000 (see Certificates section)

Setup

# 1. Copy and edit the environment file
cp .env.example .env
# Edit .env: set QLIK_ORIGIN to your Qlik Sense server URL

# 2. Install dependencies
npm install

Configuration

All settings are configured via .env (copied from .env.example):

Variable Description Default
QLIK_ORIGIN Qlik Sense server URL allowed by CORS https://your-qlik-server
PORT Proxy server port 3000

Certificates

The files certs/localhost3000-cert.pem and certs/localhost3000-key.pem in the repo are empty placeholders. Generate your own self-signed certificates:

openssl req -x509 -newkey rsa:4096 -keyout certs/localhost3000-key.pem \
  -out certs/localhost3000-cert.pem -days 365 -nodes \
  -subj "/CN=localhost"

The certificate must be imported as trusted in the browser and in Qlik Sense to avoid SSL errors.

Usage

npm start

The server starts at https://localhost:3000. Available endpoints:

  • GET /health — Check that the proxy is running
  • POST /api/anthropic — Forwards the request to api.anthropic.com/v1/messages

The Anthropic API key is passed per request via the x-api-key header (managed by the Qlik extension).

Related repositories

  • AnthropicExtension: Qlik Sense extension that consumes this proxy
  • RAG: RAG pipeline with ChromaDB and local embeddings

🛠️ Development Workflow: Human-AI Collaboration

This project is the result of a strategic collaboration between human design and AI-assisted code generation.

  • Architecture & Logic: Fully defined by the author. This includes system structure, business rules, data flow, and implementation strategy.
  • Code Generation: The syntactic implementation and line-by-line code writing was performed by Claude Code, following precise and iterative instructions provided by the author.
  • Supervision & Refinement: All code was manually reviewed, tested, and adjusted to ensure quality, consistency, and compliance with project standards.

This approach demonstrates the ability to direct advanced AI tools to accelerate development without sacrificing creative control or technical quality.

📄 License

This project is licensed under the MIT License. You can find the full text in the LICENSE file.

Note on authorship: Although much of the source code was generated by an AI, the creative direction, architecture, and final integration are human work. Usage rights are granted under the terms of the MIT License.

🚀 Contributing

Feel free to fork this project!

  • If you find a bug, open an issue.
  • If you have an improvement, submit a Pull Request.
  • Feel free to use this code in your own projects!

About

Local HTTPS proxy that forwards Anthropic API requests from Qlik Sense, bypassing browser CORS restrictions

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors