This template provides basic starter applications for backend, web, and mobile development. These are minimal implementations that should be enhanced according to your specific project requirements.
The workspace includes a shared libs/shared library that can be used to share code among all applications.
Before you begin, ensure you have the following installed:
- Node.js 22+ - Install Node.js
- pnpm - Install pnpm
- Rename the project:
Replace all occurrences of:
Templatewith<YourNewProjectName>(case-sensitive)templatewith<your-project-name>(case-sensitive)
by excluding pnpm-lock.yaml, README.md, and AGENTS.md files for both of them.
This includes updating package names, workspace names, and any references throughout the codebase.
- Install dependencies:
pnpm install- Set up environment variables:
cp .env.example .envEdit .env with your configuration values as needed.
The following commands are available from the root package.json:
pnpm backend- Start the backend serverpnpm marketing- Start the marketing (Next.js) apppnpm ios- Start the iOS mobile apppnpm android- Start the Android mobile app
pnpm add multer --filter "backend"
pnpm add react-native-reanimated --filter "mobile"
pnpm add framer-motion --filter "marketing"To run the dev server for your app, use:
pnpm nx serve @template/backendTo create a production bundle:
pnpm nx build @template/backendTo see all available targets to run for a project, run:
pnpm nx show project @template/backendThese targets are either inferred automatically or defined in the project.json or package.json files.
More about running tasks in the docs »
While you could add new projects to your workspace manually, you might want to leverage Nx plugins and their code generation feature.
Use the plugin's generator to create new projects.
To generate a new application, use:
pnpm nx g @nx/node:app demoTo generate a new library, use:
pnpm nx g @nx/node:lib <your-library-name>You can use pnpm nx list to get a list of installed plugins. Then, run pnpm nx list <plugin-name> to learn about more specific capabilities of a particular plugin. Alternatively, install Nx Console to browse plugins and generators in your IDE.
Learn more about Nx plugins » | Browse the plugin registry »
Nx Console is an editor extension that enriches your developer experience. It lets you run tasks, generate code, and improves code autocompletion in your IDE. It is available for VSCode and IntelliJ.
Learn more:
- Learn more about this workspace setup
- Learn about Nx on CI
- Releasing Packages with Nx release
- What are Nx plugins?
And join the Nx community: