Go to file
fabio 83e85bf899 adattato html, test htmx con componente svelte 2026-02-22 20:23:21 +01:00
cmd prompt 1,2,3 2026-02-22 17:36:16 +01:00
codex-prompt prompt 10 2026-02-22 18:01:37 +01:00
data prompt-0 2026-02-22 17:26:56 +01:00
internal adattato html, test htmx con componente svelte 2026-02-22 20:23:21 +01:00
ui-kit adattato html, test htmx con componente svelte 2026-02-22 20:23:21 +01:00
web adattato html, test htmx con componente svelte 2026-02-22 20:23:21 +01:00
.gitignore prompt 9 2026-02-22 17:58:31 +01:00
Makefile tailwind c ss 2026-02-22 18:31:19 +01:00
README.md tailwind c ss 2026-02-22 18:31:19 +01:00
docker-compose.yml prompt 10 2026-02-22 18:01:37 +01:00
go.mod prompt 1,2,3 2026-02-22 17:36:16 +01:00
go.sum prompt 1,2,3 2026-02-22 17:36:16 +01:00
temp.html adattato html, test htmx con componente svelte 2026-02-22 20:23:21 +01:00

README.md

GoFiber MVC Boilerplate

Boilerplate GoFiber MVC + HTMX + Svelte Custom Elements + GORM, con auth server-rendered, area private/admin e mail sink in sviluppo.

Quickstart SQLite

cp .env.example .env
make css-build
make ui-build
make dev

Default SQLite path: ./data/app.sqlite3.

Comandi utili:

make test
make fmt
make db-reset

Quickstart Postgres (Docker Compose)

docker compose up -d
cp .env.example .env

Configura .env così:

DB_DRIVER=postgres
DB_PG_DSN=postgres://trustcontact:trustcontact@localhost:5432/trustcontact?sslmode=disable

DB_POSTGRES_DSN è comunque supportato.

Tailwind + UI Kit

Tailwind (template server-rendered) compila in web/static/css/app.css.

UI kit (Svelte custom elements) compila in web/static/ui.

Comandi:

make css-build   # build tailwind
make css-dev     # watch tailwind
make ui-build    # build ui-kit + css tailwind
make ui-dev      # vite dev server ui-kit

Layout include:

  • /static/css/app.css?v={{.BuildHash}}
  • /static/ui/ui.css?v={{.BuildHash}}
  • /static/ui/ui.esm.js?v={{.BuildHash}}

Template Directories

  • Public: web/templates/public
  • Private: web/templates/private
  • Admin: web/templates/admin

Email in Develop

In develop, le email vengono salvate in ./data/emails.

Make Targets

  • make dev -> go run ./cmd/server
  • make ui-build -> install + build ui-kit + build css tailwind
  • make ui-dev -> watch UI con Vite
  • make css-build -> build Tailwind CSS
  • make css-dev -> watch Tailwind CSS
  • make test -> go test ./...
  • make db-reset -> reset DB sqlite locale (./data/app.db / ./data/app.sqlite3)
  • make fmt -> gofmt su cmd/ e internal/