From d9275610da02018a4e9cdd1a1097091e25e80e1d Mon Sep 17 00:00:00 2001 From: Leo Audibert Date: Wed, 18 Sep 2024 14:51:02 -0700 Subject: [PATCH] Update docs [skip ci] --- README.md | 94 +++++++++++++++++++++++++- templates/pages/documentation.templ | 2 +- templates/pages/documentation_templ.go | 2 +- 3 files changed, 95 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a830358..aa513cf 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ This started as a fork of [pagoda](https://github.com/mikestefanello/pagoda), fo

Logo

+### Getting Started + To get up and running with GoShip: ```bash # The below command will: @@ -36,4 +38,94 @@ make init make watch ``` -For in-depth info on the architecture of the project, please see the [mikestefanello/pagoda](https://github.com/mikestefanello/pagoda) repo. There are some key differences, but since this was originally a fork, 99% of it still applies. I am working on creating clear and actionable documentation, but that is quite time-consuming, so don't hold your socks. \ No newline at end of file +For in-depth info on the architecture of the project, please see the [mikestefanello/pagoda](https://github.com/mikestefanello/pagoda) repo. There are some key differences, but since this was originally a fork, 99% of it still applies. I am working on creating clear and actionable documentation, but that is quite time-consuming, so don't hold your socks. + +### Motivation + +Build the same rich interfaces you would build with Javascript frameworks, but with HTML and Go. Limit the number of tools you use. Develop rapidly. + +#### Why the Hell Do We Need Another Boilerplate? + +Well, I noticed that there were none for Go. Now, I know most Go folks like to build it all themselves. And while I love doing that myself, I have many project ideas for which I just want to build that specific project, not the entire infra surrounding it, like auth, notifications, payments, file uploads etc. This project has served me well in bringing to production many projects so far. It has evolved far beyond what I originally planned for, though there is still so much potentional to expand on and implement for. + +If you'd like a no-nonesense (or not too much?) starter kit to get your next project to production ASAP, while also using awesome technologies like Go, you've found a suitable starting point! + +> **Warning alert!** this project is in active development as I am adding things after first trying them out in prod for [Chรฉrie](https://cherie.chatbond.app/), a relationship app to grow your couple. Note that I would welcome any help to develop this boilerplate โค๏ธ. + +### Features + +#### ๐ŸŒฉ Realtime +- Support for HTMX SSE extension +- Can be used with vanilla JS + +#### ๐Ÿ“ฌ Email Sending +- Support for SMTP and Resend API +- Pre-made templates for account activation, password reset, and newsletter. + +#### ๐Ÿ’ธ Payments +- Stripe integration for monthly subscriptions +- Internal subscription management + +#### ๐Ÿ— Background Tasks +- Offload heavy tasks to background +- Realtime or scheduled + +#### ๐Ÿ”” Notifications +- Real-time or scheduled +- Supports push notifications to PWA, native iOS, and native Android + +#### ๐Ÿ” Auth Done For You +- Email/Password logins +- Ready-made private user area + +#### ๐Ÿ“‚ File Uploads with AWS APIs +- Internal management of uploaded files +- Host files and images on any S3 compatible service (e.g. Backblaze) +- Pre-signed URLs! + +#### ๐Ÿ“ฑ Mobile Ready App +- Fully PWA-ready with internal FCM and push subscriptions management +- IOS native wrapper with push notifications and payments +- Pre-signed URLs! +- Styled with mobile/tablet/desktop in mind + +#### ๐Ÿ’… Components and Styles +- Light + Dark mode +- Many components available (HTMX, AlpineJS, Hyperscript) +- 20+ themes with DaisyUI + +#### ๐Ÿช‚ Drop-in any JS App +- Designed for island architecture. Drop in any JS app and take advantage of already built infra +- Currently has SvelteJS and VanillaJS build step and static file serving + +#### ๐Ÿ›ข AI-ready Database Layer +- Postgres support (i.e. Supabase, Neon etc) +- Vector-ready (PGVector integrated) for your AI/ML applications! + +#### ๐Ÿงช Go Tests and E2E Tests with Playwright +- Go tests with automatic setup/teardown of DB container +- Playwright integration tests to make sure you don't break your previously working UIs! + +#### ๐Ÿš€ Deploy Anywhere. Easily. +- Deploy from bare metal to Cloud VMs with Kamal +- Single-command deploy after quick setup + +### Tech Stack + +#### Backend +- **[Echo](https://echo.labstack.com/)** - High-performance, extensible, minimalist Go web framework. +- **[Ent](https://entgo.io/)** - Simple yet powerful ORM for modeling and querying data. +- **[Asynq](https://github.com/hibiken/asynq)** - Simple, reliable, and efficient distributed task queue in Go. +- **[Stripe](https://stripe.com/)** - Payments solution. + +#### Frontend +- **[HTMX](https://htmx.org/)** - Build modern user interfaces with minimal JavaScript. +- **[Templ](https://templ.build/)** - A powerful type-safe Go templating language. +- **[Tailwind CSS](https://tailwindcss.com/)** - A utility-first CSS framework for rapid implementation. +- **[Hyperscript](https://hyperscript.org/)** - A lightweight JavaScript framework to sprinkle localized logic and state. +#### Storage +- **Postgres** - Host your DB on Supabase or any other hosting platform compatible with Postgres. + - Currently making optional, with **SQLite** as replacement for single binary deployments +- **[S3](https://aws.amazon.com/s3/)** - Host files and images on any S3-compatible service (e.g., Backblaze). +- **Redis** - used for task queuing, caching, and SSE events. + - Currently making optional for single binary deployments diff --git a/templates/pages/documentation.templ b/templates/pages/documentation.templ index b22cbc7..feb4f14 100644 --- a/templates/pages/documentation.templ +++ b/templates/pages/documentation.templ @@ -93,7 +93,7 @@ templ GoshipFeatures() { @singleOpenAccordionEntry("Styles", "๐Ÿ’… Components and Styles", stylesContent()) @singleOpenAccordionEntry("DropJSApp", "๐Ÿช‚ Drop-in any JS App", jsIslandsContent()) @singleOpenAccordionEntry("DB", "๐Ÿ›ข AI-ready Database Layer", databaseContent()) - @singleOpenAccordionEntry("DB", "๐ŸงชGo Tests and E2E Tests with Playwright", testingContent()) + @singleOpenAccordionEntry("e2eTests", "๐Ÿงช Go Tests and E2E Tests with Playwright", testingContent()) @singleOpenAccordionEntry("Deploy", "๐Ÿš€ Deploy Anywhere. Easily.", deployContent()) // @singleOpenAccordionEntry("Authorization", "๐Ÿ‘ฎ Authorization", accordionNotificationsContent()) } diff --git a/templates/pages/documentation_templ.go b/templates/pages/documentation_templ.go index ebaace8..30de4cb 100644 --- a/templates/pages/documentation_templ.go +++ b/templates/pages/documentation_templ.go @@ -419,7 +419,7 @@ func GoshipFeatures() templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = singleOpenAccordionEntry("DB", "๐ŸงชGo Tests and E2E Tests with Playwright", testingContent()).Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = singleOpenAccordionEntry("e2eTests", "๐Ÿงช Go Tests and E2E Tests with Playwright", testingContent()).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }