A real-time chat application built with Next.js, Shadcn and Firebase Firestore.
Read more about how this app was built in this blog post:
Building a Real-Time Chat App with Firebase and Next.js
onSnapshot
Clone the repositorygit clone https://github.com/Mumma6/firebase-chat-app.git
Install dependenciesnpm install
Create a .env.local
file in the root directory and add your Firebase config:
NEXT_PUBLIC_FIREBASE_API_KEY=...
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=...
NEXT_PUBLIC_FIREBASE_PROJECT_ID=...
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=...
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=...
NEXT_PUBLIC_FIREBASE_APP_ID=...
NEXT_PUBLIC_FIREBASE_COLLECTION=your-unique-collection-name
npm run dev