samvad is a real-time chat application. it supports messaging, file sharing(TEXT,PDF,VIDEO,AUDIO,IMAGE etc.. as it is and all other type in text format), authentication, and works across all devices.
- real-time messaging with websocket
- jwt authentication
- file sharing
- user profiles
- responsive design
frontend
- react.js
- tailwind css
- socket.io client
- react three for 3D
backend
- node.js with express
- mongodb
- socket.io server
- jwt authentication
- cloudinary for storage
- node.js
- npm
- mongodb
- cloudinary
git clone <repository-url>
cd samvadnpm installbackend .env
mongouri=your_mongodb_connection_string
port=8004
jwt_secret=your_jwt_secret_key
cloud_name=your_cloudinary_cloud_name
cloudinary_api_key=your_cloudinary_api_key
cloudinary_api_secret=your_cloudinary_api_secret
node_env=development
client_url=http://localhost:3000
frontend_url=http://localhost:3000frontend .env
vite_api_base_url=http://localhost:8004
vite_socket_url=http://localhost:8004backend:
npm startfrontend:
npm run devfrontend: http://localhost:3000 backend: http://localhost:8004
npm run build
npm run preview- docker
- docker-compose
cp .env.example .envedit .env with your cloudinary credentials:
JWT_SECRET=your-super-secret-jwt-key
CLOUDINARY_CLOUD_NAME=your-cloudinary-cloud-name
CLOUDINARY_API_KEY=your-cloudinary-api-key
CLOUDINARY_API_SECRET=your-cloudinary-api-secretdocker compose up -d
or
docker-compose up -dthis will start:
- mongodb on port 27017
- backend on port 5001
- frontend on port 3000
- frontend: http://localhost:3000
- backend api: http://localhost:5001
docker-compose up -d # start in background
docker-compose logs -f # view logs
docker-compose down # stop all services
docker-compose down -v # stop and remove volumes
docker-compose up -d --build # rebuild and start- mongouri
- jwt_secret
- cloud_name
- cloudinary_api_key
- cloudinary_api_secret
- port (default: 8004)
- node_env
- client_url
- frontend_url
pytest -v frontendtest.py
pytest -v backendtest.py