Nicheloom

Market intelligence for builders — see what's gaining traction before it's crowded.

I open-sourced my Go and Next B2B SaaS Starter (deploy anywhere, MIT)

Details

External ID
46324665
Source
HN
Company
—
Product
I open-sourced my Go and Next B2B SaaS Starter (deploy anywhere, MIT)
Website domain
github.com
Launched
Dec. 19, 2025
Cohort
—
Upvotes
83
Upvotes percentile
0.8721374045801527
Tags
—
Fetched at
Sept. 7, 2026, 9:25 p.m.
Updated at
Sept. 7, 2026, 9:25 p.m.

Description

Hi HN, I'm Mohammed, a technical founder who loves shipping and giving back to the community. I'm open-sourcing the full-stack engine that powers my B2B product, apflow.co.What it is: A production B2B starter with a Go backend and Next.js frontend. Both are fully Dockerized with separate containers. No Vercel. No Supabase. Deploy the whole thing on a $6 VPS, or split frontend and backend across different providers. You own the infrastructure.The problem I was solving:Every SaaS starter I evaluated had the same issue: they locked me into someone else's platform. Vercel for hosting. PlanetScale for the database. Serverless functions billing per invocation. Fine for prototypes, but costs become unpredictable at scale and migrating away is painful.I wanted something I could deploy on any Linux box with docker-compose up. Something where I could host the frontend on Cloudflare Pages and the backend on a Hetzner VPS if I wanted. No vendor-specific APIs buried in my code.Why Go for the backend:Go gives me exactly what I need for a SaaS backend:Tiny footprint. The backend idles at ~50MB RAM. On a cheap VPS, that headroom lets me run more services without upgrading. Concurrency without complexity. Billing webhooks, file uploads, and AI calls run concurrently without callback hell. Compile-time type safety. Using SQLC, my SQL compiles to type-safe Go. If the query is wrong, it fails at build time, not in production. Predictable performance. No garbage collection pauses that surprise you under load. The architecture (Modular Monolith):I didn't want microservices complexity for a small team, but I needed clean separation. I built a Modular Monolith: features like Auth, Billing, and AI are isolated Go modules with explicit interfaces, but they deploy as a single binary.This structure also made AI coding tools (Cursor, Claude Code) dramatically more effective. Because every module has strict boundaries, the AI knows exactly where new code belongs and doesn't break other modules.Full-stack, not just backend:Backend: Go 1.25 + Gin + SQLC (type-safe SQL, no ORM) + PostgreSQL with pgvector Frontend: Next.js 16 + React 19 + Tailwind + shadcn/ui Communication: The frontend consumes a clean REST API. You can swap Next.js for any framework that speaks HTTP. Infrastructure: Separate Dockerfiles for frontend and backend. Deploy together or apart. What's pre-built:The boring infrastructure is solved so you can focus on your actual product:Auth + RBAC: Stytch B2B integration with Organizations, Teams, and Roles. Multi-tenant data isolation enforced at the query level. Billing: Polar.sh as Merchant of Record. Handles subscriptions, invoices, and global tax/VAT. No Stripe webhook edge cases. AI Pipeline: OpenAI RAG using pgvector. The retrieval service enforces strict context boundaries to minimize hallucinations. OCR: Mistral integration for document extraction. File Storage: Cloudflare R2 integration. Each feature is a separate module. Don't need OCR? Remove it. Want Stripe instead of Polar? The billing interface is abstracted.Real-world proof:This isn't a template I made for GitHub stars. It's the exact code running apflow.co in production. When I added document OCR, I built it as a new module without touching Auth or Billing. The architecture held.How to try it:Clone the repo, read setup.md to check the prerequisite, run ./setup.sh, and you have a working B2B environment locally in minutes.Feedback I want:I'd appreciate feedback from Go developers on the module boundaries and cross-module interfaces. Also curious if anyone has suggestions for the Docker setup in production deployments.GitHub: https://github.com/moasq/production-saas-starterLive: https://apflow.co

Enrichment

Theme
Vertical
Horizontal
Function
Dev tools
Audience
Developer
AI stance
Not AI
Project type
Hobby / open-source project
Normalized one-liner
go and next.js saas starter template
Manually corrected
False

Could you build this?

Yes This is a boilerplate template combining a Go backend (REST/gRPC APIs, auth, Stripe, DB models) with a standard Next.js frontend, easily generated and assembled with AI tools.

Discussion

20 comments analyzed.

Competitors mentioned: Blueprint (oddbit-project) - similar generic framework, go-rest-kit - simpler starter packages, Temporal - for long-running tasks, Vite - frontend alternative to Next.js, Nuxt - Vue-based alternative to Next.js

Concerns raised: Next.js wants to be your backend, forcing duplicate auth code, Next.js middleware breaking changes require rewriting proxy code, Next.js maintainers unhelpful and resistant to non-standard use cases, Next.js team prioritizes Vercel adoption over general platform support, Next.js struggles with white-labeled multi-customer setups with custom domains

Feature requests: Better support for white-label/custom domain per customer scenarios, Improved multi-language auth flow documentation, More examples for non-Vercel deployment patterns

Competitors

Other products that read as similar to this one — 158 launches clear the similarity bar, closest 8 shown.

Attention rank: #32 of 159 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).

Launched 50 days after the earliest competitor.

Other launches for this product

Same idea, different domain

Nobody's really built a dev tools tool for Sales yet.