A web messenger built with Django, featuring real-time messaging.
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.
- 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).
| 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) |
Requires Python 3.11+ and Redis.
-
Clone the repository and enter the project folder
git clone https://github.com/leo-proger/Messenger.git cd Messenger -
Create and activate a virtual environment
python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
Copy
.env.exampleto.env:cp .env.example .env
Generate a
SECRET_KEYand put it into.env:python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())" -
Start Redis on port 6379 (e.g. via Docker)
docker run -p 6379:6379 redis
-
Apply migrations
python manage.py makemigrations python manage.py migrate
-
Run the server
python manage.py runserver 8000
The app will be available at http://localhost:8000.
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
This project is licensed under the MIT License.
