Includes two Next.js applications, apps/web and apps/admin, mapped to ports 3000 and 3001 respectively
monorepo-template — Next.js Business Template
By dknalp
A monorepo starter template for Go + Next.js, containing two frontend applications (web and admin), three Go services (api/auth/storage), shared Go and UI packages, plus Docker Compose and GitHub Actions CI configuration.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Actual screenshot captured by the server browser.
All pages & views 2
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Includes three Go services, services/api, services/auth, and services/storage, mapped to ports 8080, 8081, and 8082 respectively
packages/go-api-lib provides shared Go middleware, response helpers, and error handling; packages/ui provides shared React components and Tailwind presets
Uses Turborepo + pnpm workspaces to manage the JS side and go.work to manage the Go side
The infra directory provides docker-compose.yml and a Dockerfile for each service
The README lists five project rules: main.go only bootstraps, databases are isolated per service, shared Go code goes only in go-api-lib, shared UI code goes only in ui, and internal is private
Template Details
This template is a Go + Next.js + Tailwind CSS monorepo starter project. The README recommends cloning it for each new project and reading CONTRIBUTING.md first. The repository structure is divided into apps (web running on localhost:3000, admin running on localhost:3001), services (api 8080, auth 8081, storage 8082), packages (go-api-lib providing Go middleware, response helpers, and error handling; ui providing shared React components and Tailwind presets), infra (docker-compose.yml and one Dockerfile per service), and .github/workflows/ci.yml. The JS side uses Turborepo and pnpm workspaces, while the Go side uses a native go.work workspace. The database is PostgreSQL with one database per service. The README lists local development commands (pnpm install, pnpm dev, go run ./cmd/api, docker compose up), first-time configuration steps for a new project (change the go.mod module name, change the package.json package name, copy .env.example to .env, run go work sync), and steps for adding a new service and a new frontend application. The README does not describe the specific business functionality of each service, database table schemas, the environment variable list, how to deploy to production, or test coverage.
Is it right for your project?
Use Cases
- Starting a new project that needs to maintain multiple Next.js frontends and multiple Go backend services simultaneously
- Wanting to manage Go and JS dependencies separately in the same repository using go.work and pnpm workspaces
- Needing to configure an independent PostgreSQL database for each service and avoid sharing schemas across services
- Wanting to start all frontend and backend services locally at once via Docker Compose
- Needing a GitHub Actions-based CI configuration as a starting point for continuous integration
Suitable For
- Development teams building multi-service applications with Go and Next.js
- Monorepo projects that need to split databases by service and share Go and UI code
- Developers familiar with pnpm, Turborepo, Docker Compose, and Go workspaces
- Teams that want to standardize new project structure and collaboration conventions via a template
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
Prerequisites: Go 1.22+, Node.js 20+, pnpm 9+, Docker and Docker Compose
- 2
After cloning, run pnpm install to install JS dependencies, use pnpm dev to start frontend hot reload, enter services/api and run go run ./cmd/api to run the Go service, or run docker compose up in the infra directory to start all services
- 3
First-time configuration for a new project requires changing the module name in all go.mod files (change github.com/agency/* to your own organization and project path), changing the package name in package.json (change @agency/* to your own scope), copying .env.example to .env and filling in values, then running go work sync
- 4
To add a service, create services/<name>/cmd/<name> and internal/{handler,service,repository} directories, copy go.mod and update the module name, add an entry in go.work, and add the corresponding configuration in infra/docker-compose.yml and infra/dockerfiles
- 5
To add a frontend application, run pnpm create next-app in the apps directory and specify TypeScript, Tailwind, app, and no-src-dir, add the @agency/ui workspace dependency, and change tailwind.config.ts to extend packages/ui/tailwind-preset
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version under the MIT license in a public repository; the free scope is the code of this version and does not mean external services or third-party assets are free.
Must comply with when using
- Free use, modification, commercial use, and distribution of this version's code are permitted.
- When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
- The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.
Additional costs & items to verify
- Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
- External services such as domains, hosting, databases, payments, or AI may incur separate charges.
View Original Text Basis
https://github.com/dknalp/monorepo-template/blob/main/LICENSEhttps://github.com/dknalp/monorepo-template/blob/main/README.mdPermission is hereby granted, free of charge
Original License Text
Compiled by DeepSeek based on repository license and README ·2026-10-14. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- GitHub
- Documentation and maintenance reference score
- More documented · 85 / 100
- Technologies
- Next.js · React
- Website type
- Corporate Website · Starter
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2026-09-09
- Screenshot last checked
- 2026-10-14
A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.
The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Review declaration: codex-user-requested-batch-review-20261015 · 2026-10-15
Inspect the recorded source material
SHA-256: 42d9ef67d7df9d4f14bf98985d1f7d7e8c6283bb429ac307751e92ea7620c4a1
2026-10-14T00:24:53.328Z
Source file / repository# Agency Monorepo Template
> Production-ready monorepo starter for Go + Next.js + Tailwind CSS.
> Clone this for every new project. Read `CONTRIBUTING.md` before writing any code.
[](https://github.com/dknalp/monorepo-template/actions/workflows/ci.yml)
[](./LICENSE)
---
## Stack
| Layer | Technology |
|---|---|
| Frontend | Next.js 15, React 19, Tailwind CSS 4 |
| Backend | Go 1.22, stdlib `net/http` |
| Monorepo (JS) | Turborepo + pnpm workspaces |
| Monorepo (Go) | `go.work` (native Go workspaces) |
| Database | PostgreSQL — **one DB per service** |
| Containers | Docker + Docker Compose |
| CI | GitHub Actions |
---
## Structure
```
.
├── apps/
│ ├── web/ # Main Next.js app → localhost:3000
│ └── admin/ # Admin Next.js app → localhost:3001
│
├── services/
│ ├── api/ # API gateway → localhost:8080
│ ├── auth/ # Auth service → localhost:8081
│ └── storage/ # Storage service → localhost:8082
│
├── packages/
│ ├── go-api-lib/ # Shared Go: middleware, response helpers, errors
│ └── ui/ # Shared React components + Tailwind preset
│
├── infra/
│ ├── docker-compose.yml
│ └── dockerfiles/ # One Dockerfile per service
│
├── .github/workflows/ci.yml
├── go.work # Ties all Go modules together
├── turbo.json
└── pnpm-workspace.yaml
```
---
## Getting Started
### Prerequisites
- Go 1.22+
- Node.js 20+
- pnpm 9+
- Docker + Docker Compose
### Local Development
```bash
# Clone
git clone https://github.com/dknalp/monorepo-template.git my-project
cd my-project
# Install JS deps
pnpm install
# Run all frontends (hot reload)
pnpm dev
# Run a Go service
cd services/api && go run ./cmd/api
# Run everything with Docker
cd infra && docker compose up
```
### First-time Setup for a New Project
```bash
# 1. Update module names in all go.mod files
# Change: github.com/agency/* → github.com/yourorg/yourproject/*
# 2. Update package names in package.json files
# Change: @agency/* → @yourorg/*
# 3. Copy .env.example → .env and fill in values
# 4. Run go work sync
go work sync
```
---
## The 5 Rules (must be followed on every project)
1. **`cmd/<service>/main.go` is bootstrap only** — no business logic ever
2. **Database-per-service** — never share schemas across services
3. **Shared Go code** → `packages/go-api-lib` only
4. **Shared UI code** → `packages/ui` only
5. **`internal/` is private** — Go enforces this at compile time
See [CONTRIBUTING.md](./CONTRIBUTING.md) for full standards.
---
## Adding a New Service
```bash
mkdir -p services/myservice/cmd/myservice
mkdir -p services/myservice/internal/{handler,service,repository}
# Copy go.mod from services/api, update module name
# Add entry to go.work
# Add service to infra/docker-compose.yml
# Add infra/dockerfiles/myservice.Dockerfile
```
## Adding a New Frontend App
```bash
cd apps && pnpm create next-app myapp --typescript --tailwind --app --no-src-dir
# Add "@agency/ui": "workspace:*" to dependencies
# Replace tailwind.config.ts to extend packages/ui/tailwind-preset
```
---
## License
[MIT](./LICENSE)
Explore similar templates
Compare previews and descriptions within the same stack and category.

Next.js SaaS Starter
The official Next.js SaaS starter template, integrating email/password authentication, Stripe Checkout subscriptions, a dashboard with user/team CRUD, basic Owner/Member RBAC, and activity logging.
Next.js · SaaS

Next.js Commerce
Vercel's officially maintained Next.js App Router ecommerce starter with deep Shopify integration, offering a complete product catalog, cart, and checkout flow. Core logic is modular for swapping backends, and community provider versions exist for BigCommerce, Medusa, and Saleor.
Next.js · E-commerce

Next-js-Boilerplate
A developer-first Next.js 16 starter with Tailwind CSS 4 and TypeScript, supporting both App Router and Page Router.
Next.js · Starter

tailwind-nextjs-starter-blog
A Next.js and Tailwind CSS blog starter template using Contentlayer for Markdown/MDX, with built-in SEO, code highlighting, and tags. It targets personal technical blogs and migration from Jekyll/Hugo to React, and supports one-click Vercel deployment.
Next.js · Blog

next-forge
next-forge is a Turborepo-based Next.js template maintained by Vercel, positioned as a starting point for SaaS products.
Next.js · Starter

SaaS-Boilerplate
SaaS-Boilerplate is an open-source SaaS starter template built with Next.js App Router, React 19, TypeScript, Tailwind CSS, and Shadcn UI.
Next.js · SaaS
