first commit

This commit is contained in:
fabio 2026-02-22 17:26:33 +01:00
commit bac3d97223
1 changed files with 69 additions and 0 deletions

69
README.md Normal file
View File

@ -0,0 +1,69 @@
# GoFiber MVC Boilerplate
Boilerplate riusabile per:
- GoFiber (MVC)
- HTMX
- Svelte Custom Elements (UI kit)
- GORM
- SQLite/Postgres
- Auth + ruolo `admin`
- Email sink
- CORS
- Template directory `public` / `private` / `admin`
## Struttura iniziale
```text
.
├── cmd/
│ └── server/
├── internal/
│ ├── app/
│ ├── auth/
│ ├── config/
│ ├── controllers/
│ ├── db/
│ ├── http/
│ ├── mailer/
│ ├── middleware/
│ ├── models/
│ ├── repo/
│ └── services/
├── web/
│ ├── emails/
│ │ └── templates/
│ ├── static/
│ │ ├── css/
│ │ ├── ui/
│ │ └── vendor/
│ └── templates/
│ ├── admin/
│ ├── private/
│ └── public/
├── ui-kit/
└── data/ # solo sviluppo locale
```
## TODO Checklist
- [ ] Definire bootstrap server in `cmd/server` (entrypoint + lifecycle).
- [ ] Configurare loader config (`env`, `flags`) in `internal/config`.
- [ ] Impostare `internal/db` con supporto SQLite (dev) e Postgres (prod).
- [ ] Definire modelli base GORM in `internal/models` (User, Role, Session, ecc.).
- [ ] Implementare repository layer in `internal/repo`.
- [ ] Implementare service layer in `internal/services`.
- [ ] Implementare controller layer in `internal/controllers`.
- [ ] Configurare router HTTP in `internal/http` (gruppi public/private/admin).
- [ ] Aggiungere middleware comuni in `internal/middleware` (logging, recovery, auth, cors).
- [ ] Implementare auth in `internal/auth` (login/logout/session o token).
- [ ] Implementare RBAC con ruolo `admin`.
- [ ] Configurare mailer + email sink in `internal/mailer`.
- [ ] Definire template rendering per `web/templates/public`, `web/templates/private`, `web/templates/admin`.
- [ ] Preparare template email in `web/emails/templates`.
- [ ] Definire static assets pipeline e convenzioni in `web/static`.
- [ ] Impostare `ui-kit` con Svelte Custom Elements e output in `web/static/ui`.
- [ ] Definire integrazione HTMX lato template/partials.
- [ ] Aggiungere migrazioni DB iniziali e seed minimo.
- [ ] Aggiungere test base (unit + integrazione) per router/auth/repo.
- [ ] Aggiungere script Makefile/task runner per setup e run locale.