Discover books, shows, and movies at your level. Track your progress by filling your Shelf with what you find, and share with other language learners. *No dusting required. shlf.space

chore: update shelf.app -> shlf.space

Signed-off-by: brookjeynes <me@brookjeynes.dev>

+82 -73
+2 -2
README.md
··· 1 - # shelf 1 + # shlf.space 2 2 3 3 Discover books, shows, and movies at your level. Track your progress by 4 4 filling your Shelf with what you find, and share with other language learners. ··· 6 6 7 7 ## docs 8 8 - [contributing guide - **please read before opening a PR**](./docs/contributing.md) 9 - - [hacking on shelf](./docs/hacking.md) 9 + - [hacking on shlf](./docs/hacking.md) 10 10
-19
api/shelf/actorprofile.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - // Lexicon schema: app.shelf.actor.profile 4 - 5 - package shelf 6 - 7 - import ( 8 - lexutil "github.com/bluesky-social/indigo/lex/util" 9 - ) 10 - 11 - func init() { 12 - lexutil.RegisterType("app.shelf.actor.profile", &ActorProfile{}) 13 - } 14 - 15 - type ActorProfile struct { 16 - LexiconTypeID string `json:"$type" cborgen:"$type,const=app.shelf.actor.profile"` 17 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 18 - DisplayName string `json:"displayName" cborgen:"displayName"` 19 - }
+7 -3
api/shelf/cbor_gen.go api/shlf/cbor_gen.go
··· 1 - package shelf 1 + // Code generated by github.com/whyrusleeping/cbor-gen. DO NOT EDIT. 2 + 3 + package shlf 2 4 3 5 import ( 4 6 "fmt" ··· 6 8 "math" 7 9 "sort" 8 10 11 + cid "github.com/ipfs/go-cid" 12 + cbg "github.com/whyrusleeping/cbor-gen" 9 13 xerrors "golang.org/x/xerrors" 10 14 ) 11 15 ··· 38 42 return err 39 43 } 40 44 41 - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("app.shelf.actor.profile"))); err != nil { 45 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("space.shlf.actor.profile"))); err != nil { 42 46 return err 43 47 } 44 - if _, err := cw.WriteString(string("app.shelf.actor.profile")); err != nil { 48 + if _, err := cw.WriteString(string("space.shlf.actor.profile")); err != nil { 45 49 return err 46 50 } 47 51
+19
api/shlf/actorprofile.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: space.shlf.actor.profile 4 + 5 + package shlf 6 + 7 + import ( 8 + lexutil "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + lexutil.RegisterType("space.shlf.actor.profile", &ActorProfile{}) 13 + } 14 + 15 + type ActorProfile struct { 16 + LexiconTypeID string `json:"$type" cborgen:"$type,const=space.shlf.actor.profile"` 17 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 18 + DisplayName string `json:"displayName" cborgen:"displayName"` 19 + }
+8 -8
cmd/cborgen.go
··· 8 8 "github.com/bluesky-social/indigo/mst" 9 9 cbg "github.com/whyrusleeping/cbor-gen" 10 10 11 - "shelf.app/api/shelf" 11 + "shlf.space/api/shlf" 12 12 ) 13 13 14 14 func main() { ··· 21 21 MaxStringLength: 1_000_000, 22 22 } 23 23 24 - shelfTypes := []any{ 25 - shelf.ActorProfile{}, 24 + shlfTypes := []any{ 25 + shlf.ActorProfile{}, 26 26 } 27 27 28 28 for name, rt := range AllLexTypes() { 29 - if strings.HasPrefix(name, "app.shelf.") { 30 - shelfTypes = append(shelfTypes, reflect.New(rt).Interface()) 29 + if strings.HasPrefix(name, "space.shlf.") { 30 + shlfTypes = append(shlfTypes, reflect.New(rt).Interface()) 31 31 } 32 32 } 33 - shelfGenCfg := genCfg 34 - shelfGenCfg.SortTypeNames = true 33 + shlfGenCfg := genCfg 34 + shlfGenCfg.SortTypeNames = true 35 35 36 - if err := shelfGenCfg.WriteMapEncodersToFile("api/shelf/cbor_gen.go", "shelf", shelfTypes...); err != nil { 36 + if err := shlfGenCfg.WriteMapEncodersToFile("api/shlf/cbor_gen.go", "shlf", shlfTypes...); err != nil { 37 37 panic(err) 38 38 } 39 39 }
+2 -2
cmd/server/main.go
··· 7 7 "net/http" 8 8 "os" 9 9 10 - "shelf.app/internal/config" 11 - "shelf.app/internal/server" 10 + "shlf.space/internal/config" 11 + "shlf.space/internal/server" 12 12 ) 13 13 14 14 func main() {
+5 -5
docs/hacking.md
··· 5 5 - [minify](https://github.com/tdewolff/minify) 6 6 - [goat](https://github.com/bluesky-social/goat) 7 7 8 - ## Running shelf 8 + ## Running shlf 9 9 10 10 To authenticate, you will need OAUTH JWKs to be setup: 11 11 ```bash 12 - export SHELF_OAUTH_CLIENT_KID="$(date +%s)" 13 - export SHELF_OAUTH_CLIENT_SECRET="$(goat key generate -t P-256 | grep -A1 "Secret Key" | tail -n1 | awk '{print $1}')" 12 + export SHLF_OAUTH_CLIENT_KID="$(date +%s)" 13 + export SHLF_OAUTH_CLIENT_SECRET="$(goat key generate -t P-256 | grep -A1 "Secret Key" | tail -n1 | awk '{print $1}')" 14 14 ``` 15 15 16 - You will need to fetch a series of static assets shelf depends on: 16 + You will need to fetch a series of static assets shlf depends on: 17 17 ```bash 18 18 mkdir -p ./static/files 19 19 ··· 27 27 28 28 To run: 29 29 ```bash 30 - SHELF_DEV=true go run cmd/server/main.go 30 + SHLF_DEV=true go run cmd/server/main.go 31 31 ``` 32 32 33 33 If you modified the views, you will need to regenerate them:
+7 -7
generate_lexicons.sh
··· 1 1 #! /bin/bash 2 2 3 3 go run github.com/bluesky-social/indigo/cmd/lexgen \ 4 - --package shelf \ 5 - --outdir api/shelf \ 4 + --package shlf \ 5 + --outdir api/shlf \ 6 6 --build-file lexicon-build-config.json \ 7 7 lexicons/ 8 8 9 - find ./api/shelf -type f -exec sed -i.bak 's/\lexutil/\/\/\lexutil/' {} + 10 - find ./api/shelf -type f -exec sed -i.bak -E 's/^(.+)github(.+)//' {} + 9 + find ./api/shlf -type f -exec sed -i.bak 's/\lexutil/\/\/\lexutil/' {} + 10 + find ./api/shlf -type f -exec sed -i.bak -E 's/^(.+)github(.+)//' {} + 11 11 go run ./cmd/cborgen.go 12 12 13 13 go run github.com/bluesky-social/indigo/cmd/lexgen \ 14 - --package shelf \ 15 - --outdir api/shelf \ 14 + --package shlf \ 15 + --outdir api/shlf \ 16 16 --build-file lexicon-build-config.json \ 17 17 lexicons/ 18 18 19 - rm -rf ./api/shelf/*.bak 19 + rm -rf ./api/shlf/*.bak
+2 -1
go.mod
··· 1 - module shelf.app 1 + module shlf.space 2 2 3 3 go 1.25 4 4 ··· 29 29 github.com/tdewolff/parse/v2 v2.8.5 // indirect 30 30 gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect 31 31 gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect 32 + golang.org/x/sync v0.16.0 // indirect 32 33 golang.org/x/time v0.3.0 // indirect 33 34 google.golang.org/protobuf v1.33.0 // indirect 34 35 )
+4
go.sum
··· 234 234 golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 235 235 golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= 236 236 golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 237 + golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg= 237 238 golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= 238 239 golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 239 240 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= ··· 245 246 golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 246 247 golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 247 248 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 249 + golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= 250 + golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= 248 251 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 249 252 golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 250 253 golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= ··· 276 279 golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 277 280 golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= 278 281 golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= 282 + golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= 279 283 golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= 280 284 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 281 285 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+1 -1
internal/cache/session/store.go
··· 29 29 "fmt" 30 30 "time" 31 31 32 - "shelf.app/internal/cache" 32 + "shlf.space/internal/cache" 33 33 ) 34 34 35 35 type OAuthSession struct {
+5 -5
internal/config/config.go
··· 12 12 CookieSecret string `env:"COOKIE_SECRET, default=00000000000000000000000000000000"` 13 13 Dev bool `env:"DEV, default=false"` 14 14 ListenAddr string `env:"PORT, default=0.0.0.0:8080"` 15 - Host string `env:"HOST, default=https://shelf.app"` 15 + Host string `env:"HOST, default=https://shlf.space"` 16 16 } 17 17 18 18 type OAuthConfig struct { ··· 45 45 } 46 46 47 47 type Config struct { 48 - Core CoreConfig `env:",prefix=SHELF_"` 49 - Jetstream JetstreamConfig `env:",prefix=SHELF_JETSTREAM_"` 50 - OAuth OAuthConfig `env:",prefix=SHELF_OAUTH_"` 51 - Redis RedisConfig `env:",prefix=SHELF_REDIS_"` 48 + Core CoreConfig `env:",prefix=SHLF_"` 49 + Jetstream JetstreamConfig `env:",prefix=SHLF_JETSTREAM_"` 50 + OAuth OAuthConfig `env:",prefix=SHLF_OAUTH_"` 51 + Redis RedisConfig `env:",prefix=SHLF_REDIS_"` 52 52 } 53 53 54 54 func LoadConfig(ctx context.Context) (*Config, error) {
+1 -1
internal/layouts/base/base.templ
··· 6 6 <head> 7 7 <meta charset="UTF-8"/> 8 8 <meta name="viewport" content="width=device-width, initial-scale=1.0"/> 9 - <title>shelf - { params.Title }</title> 9 + <title>shlf.space - { params.Title }</title> 10 10 <script src="/static/htmx.min.js" defer></script> 11 11 <script src="/static/lucide.min.js"></script> 12 12 <script src="/static/alpinejs.min.js" defer></script>
+1 -1
internal/server/index.go
··· 3 3 import ( 4 4 "net/http" 5 5 6 - "shelf.app/internal/views/index" 6 + "shlf.space/internal/views/index" 7 7 ) 8 8 9 9 func (s *Server) Index(w http.ResponseWriter, r *http.Request) {
+2 -2
internal/server/login.go
··· 6 6 "net/http" 7 7 "strings" 8 8 9 - "shelf.app/internal/server/htmx" 10 - "shelf.app/internal/views/login" 9 + "shlf.space/internal/server/htmx" 10 + "shlf.space/internal/views/login" 11 11 ) 12 12 13 13 func (s *Server) Login(w http.ResponseWriter, r *http.Request) {
+2 -2
internal/server/oauth/oauth.go
··· 13 13 "github.com/bluesky-social/indigo/atproto/syntax" 14 14 xrpc "github.com/bluesky-social/indigo/xrpc" 15 15 "github.com/gorilla/sessions" 16 - idresolver "shelf.app/internal/atproto" 17 - "shelf.app/internal/config" 16 + idresolver "shlf.space/internal/atproto" 17 + "shlf.space/internal/config" 18 18 ) 19 19 20 20 type OAuth struct {
+5 -5
internal/server/server.go
··· 4 4 "context" 5 5 "fmt" 6 6 7 - "shelf.app/internal/atproto" 8 - "shelf.app/internal/cache" 9 - "shelf.app/internal/cache/session" 10 - "shelf.app/internal/config" 11 - "shelf.app/internal/server/oauth" 7 + "shlf.space/internal/atproto" 8 + "shlf.space/internal/cache" 9 + "shlf.space/internal/cache/session" 10 + "shlf.space/internal/config" 11 + "shlf.space/internal/server/oauth" 12 12 ) 13 13 14 14 type Server struct {
+1 -1
internal/server/static.go
··· 5 5 "net/http" 6 6 "strings" 7 7 8 - "shelf.app/static" 8 + "shlf.space/static" 9 9 ) 10 10 11 11 func (s *Server) HandleStatic() http.Handler {
+1 -1
internal/views/index/index.templ
··· 1 1 package index 2 2 3 - import "shelf.app/internal/layouts/base" 3 + import "shlf.space/internal/layouts/base" 4 4 5 5 templ IndexPage(params IndexPageParams) { 6 6 @layouts.Base(layouts.BaseParams{Title: "home"})
+1 -1
internal/views/login/login.templ
··· 1 1 package login 2 2 3 - import "shelf.app/internal/layouts/base" 3 + import "shlf.space/internal/layouts/base" 4 4 5 5 templ LoginPage(params LoginPageParams) { 6 6 @layouts.Base(layouts.BaseParams{Title: "login"}) {
+4 -4
lexicon-build-config.json
··· 1 1 [ 2 2 { 3 - "package": "shelf", 4 - "prefix": "app.shelf", 5 - "outdir": "api/shelf", 6 - "import": "shelf.app/api/shelf", 3 + "package": "shlf", 4 + "prefix": "space.shlf", 5 + "outdir": "api/shlf", 6 + "import": "shlf.space/api/shlf", 7 7 "gen-server": true 8 8 } 9 9 ]
+2 -2
lexicons/actor/profile.json
··· 1 1 { 2 2 "lexicon": 1, 3 - "id": "app.shelf.actor.profile", 3 + "id": "space.shlf.actor.profile", 4 4 "defs": { 5 5 "main": { 6 6 "type": "record", 7 - "description": "A declaration of a shelf profile.", 7 + "description": "A declaration of a shlf profile.", 8 8 "key": "literal:self", 9 9 "record": { 10 10 "type": "object",