Code Monkey home page Code Monkey logo

django-easy-messagebox's Introduction

Django Chat Application

This is a simple chat application built using Django for the backend and JavaScript for the frontend. It allows users to send and view messages in a chatbox.

Table of Contents

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Python 3.7 or higher installed on your system.
  • Django installed (pip install Django).
  • Basic understanding of Django, JavaScript, and APIs.

Getting Started

Clone this repository to your local machine:

git clone https://github.com/your-username/django-chat-application.git

## Project Structure

chat-application/
│
├── chatbox_project/
│   ├── chat/
│   │   ├── __init__.py
│   │   ├── admin.py
│   │   ├── apps.py
│   │   ├── migrations/
│   │   ├── models.py
│   │   ├── tests.py
│   │   ├── urls.py
│   │   └── views.py
│   ├── __init__.py
│   ├── asgi.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
│
│
├── .gitignore
├── manage.py
├── README.md
└── requirements.txt

chatbox_project/: Django project directory.
chat/: Django app directory containing models, views, and URLs.
static/: Directory for static files (CSS, JavaScript).
templates/: Directory for HTML templates.
.gitignore: Git ignore file.
manage.py: Django management script.
README.md: This documentation file.

## Setting up the Django Backend

1)  python -m venv venv
	source venv/bin/activate

2) pip install -r requirements.txt

	2.1) set in .env file the DJANGO_PRODUCTION variable (false to use sqlite locally or true to use AWS). For AWS, configure in settings.py file the accesses to the database.

3) python manage.py migrate

4) python manage.py createsuperuser (step optional)

5) python manage.py runserver

## Running the Application

Access the chat application in your web browser at http://localhost:8000/.
Log in using the admin superuser credentials to access the Django admin panel at http://localhost:8000/admin/ (optional).

## Design Decisions

Backend: The backend of this chat application is built with Django, which provides a robust and secure framework for handling data storage and API endpoints. Django's ORM is used to define the database models for storing chat messages.

Frontend: The frontend is developed using HTML, CSS, and JavaScript. JavaScript is used to handle user interactions and real-time messaging. Messages are sent and received via API endpoints defined in Django views.

Database: By default, this application uses SQLite as the database for simplicity. For production use, you can configure other databases like PostgreSQL or MySQL in the Django settings.

Real-Time Messaging: Real-time messaging is not implemented in this basic version, but you can enhance it by integrating WebSockets or other real-time technologies.

Styling: Minimal styling is provided in the style.css file. You can customize the CSS to match your design preferences.

django-easy-messagebox's People

Contributors

charles0830 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.