A modern full-stack monorepo template featuring Next.js frontend, NestJS backend, shared TypeScript types, and shadcn/ui components.
This monorepo is organized with the following structure:
apps/web/- Next.js 14 frontend application with App Routerapps/server/- NestJS backend API serverpackages/ui/- Shared shadcn/ui components librarypackages/types/- Shared TypeScript type definitionspackages/eslint-config/- Shared ESLint configurationspackages/typescript-config/- Shared TypeScript configurations
- Node.js 18+
- pnpm (recommended package manager)
# Clone the repository
git clone <your-repo-url>
cd developer-logs
# Install dependencies
pnpm install
# Start development servers
pnpm devThis will start both the Next.js frontend (port 3000) and NestJS backend (port 3001).
To add components to your web app, run the following command from the root:
pnpm dlx shadcn@latest add button -c apps/webThis will place the ui components in the packages/ui/src/components directory, making them available across the monorepo.
Import components in your Next.js app from the shared ui package:
import { Button } from "@workspace/ui/components/button"
export default function MyPage() {
return (
<div>
<Button>Click me</Button>
</div>
)
}# Start all applications in development mode
pnpm dev
# Build all packages and applications
pnpm build
# Run tests across the monorepo
pnpm test
# Lint all packages and applications
pnpm lint
# Type check all TypeScript files
pnpm type-checkYour tailwind.config.ts and globals.css are already configured to use components from the ui package.
Shared TypeScript configurations are available in packages/typescript-config/:
base.json- Base configurationnextjs.json- Next.js specific configurationreact-library.json- React library configuration
Shared ESLint configurations are available in packages/eslint-config/:
base.js- Base configurationnext.js- Next.js specific rulesreact-internal.js- React internal rules
- Full-Stack Development: Next.js frontend with NestJS backend
- Shared Components: shadcn/ui components shared across the monorepo
- Type Safety: Shared TypeScript types between frontend and backend
- Modern Tooling: ESLint, Prettier, and TypeScript configurations
- Monorepo Management: Turbo for fast builds and development
- Package Management: pnpm workspaces for efficient dependency management
# Run only the Next.js frontend
pnpm --filter web dev
# Run only the NestJS backend
pnpm --filter server dev
# Build only the UI package
pnpm --filter ui build- Frontend: Next.js 14, React 18, TypeScript
- Backend: NestJS, TypeScript
- Styling: Tailwind CSS, shadcn/ui
- Package Manager: pnpm
- Monorepo Tooling: Turbo
- Linting: ESLint
- Type Checking: TypeScript