A cosmic-grade SvelteKit starter template powered by Cloudflare's full stack
NebulaKit is a production-ready SvelteKit template with everything you need to build modern web applications. It comes with Cloudflare Workers integration (D1, KV, R2, Queues, Turnstile), a complete theme system, command palette, LLM chat UI, full authentication, and polished drag-and-dropβall built in from day one.
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Deploy to Cloudflare Pages
npm run deploy
Visit http://localhost:5173 to see your app!
NebulaKit follows Test-Driven Development with 90%+ code coverage requirements:
# Run all tests
npm run test
# Run tests in watch mode
npm run test:watch
# Check coverage (must be β₯90%)
npm run test:coverage
# Run E2E tests
npm run test:e2e
# Run all tests (unit + E2E)
npm run test:all
Important: All features and bug fixes require tests written FIRST. See CONTRIBUTING.md for details.
NebulaKit/
βββ src/
β βββ lib/
β β βββ components/ # Reusable UI components
β β βββ stores/ # Svelte stores (theme, etc.)
β β βββ server/ # Server-side utilities
β β βββ utils/ # Helper functions
β βββ routes/ # SvelteKit routes
β β βββ auth/ # Authentication pages
β β βββ chat/ # LLM chat interface
β β βββ demo/ # Feature demonstrations
β βββ app.css # Global styles & theme
β βββ app.html # HTML template
βββ static/ # Static assets
βββ wrangler.toml # Cloudflare configuration
NebulaKit includes a comprehensive theme system with:
/* All colors use CSS variables - never hardcode! */
.button {
background-color: var(--color-primary);
color: var(--color-background);
border-radius: var(--radius-md);
padding: var(--spacing-sm) var(--spacing-md);
}
Validate theme contrast:
npm run validate:contrast
See the Theme System Guide for complete documentation.
Built-in auth pages with support for:
Easily extend with @auth/sveltekit for more providers.
The included chat interface is ready to connect to your LLM API:
// In /routes/chat/+page.svelte
async function sendMessage() {
const response = await fetch('/api/chat', {
method: 'POST',
body: JSON.stringify({ message: input })
});
// Handle response
}
const result = await platform.env.DB.prepare('SELECT * FROM users WHERE email = ?')
.bind(email)
.first();
await platform.env.KV.put('key', 'value');
const value = await platform.env.KV.get('key');
await platform.env.BUCKET.put('file.jpg', fileData);
const file = await platform.env.BUCKET.get('file.jpg');
await platform.env.QUEUE.send({ data: 'message' });
The demo page includes a fully functional kanban board with:
NebulaKit is mobile-first with:
MIT License - feel free to use this template for any project!
We welcome contributions! Please read our Contributing Guide first.
Key requirements:
See .github/copilot-instructions.md for detailed development guidelines.
If you find NebulaKit useful, please consider giving it a star on GitHub!