Skip to content

My first ever attempt to create something, learning along the way.

Notifications You must be signed in to change notification settings

Breehze/SanctumChat_deprecated

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sanctum Chat

Discord-like chat app made with FastAPI, MongoDB, tailwind and Vanilla JS. For fun project to mainly develop my back-end skills.

Features

  • JWT authentication
  • WebSockets
    • Real-time messaging
    • User info
  • Basic CRUD operations
    • Updating and deleting messages
    • Pfps

Future updates

  • Refactor spaghetti JS code / Vue maybe
  • Sending files in chat
  • FastAPI routers
  • Learn Mongo properly / whole db.py refactor

Security

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 !

Run Locally

Install dependencies

  npm install
  pip install -r requirements.txt

Start the server

  uvicorn main:app

About

My first ever attempt to create something, learning along the way.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published