Discord-like chat app made with FastAPI, MongoDB, tailwind and Vanilla JS. For fun project to mainly develop my back-end skills.
- JWT authentication
- WebSockets
- Real-time messaging
- User info
- Basic CRUD operations
- Updating and deleting messages
- Pfps
- Refactor spaghetti JS code / Vue maybe
- Sending files in chat
- FastAPI routers
- Learn Mongo properly / whole db.py refactor
Passwords are stored as salted bcrypt hashes.
userWithHashedPW.update({'_id' : user_id,'password' : bcrypt.hashpw(password, bcrypt.gensalt())})
For JWTs i went with HS256.
SECRET_KEY = "00e8811e86e78cff2c3ab2a4a1a74718562fd9c00bfc64433ed173f4b4daf6ba"
If this project ever sees light of the internet THIS IS GOING TO BE CHANGED !
Install dependencies
npm install
pip install -r requirements.txt
Start the server
uvicorn main:app