Skip to content

Commit 9f596f9

Browse files
authored
Create README.md
readme updated
1 parent c19f10c commit 9f596f9

1 file changed

Lines changed: 86 additions & 0 deletions

File tree

README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Realtime Chat Web App
2+
3+
A robust, real-time chat application built with the MERN stack and uses Websocket API and Rest API (MongoDB, Express, React, Node.js) and Dockerized for easy deployment.
4+
5+
## 🚀 Features
6+
7+
- **Real-time Messaging**: Instant communication powered by Socket.io.
8+
- **User Authentication**: Secure sign-up and login with JWT.
9+
- **Modern UI**: Clean and responsive interface using React and Tailwind CSS.
10+
- **Docker Support**: Containerized client and server for consistent environments.
11+
- **CI/CD Pipeline**: GitHub Actions workflow for automated Docker builds and pushes.
12+
13+
## 🛠 Tech Stack
14+
15+
- **Frontend**: React, Vite, Tailwind CSS
16+
- **Backend**: Node.js, Express.js, Socket.io
17+
- **Database**: MongoDB
18+
- **DevOps**: Docker, Docker Compose, GitHub Actions
19+
20+
## 📋 Prerequisites
21+
22+
Before you begin, ensure you have the following installed:
23+
- [Docker](https://www.docker.com/products/docker-desktop) and Docker Compose
24+
- [Node.js](https://nodejs.org/) (optional, for local development outside Docker)
25+
26+
## 🏁 Getting Started
27+
28+
### Quick Start with Docker (Recommended)
29+
30+
1. **Clone the repository**:
31+
```bash
32+
git clone https://github.com/Rash200217/Realtime-chat-web-app.git
33+
cd Realtime-chat-web-app
34+
```
35+
36+
2. **Run with Docker Compose**:
37+
```bash
38+
docker-compose up --build
39+
```
40+
This command will build the images and start the containers.
41+
42+
3. **Access the application**:
43+
- Frontend: `http://localhost:8080` (or `http://localhost:5173` depending on your setup)
44+
- Backend API: `http://localhost:5000`
45+
46+
### Local Development (Without Docker)
47+
48+
**1. Server Setup:**
49+
```bash
50+
cd server
51+
npm install
52+
# Create a .env file with your variables (MONGO_URI, etc.)
53+
npm run dev
54+
```
55+
56+
**2. Client Setup:**
57+
```bash
58+
cd client
59+
npm install
60+
npm run dev
61+
```
62+
63+
## ⚙️ Configuration
64+
65+
### Environment Variables
66+
You should create a `.env` file in the `server` directory with the following variables:
67+
```
68+
PORT=5000
69+
MONGO_URI=mongodb://localhost:27017/chat-app # Or your MongoDB Atlas URI
70+
JWT_SECRET=your_jwt_secret
71+
CLIENT_URL=http://localhost:8080
72+
```
73+
74+
## 🔄 CI/CD Pipeline
75+
76+
This project includes a configured GitHub Actions workflow (`.github/workflows/docker-publish.yml`).
77+
78+
- **Trigger**: Puts to `main` branch.
79+
- **Action**: Builds Docker images for `client` and `server` and pushes them to Docker Hub.
80+
- **Requirements**: You must add `DOCKER_USERNAME` and `DOCKER_PASSWORD` to your repository secrets.
81+
82+
## 🤝 Contributing
83+
84+
Contributions are welcome! Please feel free to submit a Pull Request.
85+
86+
#Made by Rashmika Dhananjaya#

0 commit comments

Comments
 (0)