From 1902acda9a6f8be8f405a507e20d3f8c9573025b Mon Sep 17 00:00:00 2001 From: Erin Nova Date: Sat, 24 Jul 2021 16:48:52 +0000 Subject: [PATCH] Add 'Chat Documentation' --- Chat-Documentation.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Chat-Documentation.md diff --git a/Chat-Documentation.md b/Chat-Documentation.md new file mode 100644 index 0000000..32caef7 --- /dev/null +++ b/Chat-Documentation.md @@ -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. \ No newline at end of file