A simple chat application built with React, Next.js, and Firebase Firestore.
- Node.js >= 18
- Yarn or npm
-
Clone the repository:
git clone https://github.com/vladickweb/webchat
-
Navigate to the project directory:
cd chat-app -
Install dependencies:
yarn install # or npm install -
Create a Firebase project and set up Firestore:
- Go to Firebase Console and create a new project.
- Set up Firestore and create a collection named "messages".
-
Create a
.envfile at the root of the project with your Firebase configuration:NEXT_PUBLIC_FIREBASE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NEXT_PUBLIC_FIREBASE_PROJECT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NEXT_PUBLIC_FIREBASE_APP_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=x-xxxxxxxxxx
For simplicity, you can copy the provided
.env.examplefile and replace the placeholder values. -
Start the development server:
yarn dev # or npm run dev -
Open your browser and navigate to http://localhost:3000 to see the chat app in action.
Check out the live demo: Chat App Demo
Feel free to contribute to the project by opening issues or submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.