Skip to content

tyyrok/django_chat_boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Chat Boilerplate (Websockets)

This boilerplate is made to test Django Channels for chat application, also it can be used as template for any websocket Django app. The code is deeply inspired and based on /justdjango/django_chat (big thanks guys!). You can find more info about source and a great step-by-step instruction here.

This code is not ready for production purposes from the box.

App consists off:

  • Django backend server (protocol server Daphne, Redis for Channels Layers)
  • Simple React frontend for testing

Setting up for development

  • Install requirements - python pip install -r requirements.txt
  • Build Redis docker image - docker-compose -f docker-compose.dev.yml build
  • Migrate Django db - python manage.py makemigrations && pythone manage.py migrate
  • Add React components: npm install

Basic Commands

  1. Create django users for testing - python manage.py createsuperuser. I advise creating second (or more) user through admin panel
  2. Start Redis - docker-compose -f docker-compose.dev.yml up
  3. Start backend server - python manage.py runserver
  4. Start frontend - npm run start
  5. Now you can go to http://localhost:3000 and test boilerplate

Features

  1. Private chats
  2. Group chats
  3. Notifications about unread messages, new messages, user join, user add to group chat

Screenshot

alt text

About

Boilerplate for Django chats based on Websockets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published