This is a starter template for a Nextjs in a Turborepo monorepo setup.
@umontreal/web-app
: a Next.js app@umontreal/web-app-e2e
: End To End tests with Playwright@umontreal/eslint-config-custom
:eslint
configurations for client side applications (includeseslint-config-next
andeslint-config-prettier
)@umontreal/typescript-config
: tsconfig.json's used throughout the monorepo
Each package/app is 100% TypeScript.
NextJs is a React framework that enables server-side rendering for React based web applications. It is packed with the following packages:
- Shadcn UI a React component library
- Tailwind CSS for styling
- Storybook for component development
- Vitest for unit testing
- Tanstack Query for data fetching and mutations
- Tanstack React Table for table rendering
- React Hook Form for form handling
- Zod for data validation
- I18next for internationalization
This repo is configured to be built with Docker, and Docker compose. To build all apps in this repo:
# Create a network, which allows containers to communicate
# with each other, by using their container name as a hostname
docker network create app_network
# Build prod using new BuildKit engine
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose -f docker-compose.yml build
# Start prod in detached mode
docker-compose -f docker-compose.yml up -d
Open http://localhost:3000.
To shutdown all running containers:
# Stop all running containers
docker kill $(docker ps -q) && docker rm $(docker ps -a -q)
This example includes optional remote caching. In the Dockerfiles of the apps, uncomment the build arguments for TURBO_TEAM
and TURBO_TOKEN
. Then, pass these build arguments to your Docker build.
You can test this behavior using a command like:
docker build -f apps/web-app/Dockerfile . --build-arg TURBO_TEAM=“your-team-name” --build-arg TURBO_TOKEN=“your-token“ --no-cache
This Turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Vitest test runner for all things JavaScript
- Prettier for code formatting