From 9d87428517616cc16919904449901eed17998607 Mon Sep 17 00:00:00 2001 From: Petitminion Date: Sun, 7 Jul 2024 14:41:21 +0200 Subject: [PATCH] Add troi frontend spec --- docs/specs/troi-frontend/index.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docs/specs/troi-frontend/index.md diff --git a/docs/specs/troi-frontend/index.md b/docs/specs/troi-frontend/index.md new file mode 100644 index 000000000..d8f4ce880 --- /dev/null +++ b/docs/specs/troi-frontend/index.md @@ -0,0 +1,23 @@ +# Troi Frontend + +## The issue + +We have troi implemented in the backend. We need a way for user to use the radio through the ui. The troi radio takes a patch name and a list of argument for this patch. But this can change a lot depending on the troi version and maintaining this manually could cost a lot of efforts. + +## Proposed solution + +Gather the list of available patch and the description theirs arguments from troi dyanmically. Diplay them in the UI, allowing the users to generate their own radios for any troi version. + +On top of this add two built-in troi radio using periodic-jam patch : +- One in the "Explore" section with this arguments : {"type": "weekly-exploration", "jam_date": "today"} +- One in the "My library" section with this arguments : {"type": "daily-jams", "jam_date": "today"} + +## Feature behavior + +### Frontend +Add a new division in `/library/radios/build` for building troi radios. +It should containt a list of avalainle patchs. When a patch is selected, a list of arguments should be displayed + +### Backend +Add a new Troi radio endpoint GET `/api/v1/radios/radios/troi/`. Should return a dict containing the list of patchs and related arguments : +`[{"patch": "daily-jams", "patch_argument": "patch_arguement_value"}]` \ No newline at end of file