A ChatGPT-style AI chatbot built with SvelteKit and Svelte 5. All models are accessed through OpenRouter, supporting BYOK (Bring Your Own Key) authentication.
Live demo: https://svelte-ai-chatbot-ecru.vercel.app/
⌘K to search, ⌘⇧O to start a new chat# Clone the repository
git clone https://github.com/lexafaxine/svelte-ai-chatbot.git
cd svelte-ai-chatbot
# Install dependencies
pnpm install
# Create a .env file with your API key (used as server-side fallback)
echo "OPENROUTER_API_KEY=sk-or-..." > .env
# Start the dev server
pnpm dev
The app will be available at http://localhost:5173.
You can also enter your API key directly in the app's settings sidebar — no .env file required.
An OpenRouter API key is required to use the chatbot. If you don't have one, please reach out to me and I can provide one for testing.
Recommendation: Use a non-free model (e.g. DeepSeek R1 Distill Llama 70B) for testing. Free-tier models have strict rate limits and long queue times, which may result in a poor experience.
pnpm build # Production build
pnpm preview # Preview production build
pnpm check # Type checking
pnpm lint # Lint & format check
pnpm test # Run tests