Next.jsReactCorporate WebsiteStarter

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.

2 previews
Desktop homepage1 / 2
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 2

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-14View source

What stands out

A quick read of the recorded project description.

01

Includes two Next.js applications, apps/web and apps/admin, mapped to ports 3000 and 3001 respectively

02

Includes three Go services, services/api, services/auth, and services/storage, mapped to ports 8080, 8081, and 8082 respectively

03

packages/go-api-lib provides shared Go middleware, response helpers, and error handling; packages/ui provides shared React components and Tailwind presets

04

Uses Turborepo + pnpm workspaces to manage the JS side and go.work to manage the Go side

05

The infra directory provides docker-compose.yml and a Dockerfile for each service

06

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.

Next.jsCorporate websiteStarter

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. 1

    Prerequisites: Go 1.22+, Node.js 20+, pnpm 9+, Docker and Docker Compose

  2. 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. 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. 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. 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

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This 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

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.

[![CI](https://github.com/dknalp/monorepo-template/actions/workflows/ci.yml/badge.svg)](https://github.com/dknalp/monorepo-template/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./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)
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.