From 8d9efbc111d136160c8f7fe555ed8d5c70276036 Mon Sep 17 00:00:00 2001 From: xnought Date: Tue, 14 Nov 2023 23:14:47 -0800 Subject: [PATCH] docs: package adding docs --- docs/backend.md | 19 ++++++++++--------- docs/frontend.md | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/docs/backend.md b/docs/backend.md index e181a890..d091c724 100644 --- a/docs/backend.md +++ b/docs/backend.md @@ -7,15 +7,21 @@ These docs go over the [`backend/`](../backend/) dir. Go to the [`database.md`]( Note that `print` is wonky on docker, so instead import `logging as log` and use `log.warn(stuff)` to print stuff to the console in docker. -## Docker Reset +## Add packages + +```bash +poetry add py_package_name +``` + +which adds the package locally (so your intellisense can detect it). -For a soft restart do +To have those packages also installed/reflected in the backend run ```bash -sh run.sh restart +sh run.sh install_backend ``` -for a hard cache clearing restart, do +or rebuild the entire docker (this method is slower, but guaranteed to work) with ```bash sh run.sh hard_restart @@ -27,8 +33,3 @@ sh run.sh hard_restart sh run.sh test_backend ``` -## Add packages - -```bash -poetry add py_package_name -``` diff --git a/docs/frontend.md b/docs/frontend.md index 0a0d547b..12d2f4a1 100644 --- a/docs/frontend.md +++ b/docs/frontend.md @@ -4,6 +4,11 @@ In [SvelteKit](https://kit.svelte.dev/) which uses the [Svelte](https://svelte.d Here are [tutorials](https://learn.svelte.dev/tutorial/welcome-to-svelte) if you are interested, you'll find it simpler than regular JavaScript and much faster than other frameworks like React. +## UI Styling + +Our frontend uses [Flowbite Svelte Components](https://flowbite-svelte.com/) and [Tailwind CSS](https://tailwindcss.com/), although feel free to use native CSS. + +Check out Flowbite to use those ready-made svelte components (like buttons, dropdowns, tooltips, cards, and more). ## Add packages @@ -12,6 +17,20 @@ cd frontend yarn add js_package_name ``` +which adds the package locally (so your intellisense can detect it). + +To have those packages also installed/reflected in the backend run + +```bash +sh run.sh install_frontend +``` + +or rebuild the entire docker (this method is slower, but guaranteed to work) with + +```bash +sh run.sh hard_restart +``` + ## Access to Backend Functions You can create functions in the [`backend/server.py`](../backend/server.py) and import them into the frontend.