Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’¬ Messenger

A web messenger built with Django, featuring real-time messaging.

Python 3.11 Django 4.2 Django Channels Redis Bootstrap 5 WebSocket MIT License

I wrote this project when I was 13 β€” entirely on my own, without any AI Agent. The code is a learning project and naive in places, but it works "live" over WebSocket.

The project is unfinished and won't be developed further β€” it stays here as a keepsake and an example.


Screenshots

Messenger β€” chat interface

Features

  • Real-time messaging β€” delivered over WebSocket (Django Channels + Redis), no page reloads.
  • Online status β€” track user presence and last-seen time.
  • Unread messages β€” indicators for new messages in chats.
  • User profiles β€” avatar, bio, city, age, phone number.
  • Email authentication β€” custom user model instead of the default one.
  • Posts β€” publish text and images on a profile.
  • Profile editing (work in progress).

Tech Stack

Category Technologies
Backend Python 3.11, Django 4.2
Real-time Django Channels, channels-redis, Daphne (ASGI), Redis
Frontend Django Templates, Bootstrap 5, Font Awesome
Database SQLite (default)
Media & utils Pillow, django-resized, django-phonenumber-field
Configuration python-decouple (.env)

Getting Started

Requires Python 3.11+ and Redis.

  1. Clone the repository and enter the project folder

    git clone https://github.com/leo-proger/Messenger.git
    cd Messenger
  2. Create and activate a virtual environment

    python -m venv .venv
    source .venv/bin/activate   # Windows: .venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Configure environment variables

    Copy .env.example to .env:

    cp .env.example .env

    Generate a SECRET_KEY and put it into .env:

    python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
  5. Start Redis on port 6379 (e.g. via Docker)

    docker run -p 6379:6379 redis
  6. Apply migrations

    python manage.py makemigrations
    python manage.py migrate
  7. Run the server

    python manage.py runserver 8000

    The app will be available at http://localhost:8000.

Project Structure

Messenger/
β”œβ”€β”€ app/        # Project configuration (settings, asgi, routing, urls)
β”œβ”€β”€ chats/      # Chats and messages: models, WebSocket consumers, signals
β”œβ”€β”€ users/      # Users, profiles, posts, online status
β”œβ”€β”€ templates/  # HTML templates (Bootstrap 5)
β”œβ”€β”€ static/     # Static assets: CSS, JS, images
└── media/      # User-uploaded files

License

This project is licensed under the MIT License.

About

πŸ’¬ A web messenger built with Django β€” real-time messaging (Channels + Redis). Written at age 13 without neural networks.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages