Skip to content

Full-stack private chatting application built using Django, Django Channels, and SvelteKit

License

Notifications You must be signed in to change notification settings

infosrabah/chatting

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chatting

chatting is a full-stack private chatting application which uses modern technologies such as PythonDjango and Django channels — and TypeScript/JavaScriptSvelteKit. Its real-time feature utilizes WebSocket.

recording.mp4

chatting has backend and frontend directories. Contrary to its name, backend is a classic full-fledged application, not only backend code. Though not refined yet, you can chat and enjoy real-time conversations there as well. frontend does what it implies. It houses all user-facing codes, written using SvelteKit and TypeScript.

Run locally

To locally run the app, clone this repository and then open two terminals. In one terminal, change directory to backend and in the other, to frontend. For the frontend terminal, you can run the development server using npm run dev:

╭─[Johns-MacBook-Pro] as sirneij in ~/Documents/Devs/chatting/frontend using node v18.11.0                                21:37:36
╰──➤ npm run dev

In the backend terminal, create and activate a virtual environment, on Linux and MacOS:

╭─ sirneij in ~/Documents/Devs/chatting/backend on (main)✘✘✘           22:18:38
╰─(ノ˚Д˚)ノ virtualenv virtualenv && source virtualenv/bin/activate

Then, install the project's dependencies:

╭─ sirneij in ~/Documents/Devs/chatting/backend on (main)✘✘✘           22:18:38
╰─(ノ˚Д˚)ノ (virtualenv) pip install -r requirements.txt

After that, migrate the app's models:

╭─ sirneij in ~/Documents/Devs/chatting/backend on (main)✘✘✘           22:18:38
╰─(ノ˚Д˚)ノ (virtualenv) python manage.py migrate

You can create a superuser and go on to the app's admin page to create users or, to ease the stress, I wrote a small script that uses faker to create five(5) users at a go. To use the script, do:

╭─ sirneij in ~/Documents/Devs/chatting/backend on (main)✘✘✘           22:18:38
╰─(ノ˚Д˚)ノ (virtualenv) python manage.py shell < chat/make_fake_users.py

You can now run the server and enjoy.

╭─ sirneij in ~/Documents/Devs/chatting/backend on (main)✘✘✘           22:18:38
╰─(ノ˚Д˚)ノ (virtualenv) python manage.py runserver

About

Full-stack private chatting application built using Django, Django Channels, and SvelteKit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 43.7%
  • Svelte 18.9%
  • TypeScript 13.3%
  • HTML 11.8%
  • JavaScript 11.5%
  • CSS 0.8%