From 5891af7e8c1411029fe1ad9c6d3182f88bcf3dfd Mon Sep 17 00:00:00 2001 From: niliara-edu Date: Sun, 26 Jan 2025 12:55:13 +0100 Subject: comment and update information --- README.md | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 08f887b..4edf304 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,21 @@ # Balalaika -School project of a lyrics game site. +Lyrics api written in rust (school project). -## Set up env -Create a .env file and fill using env_example as a guide. +## Setup +### Dependencies +This project requires mariadb and cargo. -## Set up database +### 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` - -You can install the app with -`cargo install cargo-run-script` +(installable through cargo with `cargo install cargo-run-script`). Available scripts: ``` db_create -db_populate db_fast_populate db_start db_stop @@ -23,15 +24,32 @@ 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 a non-tested experimental alternative that -attempts to use a backup sql file to create the database. +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 +### 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 -[ ] - User / Password system, use user id to generate tokens +[X] - User / Password system, use user id to generate tokens [ ] - Add documentation (Utoipa) -- cgit v1.2.3