https://github.com/manmolecular/websocket-chat
:mega: WebSocket chat based on the AIOHTTP library (JWT+JTI Revoke, Redis, PostgreSQL, AIOHTTP Web Server)
https://github.com/manmolecular/websocket-chat
aiohttp aiohttp-csrf aiohttp-server docker docker-compose jti jwt jwt-redis jwt-revocation redis-cache websockets
Last synced: 16 days ago
JSON representation
:mega: WebSocket chat based on the AIOHTTP library (JWT+JTI Revoke, Redis, PostgreSQL, AIOHTTP Web Server)
- Host: GitHub
- URL: https://github.com/manmolecular/websocket-chat
- Owner: manmolecular
- License: gpl-3.0
- Created: 2020-09-26T18:40:56.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-04T18:32:15.000Z (over 5 years ago)
- Last Synced: 2025-08-10T08:49:35.785Z (9 months ago)
- Topics: aiohttp, aiohttp-csrf, aiohttp-server, docker, docker-compose, jti, jwt, jwt-redis, jwt-revocation, redis-cache, websockets
- Language: Python
- Homepage:
- Size: 28.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# websocket-chat
Simple WebSocket chat based on the aiohttp library
## Stack
- Auth: JWT + JTI (JWT id)
- Cache: Redis
- Database: PostgreSQL
- ORM: SQLAlchemy
- Backend: Aiohttp
- Frontend: Pure JS + Bootstrap
- Language: Python 3.8
- Deploy: Docker + docker-compose
- Additional: CSRF with aiohttp
## Features
- Credentials validation (schemas, register/login handlers)
- Passwords (hashing, argon2)
- ORM data sanitization (CRUD operations, models)
- JWT + JTI with revocation (cache, redis)
- JavaScript JWT in-memory closure storage
- WebSockets: origin, auth, CSWSH
- CSRF (feedback handler)
## Prepare
(Optional) Сreate `.env` file with the following variables if you want to overwrite default `docker-compose.yml` environment variables:
```
POSTGRES_DATABASE=...
POSTGRES_PASSWORD=...
POSTGRES_USER=...
POSTGRES_HOST=...
POSTGRES_PORT=...
REDIS_HOST=...
JWT_SECRET=...
ORIGIN=...
```
## Run
```
docker-compose up -d
```
```
http://localhost:8080/
```