This document explores the design of Audio Chat.
- Basic authentication method (email and password)
- Upload or Change the image profile
- Create a virtual Room chat
- Real-Time audio chat communication
- open/close Mic
- Leave Room
- Real-Time text chat
Using MongoDB as a primary database for storing user information like name, password hash, and profile URL and also for storing logs; using Redis for storing user sessions and ids of rooms; and finally, using the file system for storing the profile picture.
Using Mongo Schema Validation only on user collection as follows:
column | type |
---|---|
_id | objectId |
name | string |
email (index) | string |
profileImg | string |
password | string |
Using session id as a primary identifier with an expiration of 2 weeks ⏱️ from last signin; after that time, resignin is required.
Room id is formed by generating a random UUID and then using MD5 for hashing and setting room id in Redis with an expiration date of 5 hours.
This is shaping up to be a tiny MVC framework, interesting.
Path | What Should Do |
---|---|
/home |
Home page |
/signin |
signin page |
/# |
# page |
/signout |
Revocation of Cookies and Session |
/room/:id |
Room page |