Communication system for education
Slack for education
npm install
npm run dev
npm run build
npm run deploy
Model | Content | Sub | detail |
---|---|---|---|
users | id | uuid |
_ |
_ | name | string |
_ |
_ | string |
_ | |
_ | password | securely stored by firebase |
_ |
_ | classes | id | reference classes/:class |
_ | _ | name | string |
_ | _ | school | string |
_ | _ | threads | reference threads/:thread |
_ | _ | string name |
|
_ | _ | boolean notify |
|
classes | id | uuid |
_ |
_ | key | string (short id for joining and other things) |
_ |
_ | title | string |
_ |
_ | school | reference opt (id, name) |
_ |
_ | users | reference | fk users/:user |
_ | _ | name | string |
_ | threads | reference | fk threads/:thread |
_ | _ | title | string |
schools | id | uuid |
_ |
_ | name | string |
_ |
threads | id | uuid |
_ |
_ | name | string |
_ |
_ | participants | reference | reference users/:user |
_ | _ | name | string |
_ | messages | id | uuid |
_ | _ | to | reference {{users_or_threads}}/:user_or_thread |
_ | _ | string name |
|
_ | _ | string type ('user' / 'thread' ) |
|
_ | _ | from | reference :id (of user) |
_ | _ | type | string :text / :snippet / :file |
_ | _ | subtype | string if type = snippet: :javascript / :python / :html / :latex / :css |
_ | _ | ↑ | if type = file: :gdoc / :gsheet / :gslide / :txt / :pdf / :image |
_ | _ | comment | string (only if subtype = snippet) |
_ | _ | content | string content of message or url of file |
-
user signs up: using firebase auth, email and password / fb / google
-
user login: using firebase auth
-
user logout:
-
using firebase auth, email and password / fb / google
-
receiving a magic link to their email and using firebase auth with custom token over cloud functions.
-
-
user creates class:
- save in classes collection
- join the user to the class
-
user joins class:
- save to users/:user.id/classes
- join general thread
- send message with sender='system' saying that :user joined
-
user unjoins class:
- delete from users/:user.id/classes
- delete from threads/participants/
-
user creates thread:
- save to classes/threads
- join the user to the thread
-
user joins thread:
- save to users/:user.id/classes/:class/threads
- save to threads/:thread/participants
- send message with sender='system' saying that :user joined
-
user unjoins thread:
- delete from threads/:thread/participants
- delete from users/:user/classes/:class/threads/:thread
- send message with sender='system' saying that :user left
-
user mutes thread: TBD
- user sends message:
- save in threads/:thread/messages
- send notification to threads/:thread/participants