A chatting and video calling app.
- React with TypeScript for UI.
- Redux (Thunk for async dispatches) for state management.
- Go backend (Gorilla websockets, chi router).
- MySQL Database.
- JWT Based authentication.
- Material UI for styling.
.env
file in backend folder:- PORT=4000
- USER1=your-db-username
- DB=your-db-name
- KEY=key-for-jwt-signing
- Database requirements:
- MySQL Database.
- Tables:
- users - Stores users:
- id int AUTO_INCREMENT PRIMARY KEY
- email varchar(100) NOT NULL UNIQUE
- username, varchar(100) NOT NULL
- password varchar(100) NOT NULL
- friendinvites - Stores invitations sent to user.
- sender varchar(100) NOT NULL
- receiver varchar(100) NOT NULL
- status varchar(30) NOT NULL
- PRIMARY KEY(sender, receiver)
- FOREIGN KEY (sender) REFERENCES users(email)
- FOREIGN KEY (receiver) REFERENCES users(email)
- chatMessages - Stores chat messages sent from one user to another:
- roomId varchar(50) NOT NULL
- createdBy int NOT NULL
- email varchar(100) NOT NULL
- username varchar(100) NOT NULL
- date varchar(100) NOT NULL
- message text
- FOREIGN KEY (createdBy) REFERENCES users(id)
- videorooms - Stores video groups created by a user:
- roomId varchar(100) PRIMARY KEY
- createdBy varchar(100)
- roomLabel varchar(100)
- joinedvideorooms - Stores how many people are eligible to enter a room:
- roomId varchar(100)
- mail varchar(100)
- FOREIGN KEY (roomId) REFERENCES videorooms(roomId)
- PRIMARY KEY (roomId, mail)
- users - Stores users:
- Login/Register Functionality.
- Friend Requests:
- Sending / Receiving them.
- Accepting / Rejecting them.
- Websocket based functionality:
- Updating Friends List.
- Updating Friend Requests List.
- Updating the indicator whenever a friend comes online or goes offline.
- Chatting with friends.
- Video calling using WebRTC.
- Multi user group video video call.
- Mesh architecture is used to setup peer connections hence it is not advised to have more than 4 ppl in a video group.
- Another way exists which requires some video processing on the sever side. (Not implemented)
- To call a friend first send him the video room id, after joining the room. A friend can enter the room.
- Audio and Video can be shut off. It is on by default.
- The code does not handle the scenario if a user does not have a camera and only wishes to join with audio. (Not implemented)
- Screen Sharing funtionality is there but sharing your camera stream along with screen share is not implemented. Sharing screen shuts off the camera video and vice versa.
- Multi user group video video call.
- Add joining via audio only. (for users who do not have a camera)
- Replace Mesh architecture for managing multiple users and use server methods - requires video processing on the server.
- Option to send and recieve video call messages like on messengers or whatsapp.
- Use a TURN server. The project does not use one hence it is possible that when it is deployed video chat might not work due to NATing.