This monorepo setup features two different Next.js applications located in the apps folder:
- storefront
- backoffice
At the root level, we have the packages folder, which includes the following packages:
This package contains common service dependencies used across your projects, such as databases, CMS, config files, and clients. An example provided is the Supabase clients.
This package includes UI-related packages, shared components, and Tailwind CSS configurations. The UI package.json
already includes several dependencies:
- Storybook: A tool for developing UI components in isolation.
- Tailwind CSS: A utility-first CSS framework.
- Class Variance Authority: A utility for managing component styles.
This package contains common utilities such as hooks and utility functions.
Root-level configurations are extended into other packages, including:
prettier.config.mjs
: Prettier configuration.eslint-config.mjs
: ESLint configuration.tsconfig.json
: TypeScript configuration.
Husky is set up to manage Git hooks, and commitlint is configured to enforce conventional commit messages.
The root compose.yml
file defines Docker containers for both the storefront and backoffice applications.
This monorepo uses Turbopack for bundling and build orchestration.
This structure provides a scalable and maintainable foundation for developing and deploying multiple applications and packages within a single repository.