DeepSeek on plain PHP: no frameworks, no database, no fuss
A no-framework PHP demo that glues third-party LLM APIs into a streaming chat interface with Markdown and image generation.

What it does
A handful of flat PHP files proxy chat requests to third-party LLM endpoints—DeepSeek, OpenAI, or anything else using the OpenAI API format. The browser receives streamed responses via EventSource, rendered with Markdown, code highlighting, and formula support. Prompts beginning with the Chinese character “画” trigger image generation instead of text. There is no database and no framework; the entire application is essentially careful curl orchestration with output buffering disabled.
The interesting bit
Because EventSource cannot POST large payloads, the author routes chat context through PHP SESSION variables in a two-step dance—an amusing workaround for a protocol limitation in a tool whose main selling point is speed. That design choice is both the project’s core technique and its architectural ceiling.
Key highlights
- Streams LLM responses token-by-token to the browser via
EventSourcewithout relying on WebSockets or a frontend framework. - Supports Markdown tables, code blocks with copy buttons, LaTeX-style formulas, and responsive layout for mobile and desktop.
- Rotates through multiple API keys automatically and logs every visitor’s IP address and conversation server-side.
- Can distinguish internal from external traffic, requiring BASIC authentication for outside access.
- Generates images through Stable Diffusion when the first character of the prompt is “画”.
Caveats
- Credentials and endpoint settings live directly in PHP source files; the README notes a default admin password of
admin@2023. - The server logs every conversation and visitor IP by default, which is a notable privacy consideration for a tool meant for sharing among friends.
- The
EventSourceworkaround relies on PHP sessions, which may complicate scaling beyond a single shared instance.
Verdict
Grab this if you need a dead-simple, hackable PHP chat skin for an OpenAI-compatible API and prefer editing source files over environment variables. Skip it if you want multi-user isolation, real access controls, or anything resembling a modern deployment pipeline.
Frequently asked
- What is dirk1983/deepseek?
- A no-framework PHP demo that glues third-party LLM APIs into a streaming chat interface with Markdown and image generation.
- Is deepseek open source?
- Yes — dirk1983/deepseek is open source, released under the MIT license.
- What language is deepseek written in?
- dirk1983/deepseek is primarily written in JavaScript.
- How popular is deepseek?
- dirk1983/deepseek has 3.1k stars on GitHub.
- Where can I find deepseek?
- dirk1983/deepseek is on GitHub at https://github.com/dirk1983/deepseek.