Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

Add local testing instructions

Alfredo Fomitchenko1049b403c306
diff --git a/LOCAL_INSTALL.md b/LOCAL_INSTALL.md
index 2914d04437..620e050342 100644
--- a/LOCAL_INSTALL.md
+++ b/LOCAL_INSTALL.md
@@ -90,6 +90,72 @@ REM this batch file goes at the root of the chatgpt-clone directory (C:/chatgpt-
If you update the chatgpt-clone project files, mannually redo the `npm ci` and `npm run build` steps
+## Locally test the app during development
+
+### Run the app
+
+#### Option 1: Run the app using Docker
+
+For reproducibility and ease of use, you can use
+the provided docker-compose file:
+
+1. Comment out the portion pointing at the already built image
+
+ ```yaml
+ image: chatgptclone/app:0.3.3
+ ```
+
+2. Uncomment the portion pointing at the local source code
+
+ ```yaml
+ # image: node-api
+ # build:
+ # context: .
+ # target: node-api
+ ```
+
+3. Build your local source code for the `node-api` target
+
+ ```shell
+ docker build `
+ --target=node-api `
+ -t node-api `
+ .
+ ```
+
+4. Docker-compose up
+
+ ```shell
+ docker-compose up
+ ```
+
+#### Option 2: Run the app by installing on your machine
+
+1. Install the prerequisites on your machine.
+ See [section above](#install-the-prerequisites-on-your-machine).
+
+2. Run the app on your machine.
+ See [section above](#run-the-app).
+
+### Run the tests
+
+1. Install the global dependencies
+
+ ```shell
+ npm ci
+ npx playwright install --with-deps
+ ```
+
+2. Run tests
+
+ ```shell
+ npx playwright test
+ ```
+
+If everything goes well, you should see a `passed` message.
+
+<img src="https://user-images.githubusercontent.com/22865959/235321489-9be48fd6-77d4-4e21-97ad-0254e140b934.png">
+
# Shared
To share within network or serve as a public server, set `HOST` to `0.0.0.0` in `.env` file.