Hiple Chat is a React.js-based chat application that integrates with Firebase for authentication and Firestore for real-time data storage. The app is designed to be responsive and user-friendly, allowing users to sign in, send messages, and log out seamlessly.
-
Clone the repository:
git clone https://github.com/yourusername/hiple-chat.git cd hiple-chat
-
Install dependencies:
npm install
-
Configure Firebase:
- Go to
src/firebase.js
. - Replace the placeholders in
firebaseConfig
with your Firebase project credentials.
- Go to
The project is organized as follows:
├── public
├── src
│ ├── components
│ │ ├── Chat.css
│ │ ├── Chat.jsx
│ │ ├── Logout.jsx
│ │ ├── Messages.jsx
│ │ ├── nav.css
│ │ ├── nav.jsx
│ │ ├── SendMessage.jsx
│ │ ├── Signin.jsx
│ ├── App.css
│ ├── App.js
│ ├── App1.js
│ ├── firebase.js
│ ├── index.js
│ ├── index.css
└── README.md
- Chat.jsx: The main chat interface component.
- Logout.jsx: Handles user logout functionality.
- Messages.jsx: Displays chat messages.
- nav.jsx: Navigation bar component.
- SendMessage.jsx: Input field for sending messages.
- Signin.jsx: User authentication component.
- App.js: Entry point with password protection and routing.
- App1.js: Main application structure after authentication.
- firebase.js: Firebase configuration and initialization.
- index.js: React entry point and rendering.
- index.css: Global styles for the application.
To set up Firebase:
- Create a Firebase project at Firebase Console.
- Add a web app to your Firebase project.
- Copy the configuration details provided and replace the placeholders in
src/firebase.js
:const firebaseConfig = { apiKey: "YOUR_API_KEY", authDomain: "YOUR_AUTH_DOMAIN", projectId: "YOUR_PROJECT_ID", storageBucket: "YOUR_STORAGE_BUCKET", messagingSenderId: "YOUR_MESSAGING_SENDER_ID", appId: "YOUR_APP_ID" };
-
Start the development server:
npm start
-
Access the application:
- Open http://localhost:3000 in your browser.
- Enter the password (
admin@123
) to access the main chat interface.
In the project directory, you can run:
npm start
: Runs the app in the development mode.\npm test
: Launches the test runner in the interactive watch mode.\npm run build
: Builds the app for production to thebuild
folder.