Anonymous Chat is a real-time messaging application built using HTML, CSS, JavaScript, and Firebase. It allows users to send and receive messages instantly, leveraging Firebase's cloud services for real-time data syncing and storage. This project helped me understand more about how frontend works cohesively with backend and also further extended my knowlege on web servers. It also taught me about security measures and how to defend against hackers.
This is the login page for the Anonymous Chat app, where users can enter the chat while using a google account.
This shows the chat in action, where users can send and receive messages in real-time.
The Anonymous Chat app was built using the following tools and technologies:
- Firebase: Used for real-time data synchronization, user authentication, and the framework for the whole web server.
- HTML, CSS, JavaScript: Used to create the front-end interface, allowing users to interact with the chat.
- Firebase Authentication: Ensures that users can chat anonymously as long as they create an account for security measures.
- Firebase Realtime Database: Handles storing and retrieving messages in real-time.
- Key files used in the build process:
index.html(Main structure and layout of the chat app)style.css(App's visual styling)app.js(Handles Firebase interaction and real-time message updates)firebase-config.js(Configuration for Firebase SDK and database connection)
In the future, I plan to publish my chat app to the internet using either GitHub Pages or Firebase. However, I haven't published it yet because I need proper HTML implementation to do so. Right now, I can only run the app locally since I only have working JavaScript and CSS. Additionally, before making it live, I want to implement additional features, such as the ability to reply to messages, add reactions, and improve the overall user experience. My goal is to make the app cooler, more interactive, and better for users.
To build and run the Anonymous Chat App, you will need:
- A text editor such as VS Code.
- A web browser (e.g., Chrome, Firefox).
- Firebase if you want to deploy it online (optional for local testing).
-
Clone or download the repository to your local machine.
-
Open a terminal or command prompt.
-
Navigate to the project directory:
cd chat -
Install dependencies:
npm install
-
Start the app locally using npm:
npm start
If you want to deploy the app online using Firebase, follow these steps (Only works if there is proper HTML implementation):
-
Install Firebase CLI:
npm install -g firebase-tools
-
Log in to Firebase:
firebase login
-
Initialize Firebase in your project folder:
firebase init
-
Choose the Firebase Hosting option during initialization.
-
Deploy your app:
firebase deploy
Once deployed, Firebase will provide a URL where your chat app will be live!
If you decide to delete your Firebase project or stop using it, you can run:
firebase projects delete