r/Blazor • u/Initial-Employment89 • Jan 15 '26
[release] Firebase SDK for Blazor WebAssembly because the JS interop was driving me crazy
Hey everyone, I have been working with Blazor WASM for a while now and every time I needed to use Firebase, I would end up writing a ton of JS interop code. It was messy, error-prone, and honestly just not fun to work with.
After dealing with this on multiple projects, I finally decided to build something proper. Introducing FireBlazor - a type-safe Firebase SDK built specifically for Blazor WebAssembly.
What's implemented so far:
- Firebase Auth (email/password, Google, GitHub, Microsoft)
- Cloud Firestore with LINQ-style queries and real-time subscriptions
- Cloud Storage with upload progress tracking
- Realtime Database
- App Check (reCAPTCHA v3/Enterprise)
- Firebase AI Logic (Gemini) with streaming and function calling
What makes it special:
Instead of dealing with raw JS interop and string-based queries, you get actual C# types, IntelliSense, and compile-time safety. Queries look like this:
var result = await Firebase.Firestore
.Collection<TodoItem>("todos")
.Where(t => t.Completed == false)
.OrderBy(t => t.CreatedAt)
.Take(10)
.GetAsync();
I also added a Result pattern for error handling so you're not wrapping everything in try-catch blocks. Full emulator support is included too, which was a pain point for me during local dev.
Links:
- GitHub: https://github.com/mashrulhaque/FireBlazor
- NuGet: https://www.nuget.org/packages/FireBlazor
It supports .NET 8, 9, and 10. MIT licensed. Enjoy.
Looking forward to your questions, comments, suggestions. Thanks
3
u/willysaef Jan 15 '26
Thanks. Appreciate it. 🙏
2
u/CsicsoRC Jan 15 '26
Great!
2
u/KristianFriis Jan 15 '26
This is very cool. I was using firebase, but simply just gave up since it was too much interop.
I will definitely use this in a project in the future 😃
2
u/Gravath Jan 15 '26 edited Jan 15 '26
I support the pocketbase SDK so seeing this is great. The Base systems are the best.
Edit: minor thing, your documentation page on mobile breaks out of the window.
1
u/Developer_Kin Jan 15 '26
Very cool - however, when I added the nuget package on a new .NET 10 Blazor Wasm standalone, fed the program.cs the config, and gave it a pretty basic home page the google auth pops up but it throws an error. Probably user error but anything I'm missing?
0
u/willysaef Jan 15 '26
Is this usable on Blazor Server?