# Hacking guide ## Required tools - [tailwind-cli](https://tailwindcss.com/docs/installation/tailwind-cli) - [templ](https://templ.guide/quick-start/installation) - [minify](https://github.com/tdewolff/minify) - [redis](https://redis.io/) ## Running yōten To authenticate, you will need OAUTH JWKs to be setup: ```bash export SHELF_OAUTH_CLIENT_KID="$(date +%s)" export SHELF_OAUTH_CLIENT_SECRET="$(goat key generate -t P-256 | grep -A1 "Secret Key" | tail -n1 | awk '{print $1}')" ``` You will need to fetch a series of static assets yōten depends on: ```bash mkdir -p ./static/files # HTMX curl -sLo ./static/files/htmx.min.js https://cdn.jsdelivr.net/npm/htmx.org@2.0.6/dist/htmx.min.js # Lucide (icons) curl -sLo ./static/files/lucide.min.js https://unpkg.com/lucide@0.525.0/dist/umd/lucide.min.js # AlpineJS curl -sLo ./static/files/alpinejs.min.js https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js # Toast components curl -sLo ./static/files/htmx-toaster.min.js https://unpkg.com/htmx-toaster@0.0.20/dist/htmx-toaster.min.js ``` You will need to start a redis instance - using docker can simplify this process greatly: ```bash docker run -d --name yoten-redis -p 6379:6379 redis:latest ``` To run: ```bash YOTEN_DEV=true go run cmd/server/main.go ``` If you modified the views, you will need to regenerate them: ```bash go tool templ generate go tool templ fmt ./internal/server/views/ ``` If you modified the tailwind styles, you will need to regenerate the css: ```bash tailwindcss -i ./input.css -o ./static/files/style.css ``` If you modified the js files, you will need to regenerate the minified versions: ```bash minify static/*.js -o static/files/ ```