Add 'Chat Documentation'

master
~erin 2021-07-24 16:48:52 +00:00
parent b2f3275bb8
commit 1902acda9a
1 changed files with 19 additions and 0 deletions

19
Chat-Documentation.md Normal file

@ -0,0 +1,19 @@
# Chat Documentation
## API Documentation
`POST /api/message/send` Post a message with JSON body values of: `name` & `body`
Will return JSON with `status` and `reason`.
`GET /api/message/messages.json` Returns a json file of all the messages
## Chat Planning
Clientside js will register & check login of users, if login is correct will ask for a random token.
Backend will generate token, store it, and then send it to the client to set as a cookie.
Whenever user sends a message, client will send message & token and backend will check if token matches.
Chat backend is going to switch from json to websockets as described in [issue#3](https://git.lavender.software/erin/lila-chat/issues/3).
Frontend should also eventually [display pronouns](https://git.lavender.software/erin/lila-chat/issues/4), display user roles, show commands differently from regular text, and *possibly* have emote support too.