Skip to content

domwst/scrum-poker

Repository files navigation

Scrum poker

Logo

While practicing scrum we've noticed there are nearly none free online scrum poker tools. Now there is at least one.

If you'd like to play scrum poker right away, it's available at poker.kek.today.

Development

Not sure why would you like to do this, but if you do, here is how you can build and run this service locally:

  1. Install the latest rust toolchain

  2. Install cargo-leptos to build the project:

    cargo install cargo-leptos
  3. Install some npm stuff:

    npm install -D tailwindcss
    npm install -D daisyui@latest

    If you're using linux and can't get current npm version, you should probably take a look here (seriously, I don't know, how TF are you supposed to find that out)

  4. Build:

    cargo leptos build
  5. Start the server:

    cargo leptos serve
  6. 🪄 You are awesome

Or you could have a look at the ci container setup.

Troubleshooting

If this project doesn't build properly and there is word "nightly" somewhere in the compiler's output, this probably means that your compiler did't have a look at the rust-toolchain.yaml, run the following command:

rustup default nightly

If is says somethig about wasm or webassembly, try to run the following command:

rustup target add wasm32-unknown-unknown

Tech stack

You might've noticed that this poker is blazingly fast, that's all due to a fact, that it's written purely in rust (yes, even the frontend).

Key libraries/frameworks are:

Communication is done via websockets and leptos server functions (which in turn are plain HTTP GET/POST requests).

Running on a remote server

From sources

  1. Compile the server in release mode:

    cargo leptos build --release
  2. Copy the binary from target/release/scrum-poker

  3. Copy static stuff from target/site

Your folder structure should look like this:

scrum-poker
site/

In order to run the server, you have to provide it with these environment variables:

LEPTOS_OUTPUT_NAME="scrum-poker"
LEPTOS_SITE_ROOT="site"
LEPTOS_SITE_PKG_DIR="pkg"
LEPTOS_SITE_ADDR="0.0.0.0:3000"
LEPTOS_RELOAD_PORT="3001"

Or have a look at the container setup in the Dockerfile.

From docker image

docker run -d -p 3000:3000 --name scrum-poker domwst/scrum-poker

From an educational standpoint

Websockets

There are not a lot of examples on websockets usage in axum and leptos, I think this project can somehow fill the niche. Some key places to look at:

Leptos + Axum

If you want to learn how to make leptos and axum play together, please reffer to official template from which this project was derived.

Project structure and development patterns

Please do not learn these concepts from this project, at the moment it's poorly structured and probably implements some of the components not in a way they should be implemented. It's good enough to get the job done but I don't beleive one should learn how to structure web-applications from this repository.

Btw did I mention it's written in rust?

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published