Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/centrifugal/grand-chat-tutorial
Source code for Centrifugo grand tutorial – Building WebSocket chat/messenger application from scratch. See the tutorial here - https://centrifugal.dev/docs/tutorial/intro
https://github.com/centrifugal/grand-chat-tutorial
chat django instant-messaging messenger react scalability tutorial websocket
Last synced: 4 days ago
JSON representation
Source code for Centrifugo grand tutorial – Building WebSocket chat/messenger application from scratch. See the tutorial here - https://centrifugal.dev/docs/tutorial/intro
- Host: GitHub
- URL: https://github.com/centrifugal/grand-chat-tutorial
- Owner: centrifugal
- License: mit
- Created: 2023-12-06T10:13:26.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-08-29T05:37:42.000Z (3 months ago)
- Last Synced: 2024-08-29T06:39:35.381Z (3 months ago)
- Topics: chat, django, instant-messaging, messenger, react, scalability, tutorial, websocket
- Language: Python
- Homepage:
- Size: 647 KB
- Stars: 25
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Django + React + Centrifugo chat (instant messenger) application
This is a source code for [Centrifugo Chat/Messenger Tutorial](https://centrifugal.dev/docs/tutorial/intro).
## Running locally
You need Docker with Docker Compose. First, run the app:
```sh
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?):
```sh
docker compose exec backend python manage.py createsuperuser
```Then go to [http://localhost:9000/admin](http://localhost:9000/admin), use admin user credentials to login and create several rooms. Alternatively, you can open Django shell:
```sh
docker compose exec backend python manage.py shell
```And then inside Django shell:
```python
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](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](grandchat.png?raw=true "Image of app")