What's new? See the Changelog for details.
Important
Security: A compromised build of ai-sdk-ollama@2.2.1 (supply-chain worm,
2026-06-04) could be pulled by the old ^2.2.0 range. The dependency is now
pinned to the safe 2.2.0. If you installed this project on or after that
date, see SECURITY.md to check and remediate.
Caution
v0.6.0 — Breaking changes: This release replaces the entire Next.js / React stack with SvelteKit + Svelte 5 and moves the runtime to Deno 2. Features and all 9 AI provider integrations are unchanged — only the toolchain and project structure differ.
If you are upgrading from v0.5.x or earlier:
- Install Deno 2.x — Node.js and npm are no longer required.
- Pull the latest code and run
deno install(replacesnpm install). - Keep your existing
.env.local(dev) or.env(production) — environment variable names are unchanged. - Use
deno task dev,deno task build, anddeno task startinstead of npm scripts. - For Docker deployments, rebuild your images (
docker compose up --build).
See the Changelog for the full migration details.
A modern web application that uses AI to generate HTML, CSS, and JavaScript code based on natural language prompts. Simply describe what you want to build, and the AI will create a complete, self-contained web page for you.
- AI-Powered Code Generation: Generate complete web pages from text descriptions
- Live Preview: See your generated code in action with desktop, tablet, and mobile views
- Code Editing: Edit the generated code directly in the browser
- Multiple AI Providers: Support for DeepSeek, custom OpenAI-compatible APIs, and local models
- Responsive Design: Works on desktop and mobile devices
- Modern UI: Clean, dark-themed interface with a focus on usability
- SvelteKit (Svelte 5 with runes)
- Deno runtime and toolchain
- Tailwind CSS
- Vercel AI SDK (provider streaming)
- Monaco Editor
- Deno (version 2.x or higher)
- Ollama or LM Studio installed
- OR an API key from one of the supported providers (see below)
-
Clone the repository:
git clone https://github.com/weise25/LocalSite-ai.git cd LocalSite-ai -
Install the dependencies:
deno install
-
Rename the
.env.examplefile in the root directory to.env.localand add your API key:# Choose one of the following providers: # DeepSeek API DEEPSEEK_API_KEY=your_deepseek_api_key_here DEEPSEEK_API_BASE=https://api.deepseek.com/v1 # Custom OpenAI-compatible API # OPENAI_COMPATIBLE_API_KEY=your_api_key_here # OPENAI_COMPATIBLE_API_BASE=https://api.openai.com/v1 # Default Provider (deepseek, openai_compatible, ollama, lm_studio) DEFAULT_PROVIDER=lm_studio -
Start the development server:
deno task dev
-
Open http://localhost:5173 in your browser.
- Install Ollama on your local machine.
- Pull a model like
llama2orcodellama. - Start the Ollama server.
- Set in your
.env.localfile:OLLAMA_API_BASE=http://localhost:11434 DEFAULT_PROVIDER=ollama
- Install LM Studio on your local machine.
- Download a model and start the local server.
- Set in your
.env.localfile:LM_STUDIO_API_BASE=http://localhost:1234/v1 DEFAULT_PROVIDER=lm_studio
- Visit Cerebras and create an account or sign in.
- Navigate to the API keys section.
- Create a new API key and copy it.
- Set in your
.env.localfile:CEREBRAS_API_KEY=your_cerebras_api_key
- Visit Google AI Studio and create an account or sign in.
- Navigate to the API keys section.
- Create a new API key and copy it.
- Set in your
.env.localfile:GOOGLE_GENERATIVE_AI_API_KEY=your_google_api_key
- Visit Anthropic and create an account or sign in.
- Navigate to the API keys section.
- Create a new API key and copy it.
- Set in your
.env.localfile:ANTHROPIC_API_KEY=your_anthropic_api_key
- Visit DeepSeek and create an account or sign in.
- Navigate to the API keys section.
- Create a new API key and copy it.
- Set in your
.env.localfile:DEEPSEEK_API_KEY=your_deepseek_api_key DEEPSEEK_API_BASE=https://api.deepseek.com/v1
- Visit OpenRouter and create an account or sign in.
- Navigate to the API keys section.
- Create a new API key and copy it.
- Set in your
.env.localfile:OPENROUTER_API_KEY=your_openrouter_api_key
- Visit Mistral AI Studio and create an account or sign in.
- Navigate to the API keys section.
- Create a new API key and copy it.
- Set in your
.env.localfile:MISTRAL_API_KEY=your_mistral_api_key
You can use any OpenAI-compatible API:
- Obtain an API key from your desired provider (OpenAI, Together AI, Groq, etc.).
- Set in your
.env.localfile:OPENAI_COMPATIBLE_API_KEY=your_api_key OPENAI_COMPATIBLE_API_BASE=https://api.of.provider.com/v1
If your OpenAI-compatible provider does not support listing available models
(some third-party or self-hosted providers), you can explicitly set a single
model ID to use with the OPENAI_COMPATIBLE_MODEL environment variable. When
set, the app will return this model instead of attempting to call the provider's
models.list endpoint.
Example .env.local:
OPENAI_COMPATIBLE_API_KEY=your_api_key
OPENAI_COMPATIBLE_API_BASE=https://api.of.provider.com/v1
OPENAI_COMPATIBLE_MODEL=gpt-4o-mini
This is a SvelteKit app built with @sveltejs/adapter-node. deno task build
produces a standalone server in build/, which you run with:
deno task build
deno run -A build/index.js # listens on port 3000 (set PORT to override)A Dockerfile and docker-compose.yml are included (Deno-based). With Docker
running:
docker compose up --build- Deno Deploy
- Any host that can run a Deno (or Node) process and serve the
adapter-nodeoutput - Swap in a different SvelteKit adapter (Vercel, Netlify, Cloudflare) if you prefer a serverless target
Keep in mind that if you host it on a remote platform you cannot reach local models through Ollama or LM Studio unless you expose them, e.g. via tunneling with ngrok.
- Enter a prompt describing what kind of website you want to create.
- Select an AI provider and model from the dropdown menu.
- Click "GENERATE".
- Wait for the code to be generated.
- View the live preview and adjust the viewport (Desktop, Tablet, Mobile).
- Toggle edit mode to modify the code if needed.
- Copy the code or download it as an HTML file.
- Integration with Ollama for local model execution
- Support for LM Studio to use local models
- Predefined provider: DeepSeek
- Custom OpenAI-compatible API support
- Support thinking models (Qwen3,DeepCoder, etc.)
- Adding more predefined providers (Anthropic, Groq, etc.)
- Choose between different Frameworks and Libraries (React, Vue, Angular, etc.)
- File-based code generation (multiple files)
- Save and load projects
- Agentic diff-editing capabilities
- Dark/Light theme toggle
- Customizable code editor settings
- Drag-and-drop interface for UI components
- History of generated code
- Transcription and voice input for prompts
- Anything; feel free to make suggestions
- Turning into a cross-platform desktop app (Electron)
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.