# Balalaika Lyrics api written in rust (school project). ## Setup ### Dependencies This project requires mariadb and cargo. ### Set up env Create a .env file and fill it using the env_example as a guide. ### Set up database To manage the database through the program's scripts use `cargo run-script` (installable through cargo with `cargo install cargo-run-script`). Available scripts: ``` db_create db_fast_populate db_start db_stop ``` The start/stop scripts assume that you're using systemd. If not, just start/stop the mariadb service manually. db_fast_populate is an alternative to populate the database without having to interact with Genius' api. You can still use the original method by executing ./scripts/populate.main.py with a python interpreter. ## Changes ### Single parameters only You can only search a parameter at a time. This is because Rust needs to process the sql queries ahead of time in order to make them safe to injection attacks. ### No music genres Skipped for the sake of simplicity ### Song titles renamed to "names" For the sake of making it easier to understand. ### API requests moved into a new scope To keep things organised, the main API requests have been moved to the /api scope. Routes such as /song are now /api/song. ### Authentication routes have been added In order to create/remove users and retrieve the tokens, a new scope has been created (/auth). ## TODO [X] - User / Password system, use user id to generate tokens [ ] - Add documentation (Utoipa)