Library
We've built out an initial library that you can use in your apps or you can fork and modify to fit your needs.
Logger​
- logruslogger - logging using
sirupsen/logrus
- zaplogger - logging using
uber-go/zap
Storage System​
- awsbucketstorage - backend storage support for Amazon S3 buckets
- azureblobstorage - backend storage support for Azure Blob Storage
- gcpbucketstorage - backend storage support for Google Cloud Storage buckets
- localstorage - backend storage support using local filesystem
Session Manager​
- scssession - session management using
alexedwards/scs
Template Engine​
- htmlengine - HTML templating using
html/template
andembed.FS
withoxtoacart/bpool
for template buffering
Router​
- awayrouter - routing using fork of
matryer/way
- chirouter - routing using
go-chi/chi
withparamconvert
- gorillamux - routing using
gorilla/mux
- jshttprouter routing using
julienschmidt/httprouter
withparamconvert
- patrouter - routing using
bmizerany/pat
withparamconvert
Middleware​
- cors - supports Cross-Origin Resource Sharing (CORS) on
/api/*
endpoints - etagcache - supports entity tag (ETag)
- gzipresponse - adds gzip content compression to every response
- healthcheck - returns a 200 HTTP status code on endpoint
/api/healthcheck
- jwt - supports JSON web tokens
- logrequest - output
info
log with timestamp, remote address, HTTP method, and URL for every request - notrailingslash - strips trailing slashes from requests except on
/debug
endpoints to supporthttp.pprof
- proxyrequest - adds
reverse proxy
to support forwarding API and UI requests to separate URLs, ports, or microservices - redirecttourl - adds URL redirection if request doesn't match site URL
- securedashboard - disallows unauthenticated access to
/dashboard
endpoints - uptimerobotok - sends a 200 HTTP status code when a HEAD request is sent to
/
to support UptimeRobot
Generic​
- author - adds a configurable author meta tag to all HTML templates
- bearblog - provides Bear Blog like functionality for simple, markdown based articles
- bearcss - adds CSS styling based on the Bear Blog
- bootstrap - adds the Bootstrap library to all pages
- charset - adds a configurable charset meta tag to all HTML templates
- debugpprof - enables
http.pprof
for HTTP server runtime profiling on/debug/pprof
endpoints - description - adds a configurable description meta tag to all HTML templates
- disqus - adds Disqus comment blocks to all Post layouts
- envinfo - adds a page at
/dashboard/env
that displays all server environment variables - foundation - adds the Foundation library to all pages
- googleanalytics - adds Google Analytics tracking code to every template
- htmx - adds the htmx JavaScript library to all pages
- jquery - adds the jQuery library to all pages
- pluginmanager - adds a plugin management system that is available on the
/dashboard/plugins
endpoint - prism - adds syntax highlighting using Prism to markdown code blocks
- robots - adds a simple
/robots.txt
endpoint for web crawlers - rove - run MySQL migrations on a database
- rssfeed - adds a RSS feed to the
/rss.xml
endpoint and adds alink
tag to every template - simplelogin - adds a login page with MFA support and dashboard page to customize site meta data
- sitemap - adds a Sitemap to the
/sitemap.xml
endpoint - stackedit - adds the in-browser markdown editor, StackEdit, to all textfields with the
id_content
ID. Built for use with thebearblog
plugin - styles - adds configurable Favicon and CSS styles to all templates
- tailwindcss - adds the tailwindcss library to all pages
- viewport - adds a mobile-optimized viewport meta tag to all HTML templates