Warning
This project still under construction
This is a monorepo boilerplate setup using Next.js for the frontend and Strapi for the backend, managed with yarn
workspaces and turbo
. This setup is designed to streamline the development of full-stack applications, providing a solid foundation with best practices and tools.
- Next.js for the frontend.
- Strapi as the headless CMS backend.
- yarn for fast and disk-efficient package management.
- turbo for optimized task running across the monorepo.
- Prettier with Tailwind CSS plugin for consistent code formatting.
- Node.js:
>=18.17.0 <=20.x.x
- yarn:
>=6.0.0
-
Clone the repository:
git clone https://github.com/yourusername/nextjs-strapi-boilerplate.git cd nextjs-strapi-boilerplate
-
Install dependencies:
yarn install
TODO: explain how to generate env variable & access token from strapi for front
-
Running the Development Servers
To start both the frontend and backend in development mode:
yarn dev
To start only the frontend (Next.js):
yarn dev:front
To start only the backend (Strapi):
yarn dev:back
-
Building the Project
To start both the frontend and backend in development mode:
yarn build
-
Formatting Code
To format your code using Prettier:
yarn format
-
Cleaning Up
To clean the project and remove node_modules:
yarn clean
├── apps
│ ├── frontend # Next.js app
│ └── backend # Strapi app
├── packages # Shared packages (e.g., utilities, components)
├── turbo.json # Turbo configuration
├── yarn-workspace.yaml # yarn workspaces configuration
├── package.json # Root package configuration
└── README.md # This file
This project is licensed under the ISC License.