claudio-giovanni / example-chat-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


img

Example Chat API

Code style: black

About The Project

Example chat API for sending messages from one user to another

Run App 🐳

  • Run application
    docker-compose up --build

  • Seed database
    docker exec -it example-chat-api_api_1 bash
    python manage.py seed_db

  • Navigate to http://localhost:5000/ for documentation

Run Tests βœ“

  • Install
    pip install -r requirements.txt
  • Run tests
    pytest

Tools πŸ› 

Documentation - Swagger πŸ—Ί

  • Run docker-compose up --build
  • Swagger docs containing sample requests and responses will be served at http://localhost:5000/

Enhancements

  • Document expected payloads in Swagger docs
  • Marshal request and response payloads
  • Leverage UUIDs instead of passing around primary_key INT IDs
  • Separate DB from API
  • Expand tests
  • Implement Auth
  • Leverage production ready WSGI server
  • Convert REST API to GraphQL for general requests
    • Leverage sockets for live updates on incoming messages

About


Languages

Language:Python 96.9%Language:Dockerfile 3.1%