Yōten: A social tracker for your language learning journey built on the atproto.
at master 56 lines 1.7 kB view raw view rendered
1# Hacking guide 2 3## Required tools 4- [tailwind-cli](https://tailwindcss.com/docs/installation/tailwind-cli) 5- [templ](https://templ.guide/quick-start/installation) 6- [minify](https://github.com/tdewolff/minify) 7- [redis](https://redis.io/) 8 9## Running yōten 10 11To authenticate, you will need OAUTH JWKs to be setup: 12```bash 13export SHELF_OAUTH_CLIENT_KID="$(date +%s)" 14export SHELF_OAUTH_CLIENT_SECRET="$(goat key generate -t P-256 | grep -A1 "Secret Key" | tail -n1 | awk '{print $1}')" 15``` 16 17You will need to fetch a series of static assets yōten depends on: 18```bash 19mkdir -p ./static/files 20 21# HTMX 22curl -sLo ./static/files/htmx.min.js https://cdn.jsdelivr.net/npm/htmx.org@2.0.6/dist/htmx.min.js 23# Lucide (icons) 24curl -sLo ./static/files/lucide.min.js https://unpkg.com/lucide@0.525.0/dist/umd/lucide.min.js 25# AlpineJS 26curl -sLo ./static/files/alpinejs.min.js https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js 27# Toast components 28curl -sLo ./static/files/htmx-toaster.min.js https://unpkg.com/htmx-toaster@0.0.20/dist/htmx-toaster.min.js 29``` 30 31You will need to start a redis instance - using docker can simplify this 32process greatly: 33```bash 34docker run -d --name yoten-redis -p 6379:6379 redis:latest 35``` 36 37To run: 38```bash 39YOTEN_DEV=true go run cmd/server/main.go 40``` 41 42If you modified the views, you will need to regenerate them: 43```bash 44go tool templ generate 45go tool templ fmt ./internal/server/views/ 46``` 47 48If you modified the tailwind styles, you will need to regenerate the css: 49```bash 50tailwindcss -i ./input.css -o ./static/files/style.css 51``` 52 53If you modified the js files, you will need to regenerate the minified versions: 54```bash 55minify static/*.js -o static/files/ 56```