This is a documentation file for a simple chat application built using HTML, CSS, and Vanilla JavaScript. The chat app utilizes Firebase for authentication and real-time database functionality.
Before getting started, ensure you have the following:
- A code editor (e.g., Visual Studio Code, Sublime Text).
- A Firebase account. If you don't have one, you can create a free account at Firebase.
Follow the steps below to set up your Firebase account, including authentication and real-time database configuration:
-
Go to the Firebase Console and sign in using your Google account.
-
Click on the "Create a project" button and provide a name for your project.
-
Once the project is created, you'll be redirected to the project dashboard.
-
Enable Authentication:
- Click on the "Authentication" tab in the left sidebar.
- Choose the "Get started" button under "Sign-in method."
- Enable the desired sign-in methods (e.g., Email/Password, Google, etc.) and follow the provided instructions to configure them.
-
Enable Realtime Database:
- Click on the "Realtime Database" tab in the left sidebar.
- Choose "Create database" and select the "Start in test mode" option (for simplicity).
- Click on "Enable" to create your database.
To use the chat app:
-
Clone or download the project files to your local machine.
-
Open the project folder in your preferred code editor.
-
In the project files, locate the
firebase.js
file. -
Replace the placeholder values in the
firebase.js
file with your Firebase project's configuration details. You can find these details in the Firebase console under "Project settings" > "Your apps" > "Firebase SDK snippet" > "Config". -
Open the
index.html
file in a web browser.