Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/yocxy2/2a/llms.txt

Use this file to discover all available pages before exploring further.

The AI Ticket Support System backend is configured entirely through environment variables. Copy the .env.example file in the backend/ directory to .env and fill in the required values before starting the server. All variables are loaded at runtime via dotenv, so no rebuild is needed when changing configuration.

.env.example

The repository ships with a ready-to-use template covering every supported variable:
PORT=3001
NODE_ENV=development
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/ticket_system
OPENAI_API_KEY=your_openai_api_key_here
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
Never commit your .env file to version control. It contains secrets such as your OpenAI API key and database credentials. Add .env to .gitignore and distribute credentials through a secrets manager or your deployment platform’s environment variable UI.

Variable reference

PORT
number
default:"3001"
TCP port the Express server listens on. Change this if port 3001 is already in use on your host, and remember to update any reverse-proxy or firewall rules accordingly.
NODE_ENV
string
default:"development"
Node.js environment mode. Set to production for production deployments — this disables verbose Prisma query logging and enables any production-specific optimisations in the application. Accepted values are development, test, and production.
DATABASE_URL
string
required
PostgreSQL connection string in the format postgresql://user:password@host:port/dbname. This value is consumed directly by Prisma Client and must point to a PostgreSQL instance that has the pgvector extension available. See Database Setup for details on enabling the extension.
postgresql://postgres:postgres@localhost:5432/ticket_system
OPENAI_API_KEY
string
required
Secret API key used to authenticate all calls to the OpenAI platform. The backend uses this key for two distinct purposes:
  • GPT-4o-mini — ticket classification, category prediction, and AI-suggested response generation.
  • text-embedding-3-small — generating 1 536-dimension embeddings for knowledge base articles and entities used in hybrid RAG and GraphRAG retrieval.
Obtain a key from https://platform.openai.com/api-keys. Ensure the key has access to both the chat/completions and embeddings endpoints.
REDIS_HOST
string
default:"localhost"
Hostname or IP address of the Redis server used by BullMQ to manage the entity-extraction job queue. When running via Docker Compose this value is automatically set to redis (the service name) so containers can communicate over the internal Docker network.
REDIS_PORT
number
default:"6379"
Port that the Redis server is listening on. Matches the Redis default; only change this if your Redis instance is bound to a non-standard port.
REDIS_PASSWORD
string
Password for Redis authentication. Leave this value empty (or omit the variable entirely) for Redis instances that do not require authentication — the default development and Docker Compose setups use no password. Set this to your Redis requirepass value in password-protected environments.
When running the full stack with Docker Compose, all variables are forwarded from a single root-level .env file to the backend container automatically via the environment: block in docker-compose.yml. You only need to set OPENAI_API_KEY in that file — the remaining variables are pre-configured with sensible defaults for the Compose network.

Build docs developers (and LLMs) love