Coder Social home page Coder Social logo

manmolecular / websocket-chat Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 29 KB

:mega: WebSocket chat based on the AIOHTTP library (JWT+JTI Revoke, Redis, PostgreSQL, AIOHTTP Web Server)

License: GNU General Public License v3.0

Python 57.37% JavaScript 15.54% HTML 15.16% Dockerfile 1.22% Shell 10.71%
websockets aiohttp aiohttp-csrf aiohttp-server redis-cache jwt jti jwt-revocation jwt-redis docker

websocket-chat's Introduction

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/

websocket-chat's People

Contributors

manmolecular avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

websocket-chat's Issues

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.