This is a Node.js-based application that leverages AI for generating and recommending products in a catalog system. The application seamlessly integrates with LangChain for AI processing, using Docker Model Runner as the execution framework
This repo is a demo project that demonstrates all of Docker's services in a single project.
This application uses Model Runner in Docker Desktop as the OpenAI compatible backend for AI used for product generation.
Check out AgentService.js to see how it configures the connection to the Model runner.
class AgentService {
constructor() {
const openAiApiUrl =
process.env.OPENAI_API_URL ||
"http://localhost:12434/engines/llama.cpp/v1";
const openAiApiKey = process.env.OPENAI_API_KEY || "not-needed";
const openAiModel = process.env.OPENAI_MODEL || "ai/qwen2.5:7B-Q4_K_M";
this.model = new ChatOpenAI({
openAIApiKey: openAiApiKey,
configuration: {
baseURL: openAiApiUrl,
},
modelName: openAiModel,
temperature: 0.7,
});
}
...
- Docker Desktop with Model Runner enabled
- Enable host-side TCP support ( default port: 12434)

This project is currently configured to run all dependent services in containers and the AI model and the app natively on the machine (using Node installed on the machine).
To start the app, follow these steps:
-
Ensure you have Node 22+ installed on your machine.
-
Start all of the application dependencies
docker compose up
-
Install the app dependencies and start the main app with the following command:
npm install --omit=optional npm run dev
-
Once everything is up and running, you can open the demo client at http://localhost:5173.
This project contains a few unit tests and integration tests to demonstrate Testcontainer usage. To run them, follow these steps (assuming you're using VS Code):
-
Download and install the Jest extension.
-
Open the "Testing" tab in the left-hand navigation (looks like a flask).
-
Press play for the test you'd like to run.
The *.integration.spec.js tests will use Testcontainers to launch Kafka, Postgres & LocalStack.
Or you can run the tests using the command line:
# Run all tests
$ npm test
# Run only unit tests
$ npm run unit-test
# Run only the integration tests
$ npm run integration-test
Once the development environment is up and running, the following URLs can be leveraged:
- http://localhost:5173 - a simple React app that provides the ability to interact with the API via a web interface (helpful during demos)
- http://localhost:5050 - pgAdmin to visualize the database. Login using the password
postgres
(configured in the Compose file) - http://localhost:8080 - kafbat to visualize the Kafka cluster