diff --git a/README.md b/README.md index e04d21c..7026ad5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -## (NAME) - Rapid, easy full-stack web development starter kit in Go +## Pagoda: Rapid, easy full-stack web development starter kit in Go + +

Logo

## Table of Contents * [Introduction](#introduction) @@ -80,9 +82,11 @@ ### Overview -(NAME) is not a framework but rather a base starter-kit for rapid, easy full-stack web development in Go, aiming to provide much of the functionality you would expect from a complete web framework as well as establishing patterns, procedures and structure for your web application. +_Pagoda_ is not a framework but rather a base starter-kit for rapid, easy full-stack web development in Go, aiming to provide much of the functionality you would expect from a complete web framework as well as establishing patterns, procedures and structure for your web application. -todo +Built on a solid [foundation](#foundation) of well-established frameworks and modules, _Pagoda_ aims to be a starting point for any web application with the benefit over a mega-framework in that you have full control over all of the code, the ability to easily swap any frameworks or modules in or out, no strict patterns or interfaces to follow, and no fear of lock-in. + +While separate JavaScript frontends have surged in popularity, many prefer the reliability, simplicity and speed of a full-stack approach with server-side rendered HTML. Even the popular JS frameworks all have SSR options. This project aims to highlight that (todo) ### Motivation @@ -92,7 +96,7 @@ todo ### Foundation -While many great projects were used to build this, all of which are listed in the _credits_ section, the following provide the foundation of the back and frontend. It's important to note that you are **not required to use any of these**. Swapping any of them out will be relatively easy. +While many great projects were used to build this, all of which are listed in the [credits](#credits) section, the following provide the foundation of the back and frontend. It's important to note that you are **not required to use any of these**. Swapping any of them out will be relatively easy. #### Backend @@ -114,7 +118,17 @@ Go server-side rendered HTML combined with the projects below enable you to crea ### Screenshots -todo +#### Inline validation + +Inline validation + +#### Switch layout templates, user registration + +Registration + +#### Alpine.js modal, HTMX AJAX request + +Alpine and HTMX ## Getting started @@ -756,6 +770,10 @@ if page.HTMX.Request.Target == "search" { {{end}} ``` +#### CSRF token + +If [CSRF](#csrf) protection is enabled, the token value will automatically be passed to HTMX to be included in all non-GET requests. This is done in the `footer` template by leveraging HTMX [events](https://htmx.org/reference/#events). + ### Rendering the page Once your `Page` is fully built, rendering it via the embedded `Controller` in your _route_ can be done simply by calling `RenderPage()`: diff --git a/config/config.go b/config/config.go index 3077721..e70b0b1 100644 --- a/config/config.go +++ b/config/config.go @@ -67,7 +67,7 @@ type ( // AppConfig stores application configuration AppConfig struct { - Name string `env:"APP_NAME,default=Goweb"` + Name string `env:"APP_NAME,default=Pagoda"` Environment Environment `env:"APP_ENVIRONMENT,default=local"` EncryptionKey string `env:"APP_ENCRYPTION_KEY,default=?E(G+KbPeShVmYq3t6w9z$C&F)J@McQf"` Timeout time.Duration `env:"APP_TIMEOUT,default=20s"` diff --git a/static/favicon.png b/static/favicon.png new file mode 100644 index 0000000..ce28c7f Binary files /dev/null and b/static/favicon.png differ diff --git a/static/favicon.svg b/static/favicon.svg deleted file mode 100644 index e5a68fe..0000000 --- a/static/favicon.svg +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/components/core.gohtml b/templates/components/core.gohtml index acdb815..9a05200 100644 --- a/templates/components/core.gohtml +++ b/templates/components/core.gohtml @@ -1,6 +1,6 @@ {{define "metatags"}} {{ .AppName }}{{ if .Title }} | {{ .Title }}{{ end }} - +