https://www.youtube.com/watch?v=Oc4Rao38HPk
The ER diagram can be found here: er.png
All the sql queries used by the webapp are in api/index.ts
The schema of the tables, and the rationale behind the design can be fouund in sql/user.sql
An sql dump of the schema of the tables and the data it had can be found in dump.sql.
dummy-data/ has all the files that were used to populate the tables. unprocessedData.json was taken from https://github.com/alexa/Topical-Chat.
Analytics: See file api/analytics.ts. The /analytics
path has the
following data:
- The longest messages and their length.
- The most active hours.
- Users who send the most messages.
Note: You must be an admin to access the /analytics
path. The default username and password in the
sql dump is:
username: admin
password: admin
Apart from this, when messages are retrieved, complex queries are used to retrive them and sort them, as highlighted in the presentation video.
Faceted search: See file Components/SearchPanel.tsx and for the backend see api/index.ts - line 39
The other requirements are pretty obvious.
After cloning the repository, run the following commands
npm install
Change the cookie secret in the .env
file to a random string. To import the tables and the data
shown in the demo, dump.sql
has all the schemas, as well as the data to along with it. To import
it to a database called test
run the following command from the root of this repository:
mariadb test < dump.sql
To run the webapp in dev mode: npm run dev
To build the webapp in production mode it has to be built first:
npm run build
To run the production build on a specific port, pass PORT
as en environment vairable:
PORT=3000 npm run start
Note: the default password of all the users is qwerty1234
.
A simple messaging webapp that can be used to:
- Create an account and log in
- Message other users
- Reply to a particular message
- Edit a message
- Delete a message
- Delete a chat
- Create a group
- Add members to a group
- Send/edit/edit a group message
- Delete a group
- Change username