Skip to content

Commit

Permalink
docs: package adding docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xnought committed Nov 15, 2023
1 parent c116c6c commit 8d9efbc
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
19 changes: 10 additions & 9 deletions docs/backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -27,8 +33,3 @@ sh run.sh hard_restart
sh run.sh test_backend
```

## Add packages

```bash
poetry add py_package_name
```
19 changes: 19 additions & 0 deletions docs/frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down

0 comments on commit 8d9efbc

Please sign in to comment.