mleonhard/systeminit-coding-assessment-sde3

An ephemeral bulletin board web app. This is my implementation of https://github.com/systeminit/coding-assessment-sde3.

It uses:

  • Rust
  • Beatrice web server library. I made it. It uses async Rust and runs your non-async request handlers on a threadpool. It gives you the scalability of async without having to write any async code.
  • Safina async runtime. I made it. I made Safina to see if it was possible to write a Rust async runtime with forbid(unsafe_code). I learned a lot about Rust and async Rust while writing it.
  • TypeScript
  • Vue.js
  • TailwindCSS

How to Use

  1. Install Rust and NodeJS.
  2. Download frontend dependencies:
    $ npm install
    
  3. Start the server:
    $ ./build-and-run.sh
    
  4. Connect to the server with a web browser: http://localhost:8000/
  5. Enter a message in the box and tap the "Add" button.
  6. Refresh the page to see new messages from other users.

Screenshots

A browser window showing Ephemeral Bulletin Board app with some messages

A browser window showing Ephemeral Bulletin Board app showing an error message

Development

Vue's dev server does not support hot-reload with Typescript. To see your changes, press CTRL-C to stop the server, run build-and-run.sh again, and refresh the page.

Testing

Run the server tests:

$ cargo test

TO DO

  • Show an activity indicator while loading or adding a message.
  • Focus the message box after user presses the Add Message button.
  • Stop sanitizing output since Vue seems to do that automatically.
  • Poll for new messages.
  • Store messages in a database
  • Measure test coverage
  • Test the frontend with end-to-end tests.
  • Test MessageListModel
  • Test doRpc() which contains some complicated logic. Or find a good library to use instead.