📦 Getting Started
Prerequisites
- Node.js v14+
- npm or yarn
Environment Variables
get your firebase account json and change into base64
Create a .env file in the root directory and add the following keys:
# Firebase (service account JSON file path)
FIREBASE_JSON_PATH_BASE64=...
# Cloudinary
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
# Google SMTP
[email protected]
SMTP_PASSWORD=your_email_password
MONGO_DB_URI= ...
JWT_SECRET= ...
SERVE_URL=...
# Mode
NODE_ENV=development # or production
⚠️ Make sure your
.envfile is added to.gitignoreto avoid exposing sensitive keys.
Installation & Running
- Clone the repository:
git clone https://github.com/roshan-soni-1/chatapp.git
cd chatapp
- Install dependencies:
npm install
- Build the project:
npm run build
- Start the development server:
npm run dev
- Start the production server:
npm run start
- Open your browser and navigate to: http://localhost:3000
💡 Usage
- Create an account or log in.
- Start chatting in real-time with online users.
- Enjoy instant updates without refreshing the page!
🌟 Contributing
Contributions are welcome!
- Fork the repository
- Create your feature branch:
"git checkout -b feature-name" - Commit your changes:
"git commit -m "Add new feature"" - Push to the branch:
"git push origin feature-name" - Open a Pull Request
📜 License
This project is licensed under the MIT License.
💡 Ideas for Improvements
- Implement typing indicators ✍️
- Add emoji reactions 😄
- Enable group chat rooms 👥
- Add Push notifications service