BCSF-Renass Website

Tech stack summary

  • Frontend : HTMX + Templ
  • Backend : Go + Redis

HTMX

HTMX Logo : High power tools for HTML
AJAX-Powered Hypermedia Library
But what does that mean ?
  • Everything can make HTTP Requests
  • Responses are HTML not JSON
  • Responses replace HTML elements
Why is it good ?
  • Less JS
  • Faster to write
  • Fewer chances of bugs
  • Faster to render
Small example
<!-- /api/loremipsum => 

Hello World

--> <button hx-get="/api/loremipsum" hx-target="#toFill" hx-on="click"> Fill div ! </button> <div id="toFill"></div>
<!-- /api/loremipsum => 

Hello World

--> <button hx-get="/api/loremipsum" hx-target="#toFill" hx-on="click"> Fill div ! </button> <div id="toFill">

Hello World

</div>

Templ

Templ Logo
Statically typed Go HTML-Templating Library
templ body() {
	<body>
		@Header()
		<main>
			<div 
				hx-get="/api/fetchDataCountries" 
				hx-trigger="load" 
				hx-target="main"
			></div>
		</main>
	</body>
}
					

Lorem Ipsum

adorable kitten