Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Firebase ❤️ Svelte: A SvelteKit + Typescript + Firebase library inspired by Fireship.io

License

NotificationsYou must be signed in to change notification settings

jacob-8/sveltefirets

Repository files navigation

April 2024 Status Update: I still use this library in production and it's very useful, but I've moved on to using Supabase by and large. Because this library is stable, because the originalSvelteFire gets a few updates here and there, and because I'm not expanding my use of Firebase, most active development has ceased. But it works great in SvelteKit 2 and Svelte 4. My recommendation is toread the docs,read the code,read Jeff's code, then copy what you need and hone it to your use case. You'll be a better developer for it.

As I've progressed in my understanding of how to use SvelteKit well, I've learned that it will make component design and mocking (I useKitbook) much easier if you establish backend connections in the layout/page ts files and pass data and mutation operations to components via the page data prop. So that is why I say write your own. I presently no longer use the<Doc> and<Collection> components but solely lean on thegetDoc,getCollection,docStore andcollectionStore methods for this reason.


NPM

Easily useFirebase in Svelte. Built forSvelteKit 2.0+ but it could be used with any Svelte framework.

  • SvelteKit (tested on 2.5.1)
  • Typescript
  • Firestore convenience helpers
  • Auth store
  • SSR ready (for unauthenticated data fetching)
  • Firebase (tested on 10.9.0)
  • includes an optional FirebaseAuthUi component that brings inFirebaseUI web + Firebase 10 compat via CDN only when component shown - FirebaseUI web allows for easy authentication in dozens of languages and many providers without you needing to manage the authentication forms

Usage Instructions

Read the docs

Open to Contributions

If there are any configuration settings or features you'd like to see added pleasecreate an issue to start a discussion about features you'd like. After discussion, hopefully you can add a pull request to implement such.

Note that theset helper method which automatically is either anupdate or aset depending on whether a document exists should really be renamed toupsert in order to makeset more closely resemble Firestore'ssetDoc.

Developing

  • pnpm install
  • pnpm dev

Inspiration:Fireship.io

Jeff Delaney gets credit for much of SvelteFireTS. I started withSvelteFire then added Typescript, borrowed some convenient helpers from Jeff'sFirestore Advanced Usage Angularfire, and made it work with SvelteKit's SSR + Client situation. If you like what you see here, you should sign up atFireship.io and subscribe to theFireship Youtube Channel for great tutorials.

About

Firebase ❤️ Svelte: A SvelteKit + Typescript + Firebase library inspired by Fireship.io

Topics

Resources

License

Stars

Watchers

Forks

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp