Deploying a Quant-UX App
Introduction
Quant-UX is an open-source UX testing and prototyping platform that collects user interaction analytics. Deploying Quant-UX with a Dockerfile on Klutch.sh gives you reproducible builds, managed secrets, and persistent storage—all configured from klutch.sh/app. This guide covers installation, Dockerfile setup, environment variables, storage, Nixpacks overrides, and sample requests to verify your instance.
Prerequisites
- A Klutch.sh account (sign up)
- A GitHub repository containing your Quant-UX Dockerfile (GitHub is the only supported git source)
- External MongoDB (Quant-UX stores projects and analytics in MongoDB)
- Domain and TLS for secure access
For onboarding, see the Quick Start.
Architecture and ports
- Quant-UX serves HTTP on internal port
8000. Choose HTTP traffic in Klutch.sh and set the internal port to8000. - Persistent storage is recommended for uploads and cache; primary data is in MongoDB.
Repository layout
quant-ux/├── Dockerfile # Must be at repo root for auto-detection└── README.mdKeep secrets out of Git; store them in Klutch.sh environment variables.
Installation (local) and starter commands
Build and run locally (ensure MongoDB is reachable):
docker build -t quantux-local .docker run -p 8000:8000 \ -e MONGO_URL=mongodb://user:pass@localhost:27017/quantux \ -e MONGO_DB=quantux \ quantux-localDockerfile for Quant-UX (production-ready)
Place this at the repo root; Klutch.sh auto-detects Dockerfiles.
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./RUN npm ci
COPY . .
ENV PORT=8000EXPOSE 8000
CMD ["npm", "run", "start"]Notes:
- Pin Node to the version Quant-UX supports; adjust if upstream changes.
- Keep the Dockerfile at the repo root; Docker selection is automatic in Klutch.sh.
Environment variables (Klutch.sh)
Set these before deploying:
PORT=8000MONGO_URL=mongodb://<user>:<password>@<host>:27017/<db>MONGO_DB=quantux- Optional:
APP_BASE_URL=https://example-app.klutch.sh, SMTP settings if you enable email
If deploying without the Dockerfile and relying on Nixpacks:
NIXPACKS_NODE_VERSION=18NIXPACKS_START_CMD=npm run start
Attach persistent volumes
If you store local assets, add storage in Klutch.sh (path and size only):
/app/uploads— user/project uploads.
Ensure the path matches your Quant-UX configuration.
Deploy Quant-UX on Klutch.sh (Dockerfile workflow)
- Push your repository—with the Dockerfile at the root—to GitHub.
- Open klutch.sh/app, create a project, and add an app.
- Select HTTP traffic and set the internal port to
8000. - Add the environment variables above (MongoDB URL and database, plus optional base URL/SMTP).
- Attach a volume at
/app/uploadsif you need local asset persistence, sized for your media. - Deploy. Access your app at
https://example-app.klutch.sh; add a custom domain if desired.
Sample checks
Landing page:
curl -I https://example-app.klutch.shIf Quant-UX exposes a health or API endpoint (replace if different):
curl -I https://example-app.klutch.sh/api/healthHealth checks and production tips
- Add an HTTP readiness probe to
/or your health endpoint. - Keep MongoDB credentials in Klutch.sh secrets; rotate them regularly.
- Use external MongoDB for durability; back it up on a schedule.
- Pin Docker base versions and test upgrades in staging before production.
- Monitor storage usage on
/app/uploadsif enabled; resize volumes proactively.
Quant-UX on Klutch.sh delivers reproducible Docker builds, managed secrets, and optional storage—without extra YAML or CI steps. Configure ports, env vars, and storage, then launch your UX testing platform.