first commit
This commit is contained in:
commit
bac3d97223
|
|
@ -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.
|
||||||
Loading…
Reference in New Issue