rutrum / typesync-rust

Type lyrics and test your speed!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typesync...but in Rust!

Typesync is a web application in React with an api written in Python. This is a rewrite of both the front end and the api in Rust. This project leverages the seed, rocket, and diesel crates. I owe it to this tutorial for describing how I could design and implement a full stack Rust project.

Features Missing from Rewrite

There are still features in the original version of the site that need to be rewritten.

  • Use MySQL and not Sqlite3
  • Cache (artist, title) searches
  • Make the song data and the leaderboard data distinct API calls
  • Add styling, make it look pretty, format leaderboards, etc.
  • Add small song display on test page
  • Add progress bar on test page
  • Display default leaderboard when no results are available
  • Disallow user from starting song without selecting mode
  • Save current time at score submission using web-sys
  • Polish

Things to clean

  • Save an diesel-friendly way to save testmode to the database (not string)
  • Move DbScore to api workspace
  • Refactor it all
  • Move all song views into single module
  • 2 caches, map (title, artist) -> genius_id -> song
  • Centralize all links/domains/urls
  • Write a build script/docker compose

New features to add

This should be done only after completing the above, as it will be equivalent or better than the previous site at that point.

  • Host at rust.typesync.tech, or typesync.tech if I'm confident enough
  • Add most popular songs to home page
  • Add timed mode (how much of a song can you type in 1 minute, repeating the lyrics if necessary)
  • Add a bit more UX, many people don't know what the website done on entry (perhaps a message board for new ips?)
  • Routing, that is, the song summary of id 2 should be typesync.tech/song/2
  • A comprehensive leaderboard page, possibly with statistics and graphs
  • Record wpm alongside time for leaderboards

About

Type lyrics and test your speed!


Languages

Language:Rust 77.9%Language:SCSS 16.7%Language:Nix 2.3%Language:Just 2.1%Language:HTML 0.6%Language:RenderScript 0.4%