Experience the future of conversation. A modern, responsive, and intelligent chatbot built with SvelteKit, TailwindCSS, and powered by the incredible Google Gemini API. π
Unlock a world of possibilities with these powerful features:
Before you dive in, make sure you have your toolkit ready:
You'll also need the keys to the kingdom:
Get up and running in minutes!
π₯ Clone the repository (if you haven't already):
git clone <repository-url>
cd svelte-ai-chatbot
π¦ Install dependencies:
npm install
π Environment Configuration:
Create a .env file in the root directory. This is where your secrets live.
Add your Google Gemini API key:
GEMINI_API_KEY=your_actual_api_key_here
Ready to code? Start your local development server:
npm run dev
π Open your browser and navigate to http://localhost:5173. Your personal AI assistant is waiting!
Take your bot global! This project is pre-configured for Cloudflare Workers using @sveltejs/adapter-cloudflare.
π Login to Cloudflare (one-time setup):
npx wrangler login
Follow the browser instructions to authorize the CLI.
π Deploy: Build and push your app to the edge with a single command:
npm run deploy
(This runs npm run build followed by wrangler deploy)
Want to build locally without deploying?
npm run build
Preview your production build:
npm run preview
Here's a quick map of the territory:
src/routes: The heart of your appβcontains pages and API endpoints.src/lib/components: Your building blocksβreusable Svelte components like Chatbot, Sidebar,Organic Sphere. etc '.src/routes/api/chat: The brainβthe backend endpoint that talks to Gemini.