Polyglot is a feature-rich, real-time chat application designed to enable seamless communication between users while supporting message translations into multiple languages. The app is built with a modern tech stack using React for the frontend, FastAPI for the backend, and Apache Kafka for message brokering. It incorporates real-time notifications and a persistent chat history, making it ideal for multilingual teams and global users.
The app also supports user-specific language preferences, ensuring every message is automatically translated into the preferred language of the recipient, fostering an inclusive and collaborative experience.
- Real-Time Messaging
- User Authentication
- Chat History
- Language Translation
- Real-Time Notifications
- Interactive Chat List
Tested this with the following env - Python 3.11, Node - v22.11.0, Kubectl version - v1.31.2/v5.4.2/v1.30.2
- We have made a docker-compose file, which should make building things easy.
- Go to each of the backend and frontend dir and run the following cmds that will create an image of the backend and frontend service on your local
docker build -t backend .
docker build -t frontend .
- After that come to the parent directory and run
docker compose up -d
- At this point you should be able to see all the services except frontend come up.
- Run the frontend code separetly -
npm i and npm start
- Publish your frontend and backend images to your docker hub repo. You can get into the respective backend/frontend dirs, open Makefile and modify your username. Run
docker login
make
make push
- Copy all of your deployment + pvc + service yaml scripts present in deployments/. Run
docker login
kubectl apply -f redis-deployment.yaml
kubectl apply -f mongo-deployment.yaml
kubectl apply -f postgres-deployment.yaml
kubectl apply -f zookeeper-deployment.yaml
kubectl apply -f kafka-deployment.yaml
kubectl apply -f backend-deployment.yaml
<do kubectl get svc and get the external IP. Put this in the frontend-deployment.yaml file>
kubectl apply -f frontend-deployment.yaml
- This should bring up all the necessary services.
docker exec -it <pod> bash
docker logs <pod>
docker describe pod <pod> # watch for network, pvc, ip, logs related info
psql -U abc -d proj
\d users
mongosh -u abc -p abc
use chat_db
show collections
kafka-console-consumer --bootstrap-server localhost:9092 --topic notifications --from-beginning
kafka-topics --bootstrap-server kafka:9092 --list
We have also attached the list of apis we used for testing, requirements.txt is present to create the py venv