Skip to content

Source code for Centrifugo grand tutorial – Building WebSocket chat/messenger application from scratch. See the tutorial here - https://centrifugal.dev/docs/tutorial/intro

License

Notifications You must be signed in to change notification settings

centrifugal/grand-chat-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django + React + Centrifugo chat (instant messenger) application

This is a source code for Centrifugo Chat/Messenger Tutorial.

Running locally

You need Docker with Docker Compose. First, run the app:

docker compose up

After containers started for the first time, from another terminal window (you must be in the repo root) create admin user (or better two since you want to try chatting, right?):

docker compose exec backend python manage.py createsuperuser

Then go to http://localhost:9000/admin, use admin user credentials to login and create several rooms. Alternatively, you can open Django shell:

docker compose exec backend python manage.py shell

And then inside Django shell:

from app.utils import setup_dev
setup_dev()

Running setup_dev function will create 100k users and then 4 rooms with different number of members (100, 1k, 10k, 100k).

Then go to http://localhost:9000 and enjoy the working app! Login using second user (from incognito tab to not logout the first one session, or simply use different browser/device) to see the real-time in action.

demo

About

Source code for Centrifugo grand tutorial – Building WebSocket chat/messenger application from scratch. See the tutorial here - https://centrifugal.dev/docs/tutorial/intro

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published