Skip to content

A Django DRF project with chat server administration, integrating with a front-end framework React, and implementing essential features like authentication and chat functionality.

Notifications You must be signed in to change notification settings

chey97/django-drf-channels-react-project-Chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat Server Administration API with Front-End Integration

This project focuses on building a comprehensive chat server administration API using Django and Django REST Framework (DRF), and integrating it with a front-end built with React and Material-UI. Key features include chat services using Django Channels, token-based authentication, and a robust front-end interface.

Table of Contents

  1. Project Overview
  2. Features
  3. Prerequisites
  4. Installation
  5. Backend Setup
  6. Frontend Setup
  7. API Documentation
  8. Running the Project
  9. Project Structure
  10. Contributing
  11. License

Project Overview

This project aims to build a chat server administration API and integrate it with a front-end templating framework. It includes:

  • Building a chat server administration API.
  • Designing chat servers, models, and database tables.
  • Creating API endpoints and documentation.
  • Integrating with React and Material-UI.
  • Implementing chat services with Django Channels.
  • Authentication using djangorestframework-simplejwt.

Features

  • Chat Server Administration API: Create, update, delete, and manage chat servers.
  • API Documentation: Filter and retrieve server-related data through well-documented API endpoints.
  • Frontend Integration: React project setup with routing and Material-UI components.
  • API Integration: Using Axios for API requests and configuring CORS.
  • Chat Services: Real-time chat using Django Channels and WebSockets.
  • Authentication: Secure login and registration using JWT.

Prerequisites

  • Python 3.8+
  • Node.js 14+
  • npm or yarn
  • Django 3.2+
  • Django REST Framework
  • Django Channels
  • React 17+
  • Material-UI

Installation

Backend Setup

  1. Clone the repository:
   git clone https://github.com/yourusername/chat-server-admin.git
   cd chat-server-admin/backend
  1. Create and activate a virtual environment:
    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  1. Install the dependencies:
    pip install -r requirements.txt
  1. Apply migrations and create a superuser:
    python manage.py migrate
    python manage.py createsuperuser

API Documentation

API documentation is available at /api/docs/ once the Django server is running. It provides detailed information on available endpoints, parameters, and responses.

Running the Project

Start the Backend Server

    cd chat
    python manage.py runserver

Start the Frontend Server

In a new terminal, run:

    cd client
    npm start
    # or
    yarn start

The application should now be running on http://localhost:3000 for the frontend and http://localhost:8000 for the backend.

Project Structure

chat-server-admin/ ├── backend/ │ ├── chat/ │ ├── chat_admin/ │ ├── config/ │ └── ... ├── frontend/ │ ├── public/ │ ├── src/ │ │ ├── components/ │ │ ├── hooks/ │ │ ├── pages/ │ │ └── ... └── README.md

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or additions.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A Django DRF project with chat server administration, integrating with a front-end framework React, and implementing essential features like authentication and chat functionality.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published