Every time I start a new project, I do the same thing.
Set up the Go backend. Set up the React frontend. Figure out how they talk to each other in dev. Figure out how they deploy together. Add auth. Add sign up, sign in, sign out. Protect the routes. Store the token somewhere. And then , finally , I can start working on the thing I actually wanted to build.
That part is always the same. And it's always slow.
So I searched on GitHub for a starter that could save me this work. I found a lot of repos, but most of them had one of these problems:
- Only the backend, no frontend
- Only the frontend, no backend
- Auth was "just add your own provider later"
- Built for a tutorial, not for production
- Old versions of everything
- No multi-tenancy, and adding it later is painful
I just wanted one repo where I could clone it, set two env vars, run make dev, and start writing my feature. That repo didn't exist the way I wanted it. So I built it.
gin-react-monorepo
Here it is: github.com/calebeaires/gin-react-monorepo
It's a full-stack monorepo with:
- Go + Gin on the backend
- React 19 + Vite + TypeScript on the frontend
- Tailwind v4 + shadcn/ui for the UI
- Authula for email/password auth (lives in your codebase, no SaaS)
- Neon Postgres with schema-per-tenant multi-tenancy
- Bun as the ORM
- Single binary deploy , Go embeds the built React app
You clone it, set DATABASE_URL and AUTHULA_SECRET, run make dev, and you already have sign up, sign in, protected routes, organizations, members, roles, and tenant-scoped endpoints working.
The parts I didn't want to write again
Auth that just works
You sign up, you get a token, the token goes in a Bearer header, the middleware checks it on every request. No magic. No third-party dashboard. The auth code is in the repo and you can change it.
Multi-tenancy out of the box
This is the part I hate doing from scratch. Every B2B app needs organizations. Users belong to orgs. Each org has its own data. Roles. Invites. All of it.
The repo uses schema-per-tenant on Postgres. Each org gets its own schema (tenant_<slug>). When a request comes in with the X-Org-Slug header, the middleware starts a transaction and sets search_path to that tenant's schema. Your handler doesn't know or care , it just queries as normal and the data is isolated.
Creating an org creates the schema. Deleting an org drops it. Owners, admins and members have different permissions. It's all already there.
Frontend and backend that actually talk in dev
In development, Vite runs on :5173 and Go runs on :8081. Vite proxies /api and /auth to the Go server, so everything is same-origin and you don't fight CORS.
In production, Vite builds the React app to static files, Go embeds them with //go:embed, and you ship one binary. One file, one process, one port. No Nginx. No separate static server. No Docker Compose with three services.
A clear place to add your feature
The README has a full tutorial for adding a "Projects" feature end to end , model, migration, handler, route, frontend page. Six steps, tenant-isolated, authenticated, done.
That's the whole point. The boring stuff is done. You just add the thing you care about.
Who this is for
If you're like me and you want to build a B2B SaaS or any app with accounts and organizations, and you don't want to spend the first week of every project wiring up the same boilerplate, this is for you.
If you like Go but don't want to pick a frontend stack from scratch every time, this is for you.
If you want multi-tenancy done the right way without reading ten blog posts about search_path, this is for you.
I need your help
This is open source (MIT) and I want it to grow. I built the first version for myself, but a starter like this only gets really good when more people use it and push back on the decisions.
So if this sounds useful to you, here's how you can help:
-
Try it out. Clone it, run
make dev, build something small with it. Tell me what broke, what felt weird, what was missing. - Star the repo. It's a small thing but it helps other people find it.
- Open issues. Bugs, ideas, questions, "why did you do it this way" , all welcome.
- Send PRs. Some things I'd love help with: OAuth providers (Google, GitHub) as Authula plugins, a better invite flow, tests, Docker + Fly.io deploy examples, i18n for more languages, dark mode polish.
- Share it. If you know someone stuck doing the same boilerplate over and over, send it their way.
I want this to be the repo I wish I had found on GitHub. I can't get it there alone.
Link: github.com/calebeaires/gin-react-monorepo
Thanks for reading. Now go build the thing you actually wanted to build.
Top comments (0)