You should create web chat server and console or web client.
Server should provice 2 intarfaces for the data:
- Flask API - to make API requests (get data, create chat and etc)
- SocketIO - socket to recieve/send realtime messages at the chat
Functions:
- get list of all chats
- create chat
- join chat
- leave chat
- get messages of specific chat (using cursor pagination - max 20 on the page)
- write a message
- block user
- unblock user
- get list of blocked users
- group admin can ban and kick user from the cannel (he can't more write and join to the cannel)
Models can be modified if need
username: Unique
name: Unique admin: User
- has many chat users
- has many messages
- chat_room_name
- text
- created_at
you may block another one user - then you shouldn't show blocked user's messages at any chats for your user, but still show them for the others
docker image: Linix Alpine
docker-compose to start server and database
DB: PostgreSQL 9+
Runtime: Python 3.5
Makefile to run and test
Flask
SQLAlchemy
alembic
dotenv
SocketIO
pylint - code style check