Our great sponsors
-
chatting
Full-stack private chatting application built using Django, Django Channels, and SvelteKit (by Sirneij)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
As a first step, create a folder, mine was chatting, that will house the entire project, both frontend and backend. Then, change directory into the newly created folder and create a sub-folder to house the app's backend. I called mine backend. Following that, make and activate a virtual environment and then install django and channels. Thereafter, create a django project. I used chattingbackend as my project's name. Include channels or daphne in your project's setting's INSTALLED_APPS. Ensure you create a new app, I used chat as app's name, and include it there as well. Don't forget to install and link corsheaders so that frontend requests will be accepted by our backend server. See updated settings.py file. Channels uses asgi and as a result, we must set it up. Make your chattingbackend/asgi.py look like:
Python(v3.10), Django(v4.1.2) and Channels(v4.0.0) at the Backend;
SvelteKit(v1.0.1), Bootstrap(v5) and Fontawesome(v6.2.0) at the frontend.
SvelteKit(v1.0.1), Bootstrap(v5) and Fontawesome(v6.2.0) at the frontend.