0.4.111 • Published 10 months ago

@api-buddy/firebase v0.4.111

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@api-buddy/firebase

Firebase integration for API Buddy. This package provides a set of utilities and hooks for working with Firebase services in your API Buddy projects.

Installation

pnpm add @api-buddy/firebase firebase

Usage

Initialize Firebase

import { firebaseApp, auth, db, storage } from '@api-buddy/firebase';

// Use the initialized services
const user = auth.currentUser;
const usersRef = collection(db, 'users');
const storageRef = ref(storage, 'images/example.jpg');

Environment Variables

Make sure to set these environment variables in your project:

NEXT_PUBLIC_FIREBASE_API_KEY=your-api-key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your-messaging-sender-id
NEXT_PUBLIC_FIREBASE_APP_ID=your-app-id
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=G-XXXXXXXXXX

API Reference

Exports

  • firebaseApp: The initialized Firebase app instance
  • auth: Firebase Authentication service
  • db: Firestore database instance
  • storage: Firebase Storage instance
  • isFirebaseInitialized(): Check if Firebase is initialized

License

MIT

0.4.111

10 months ago

0.4.109

10 months ago

0.1.7

11 months ago

0.1.6

11 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago