This repository contains framework projects utilizing moonrepo and the technology stack commonly used within Zero One Group, with TypeScript and Go as the main languages.
To get started, several templates for backend and frontend applications are available. The frontend stack includes React with the Vite bundler, as well as Next.js. A shared UI Library, shadcn, is also provided.
Additionally, the following tools and libraries are included:
- Tailwind CSS for utility-first CSS framework.
- Radix UI for accessible, unstyled UI components.
- Vitest for fast unit testing.
- Playwright (optional) for end-to-end testing.
- Biome for code formatting and linting.
To begin, we suggest installing moon globally, read the documentation here.
Then, follow these steps (don't forget to replace my-new-project
with your project name):
- Clone this repository:
npx tiged zero-one-group/monorepo my-new-project
- Initialize git repository:
cd my-new-project && git init
- Install the required toolchain:
moon setup
- Install the necessary dependencies:
pnpm install
- Create
.env
file or duplicate the.env.example
file, then configure required variables.
Find and replace the myorg
namespace and example.com
string with your own organization
or project-specific namespace. This is necessary to ensure that all configurations,
dependencies, and references are correctly aligned with your project's unique identifier.
This includes updating any configuration files, package names, and other references
throughout the codebase where myorg
is used.
Optinally, you'll need to install Static Web Server to preview generated websites or Single-Page Applications (SPAs).
Currently, Go is not supported as an official moonrepo toolchain. You need to manually install and configure it for your project. Please read the Go installation docs.
For a list of supported toolchains, visit moonrepo documentation.
To get started, you can use the following command to generate a new application from a template.
moon generate TEMPLATE_NAME
Example, creating React application:
moon generate moon-vite-react-tailwind
Explore the zero-one-group/templates
repository to see all available templates.
After setting up your project, use the following commands for common tasks:
Command | Description |
---|---|
moon :dev |
Start developing the project |
moon :build |
Build all projects |
moon :test |
Run tests in all projects |
moon :lint |
Lint code in all projects |
moon :format |
Format code in all projects |
moon <project_id>:<task> |
Run specific task by project |
moon check <project_id> |
Run check for individual project |
moon check --all |
Run check for all tasks |
moon run '#tag:task' |
Run a task in all projects with a tag |
moon project-graph |
Display an interactive graph of projects |
Type moon help
for more information. Refer to the moon tasks documentation for more details.
To add a new dependency to a project, you can use the following command:
pnpm --filter <project_id> add <dependency>
Or, if you want to add development dependencies, you can use the following command:
pnpm --filter <project_id> add -D <dependency>
Example:
pnpm --filter website add -D vitest
To update all projects dependencies, you can use the following command:
pnpm run update-deps
Sometimes it is necessary to clean up dependencies and build artifacts from the project. To do this, you can use the following command:
pnpm run cleanup
Cleanup workspace (optional):
pnpm run cleanup-workspace
After all, you can reinstall the dependencies and build the project.
After creating a new project from this template repository, ensure you update the documentation, including:
- Project Overview: Briefly describe the project's purpose and features.
- Installation Instructions: Update steps to reflect any project-specific changes.
- Usage Guide: Provide instructions on how to use the project, including commands and configurations.
- API Documentation: If applicable, update API endpoints, request/response formats, and examples.
- Contributing Guidelines: Reflect any new processes or requirements for contributions.
- License Information: Ensure the license is accurate for the new project.
Keeping documentation current helps others understand, use, and contribute to the project.