Real-time chat application built with React, Node.js, Express, and PostgreSQL.
- Frontend: React + Vite
- Backend: Node.js + Express + Prisma
- Database: PostgreSQL
- Infrastructure: Docker
- Docker
- Docker Compose
- Clone the repository:
git clone https://github.com/Ksohaib16/Chat-App.git>
cd <project-folder>- Create environment file:
DATABASE_URL="postgresql://postgres:password@db:5432/postgres"- Start services:
docker-compose up --build- Access the application:
- Frontend: http://localhost:5173
- Backend: http://localhost:3000
chat-app/
├── backend/
│ ├── src/
│ │ ├── prisma/
│ │ │ ├── schema.prisma
│ │ │ └── migrations/
│ ├── Dockerfile
│ ├── package.json
│ └── .env
├── frontend/
│ ├── src/
│ ├── Dockerfile
│ ├── package.json
│ └── vite.config.js
├── docker-compose.yml
└── README.md
- Auth:
POST /v1/auth/otp- Request OTP for signupPOST /v1/auth/login- User login
- Chat:
GET /v1/user/conversations- Fetch user conversations