Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

sourav-py/texter_backend

Open more actions menu

Repository files navigation

texter (back-end)

📃 Introduction

This Django project serves as the backend infrastructure for Texter, a web-sockets based chat application. Seamlessly managing backend processes, this project ensures efficient communication and data handling for a robust chat experience.

Following features are leveraged for the application with this project:

  • SMS OTP based authentication (token auth.)
  • Web sockets client/server communication
  • Managing messages, users, chatrooms and other data.
  • Exposing end-points to fetch users' data, messages data, chatrooms data etc.

⚡⚡ Tech Stack

Database design

db_design

APIs

Authentication

  • /auth/user/
  • /auth/sendotp/
  • /auth/verifyotp/
  • /auth/updateprofile/
  • /auth/activitystatus/
  • /auth/fetchuser/
  • /auth/logout/

Chat

  • /chat/participation/
  • /chat/chatrooms/
  • /chat/messages/

🔒 Authentication

Token based authentication flow is implemented with this project where a cookie set on user's browser after succesful verification of users' phone number. Overall flow for the authentication process is as follows:

  • User enters their phone number
  • A verification code is sent to their number (Twilio)
  • User enters the otp
  • Back-end verifies the otp, sets a cookie in the response object and sends the response to the client (user's browser)

🔌 Web-Sockets

📦 Setup

  • Clone the repository
  • Install the dependencies pip3 install requirements.txt
  • Run the redis server docker run -p 6379:6379 -d redis:5
  • Run the django server python3 manage.py runserver

🔧 Issues

🔜 Future developments

About

Django codebase for the back-end of web-sockets based chat application - 'texter'.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.