Yōten: A social platform for tracking the essential points of your language learning
yoten.app
Hacking guide#
Required tools#
Running yōten#
To authenticate, you will need OAUTH JWKs to be setup:
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}')"
Yōten depends on a series of static assets. The setup.sh script will pull these
for you.
Redis is used to cache login sessions. greatly:
docker run -d --name yoten-redis -p 6379:6379 redis:latest
To run:
YOTEN_DEV=true go run cmd/server/main.go
If you modified the views, you will need to regenerate them:
go tool templ generate
go tool templ fmt ./internal/server/ui/
If you modified the tailwind styles, you will need to regenerate the css:
find internal static -path 'static/files' -prune -o -name '*.css' -print | while read f; do minify "$f" -o "static/files/$(basename "$f")"; done
tailwindcss -i ./input.css -o ./static/files/style.css
If you modified the js files, you will need to regenerate the minified versions:
find internal static -path 'static/files' -prune -o -name '*.js' -print | while read f; do minify "$f" -o "static/files/js/$(basename "$f")"; done
All of these steps are compiled into the dev.sh script for convenience.