feat(01-01): sqlc config, tailwind input CSS, air live-reload config

- sqlc.yaml: postgresql engine, schema points at migrations/ (Pitfall 7), pgx/v5 sql_package
- tailwind.input.css: @source globs for templ + internal/web Go files (Pitfall 3), @imports four ui/*.css files per UI-SPEC
- .air.toml: watches .go + .templ, excludes generated *_templ.go (Pitfall 5), runs 'templ generate' pre-build
- Tailwind watch is NOT wired into air pre_cmd (two-terminal workflow per RESEARCH Open Q2)
This commit is contained in:
Arthur Belleville 2026-05-14 17:54:35 +02:00
parent 2fe5b51f80
commit d6085b7dbb
No known key found for this signature in database
3 changed files with 33 additions and 0 deletions

11
backend/.air.toml Normal file
View file

@ -0,0 +1,11 @@
root = "."
tmp_dir = "tmp"
[build]
cmd = "templ generate && go build -o ./tmp/web ./cmd/web"
bin = "./tmp/web"
include_ext = ["go", "templ"]
exclude_dir = ["tmp", "bin", "static", ".git", "internal/db/sqlc"]
exclude_regex = [".*_templ\\.go$"]
delay = 200
stop_on_error = true

12
backend/sqlc.yaml Normal file
View file

@ -0,0 +1,12 @@
version: "2"
sql:
- engine: postgresql
schema: "migrations"
queries: "internal/db/queries"
gen:
go:
package: "sqlc"
out: "internal/db/sqlc"
sql_package: "pgx/v5"
emit_json_tags: false
emit_interface: false

View file

@ -0,0 +1,10 @@
@import "tailwindcss";
@source "../templates/**/*.templ";
@source "../internal/web/**/*.templ";
@source "../internal/web/**/*.go";
@import "../internal/web/ui/base.css";
@import "../internal/web/ui/button.css";
@import "../internal/web/ui/card.css";
@import "../internal/web/ui/badge.css";