Svelte 5 Ready v0.1.7

Svelte FireKit

Complete Firebase integration for Svelte 5 applications. Build MVPs faster with reactive state management, zero-config setup, and comprehensive UI components.

6+
Firebase Services
5+
Auth Providers
12+
UI Components
100%
Type Safety

Everything You Need for Firebase

From authentication to real-time data, file storage to analytics - Svelte FireKit provides a complete solution for modern web applications.

Auth
Complete Authentication

Email/password, Google, Facebook, Apple, phone, and anonymous auth with automatic Firestore integration.

Firestore
Real-time Firestore

Reactive collections and documents with live updates, caching, and advanced querying.

Storage
File Storage

Upload/download files with progress tracking, image optimization, and security rules.

Presence
Presence System

User online/offline tracking with geolocation and real-time status updates.

Analytics
Analytics

Comprehensive event tracking and user behavior analytics integration.

SSR
SSR Compatible

Full server-side rendering support with hydration and SEO optimization.

Get Started in Minutes

Set up Svelte FireKit in your project and start building your MVP right away.

Quick Setup Guide

1

Install Dependencies

Install the library and Firebase SDK

npm install svelte-firekit firebase
2

Configure Environment

Set up Firebase configuration variables

PUBLIC_FIREBASE_API_KEY=your_api_key
PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
PUBLIC_FIREBASE_PROJECT_ID=your_project_id
PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
PUBLIC_FIREBASE_APP_ID=your_app_id
3

Initialize Firebase

Wrap your app with the FirebaseApp component

<FirebaseApp>
  <!-- Your app content -->
  <SignedIn>
    {@render children(user)}
  </SignedIn>
</FirebaseApp>
4

Start Building

Use reactive stores and components

// Reactive user state
const user = $derived(firekitUser.user);
const isAuthenticated = $derived(firekitUser.isAuthenticated);

// Reactive collection
const posts = firekitCollection('posts');

// Use in components
<SignedIn>
  {@render children(user)}
</SignedIn>

Build MVPs Faster

Common patterns and components to accelerate your development process.

User Authentication

Complete auth system with multiple providers

import { SignedIn, SignedOut, AuthGuard } from '$lib/components/firekit';

<AuthGuard requireAuth={true} redirectTo="/login">
  {#snippet children(user, auth, signOut)}
    <h1>Welcome, {user.displayName}!</h1>
    <button onclick={signOut}>Sign Out</button>
  {/snippet}
</AuthGuard>

<SignedIn>
  {#snippet children(user)}
    <div>Hello, {user.displayName}!</div>
  {/snippet}
</SignedIn>

<SignedOut>
  {#snippet children(auth)}
    <button onclick={() => signInWithGoogle()}>Sign In</button>
  {/snippet}
</SignedOut>