A simple chat server for maya's stream.
 
 
 
 
 
Go to file
~erin a7606709f8
Update readme with to-do checklist
2021-07-17 15:52:52 -04:00
src Add support for custom pronouns 2021-07-17 15:52:30 -04:00
.gitignore Initialize repo with basic functionality 2021-07-16 10:55:07 -04:00
Cargo.lock Add setup for chat core, add proper logging 2021-07-17 14:45:52 -04:00
Cargo.toml Add setup for chat core, add proper logging 2021-07-17 14:45:52 -04:00
README.md Update readme with to-do checklist 2021-07-17 15:52:52 -04:00

README.md

Chat Registration System

The basic backend code needed to register & login to a chat system (to be built). Send it the unhashed username and pin, and it'll store it in the users.json file with the pin hashed with SHA1.

API Documentation

POST /api/register/<name>/<pin> Register the username with the pin provided if it doesn't already exist

GET /api/users/<name> Check if the user exists

GET /api/users/<name>/<pin> Check if the user exists, and if the pin provided matches

POST /api/users/change/<name>/<pin>/<new-name>/<new-pin> Change a users pin/name

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.

To-Do:

  • Basic auth api
  • Basic messaging system
  • Token generation & storage
  • Pronouns