Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
# Optional - with default values

PORT=3000
AUTO_MIGRATE=true

# Mandatory

DATABASE_URL=db.sqlite
JWT_SECRET=secrettt
ENV=prod
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ go.work
# Database
db.sqlite3
db.sqlite
pb_data/

# Air
tmp
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the Go binary
FROM golang:1.23-alpine AS goapp
FROM golang:1.24-alpine AS goapp

WORKDIR /app

Expand All @@ -20,4 +20,4 @@ FROM alpine:latest as release
COPY --from=goapp /app/goapp /goapp

WORKDIR /app
CMD ["/goapp", "serve"]
CMD ["/goapp", "serve", "--http", ":8090"]
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
all: statics templ

statics:
curl https://cdn.tailwindcss.com/3.4.16 --output internal/embeded/statics/tailwind.js
curl https://unpkg.com/htmx.org@1.9.12/dist/htmx.min.js --output internal/embeded/statics/htmx.js
curl https://cdn.tailwindcss.com/3.4.16 --output internal/embeded/assets/tailwind.js
curl https://unpkg.com/htmx.org@1.9.12/dist/htmx.min.js --output internal/embeded/assets/htmx.js

templ:
templ generate
17 changes: 4 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# goth oidc

## Components
- Go + Fiber
- Go + Pocketbase
- Tailwind
- HTMX
- SQLite
- Oidc auth

## Extenal dependencies

Expand All @@ -30,20 +28,13 @@ Before running be sure to add all required environment variables (see [env examp

- make: `make statics` to download statics
- serve: `go run main.go serve` or `air serve`
- migrate up: `go run main.go migrate:up` or `air migrate:up`
- migrate down: `go run main.go migrate:down N` or `air migrate:down N` where N is the number of migrations down
- migrate collections: `go run main.go migrate collections` or `air migrate collections`

## Roadmap

### Done
- Go
- HTMx
- Tailwind
- Templ
- Custom auth
- JWT cookie auth
- Embeded Migrations

### Next
- [ ] Access + refresh tokens
- [ ] SQL Autogeneration with [sqlc](https://github.com/sqlc-dev/sqlc)
- Tailwind
- Pocketbase
66 changes: 31 additions & 35 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,53 +1,49 @@
module goth

go 1.23.0
go 1.24

toolchain go1.24.1

require (
github.com/a-h/templ v0.3.857
github.com/gofiber/fiber/v2 v2.49.0
github.com/golang-jwt/jwt/v5 v5.0.0
github.com/golang-migrate/migrate/v4 v4.16.2
github.com/google/uuid v1.3.1
github.com/google/uuid v1.6.0
github.com/joho/godotenv v1.5.1
github.com/spf13/cobra v1.7.0
golang.org/x/crypto v0.32.0
modernc.org/sqlite v1.26.0
github.com/pocketbase/dbx v1.11.0
github.com/pocketbase/pocketbase v0.27.1
modernc.org/sqlite v1.37.0
)

require (
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/disintegration/imaging v1.6.2 // indirect
github.com/domodwyer/mailyak/v3 v3.6.2 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
github.com/ganigeorgiev/fexpr v0.5.0 // indirect
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 // indirect
github.com/go-sql-driver/mysql v1.5.0 // indirect
github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-sqlite3 v1.14.17 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.48.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/tools v0.24.0 // indirect
lukechampine.com/uint128 v1.2.0 // indirect
modernc.org/cc/v3 v3.40.0 // indirect
modernc.org/ccgo/v3 v3.16.13 // indirect
modernc.org/libc v1.24.1 // indirect
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.6.0 // indirect
modernc.org/opt v0.1.3 // indirect
modernc.org/strutil v1.1.3 // indirect
modernc.org/token v1.0.1 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/spf13/cobra v1.9.1 // indirect
github.com/spf13/pflag v1.0.6 // indirect
github.com/stretchr/testify v1.8.1 // indirect
golang.org/x/crypto v0.37.0 // indirect
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect
golang.org/x/image v0.26.0 // indirect
golang.org/x/net v0.39.0 // indirect
golang.org/x/oauth2 v0.29.0 // indirect
golang.org/x/sync v0.13.0 // indirect
golang.org/x/sys v0.32.0 // indirect
golang.org/x/text v0.24.0 // indirect
modernc.org/libc v1.62.1 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.9.1 // indirect
)
Loading