///
The Aruuri monorepo utilizes a comprehensive set of scripts to manage development, building, testing, and deployment processes. Powered by [Turborepo](https://turbo.build) and [pnpm](https://pnpm.io),
85 views
~85 views from guests
Guest views are estimated from total page views. These include anonymous visitors and users who weren't logged in when they viewed the page.
The Aruuri monorepo utilizes a comprehensive set of scripts to manage development, building, testing, and deployment processes. Powered by Turborepo↗ and pnpm↗, these scripts streamline workflows and ensure consistency across the platform's various applications and packages.
For initial setup and getting your local environment running, please refer to the [Getting Started with Aruuri Development] wiki page. For details on how Aruuri handles deployments and isolated preview environments, see [Deployment & Ephemeral Preview Environments].
Aruuri follows a domain-driven design with functional programming patterns, organized as follows:
apps/: Independent deployments (e.g., web Next.js app, future cms, functions).packages/: Shared code consumed by multiple apps (e.g., services, domain, database, design-tokens, utils).This structure allows for modular development and shared tooling, managed efficiently by Turborepo.
Below is a categorized list of essential scripts for working with the Aruuri monorepo.
These scripts are primarily used during local development to run applications, maintain code quality, and perform initial builds.
| Script | Description | Usage |
|---|---|---|
pnpm run dev | Start all development servers | Local development |
pnpm run build | Build all packages | Before deployment |
pnpm run lint | Run ESLint on all packages | Code quality |
pnpm run lint:fix | Fix ESLint issues on all packages | Auto-fix code quality |
pnpm run typecheck | Run TypeScript checks | Type safety |
pnpm run test | Run all test suites | Testing |
pnpm run test:e2e | Run Playwright E2E tests | Browser testing |
pnpm run storybook | Start Storybook for all packages | Component documentation |
These scripts are used to deploy the Aruuri platform to various environments, including production and preview stages. For a detailed understanding of the deployment architecture, please refer to [Deployment & Ephemeral Preview Environments].
| Script | Description | Environment | Usage |
|---|---|---|---|
pnpm run deploy | Deploy to production | Production | sst deploy --stage production |
pnpm run deploy:dev | Deploy to dev/preview | Preview | sst deploy --stage dev |
pnpm run deploy:preview <stage> | Deploy specific preview | Preview | sst deploy --stage pr-{number} |
pnpm run remove:previews <stage> | Remove preview deployment | Cleanup | tsx scripts/remove-previews.ts pr-{number} |
pnpm run remove:dev | Remove dev deployment | Cleanup | sst remove --stage dev |
SST provides powerful commands for previewing infrastructure changes and managing the state of deployed resources.
| Script | Description | Usage |
|---|---|---|
pnpm run diff | Preview production changes | Before production deploy |
pnpm run diff:dev | Preview dev changes | Before dev deploy |
pnpm run diff:preview <stage> | Preview changes for preview stage | pnpm run diff:preview pr-31 |
pnpm run refresh:dev | Sync dev state with AWS resources | After manual resource deletion |
pnpm run refresh:preview <stage> | Sync preview state with AWS | pnpm run refresh:preview pr-31 |
These scripts interact directly with the SST framework for more granular control over the development and debugging of infrastructure.
| Script | Description | Usage |
|---|---|---|
pnpm run sst:dev | Start SST dev mode with live AWS resources | Local development with AWS |
pnpm run sst:shell | Open SST shell for deployed resources | Debug deployed resources |
pnpm run sst:remove | Remove all SST resources (for a stage) | Cleanup |
pnpm run sst:unlock | Clear deployment locks | Fix stuck deployments |
pnpm run sst:state:export | Export state for debugging | Troubleshooting |
pnpm run sst:state:repair | Repair corrupted state | State issues |
pnpm run sst:types | Generate SST types for IDE/TS | Type generation |
To run commands specific to a single package within the monorepo, use the --filter flag with pnpm.
| Package | Script | Description |
|---|---|---|
@aruuri/web | pnpm --filter @aruuri/web run dev | Start Next.js dev server |
@aruuri/web | pnpm --filter @aruuri/web run storybook | Start Storybook |
@aruuri/database | pnpm --filter @aruuri/database run dev:db:setup | Setup local database |
@aruuri/database | pnpm --filter @aruuri/database run db:studio | Open Drizzle Studio |
Specific build commands for managing package dependencies and assets.
| Script | Description | When to Use |
|---|---|---|
pnpm run build:deploy | Build for deployment | CI/CD pipelines |
pnpm run build:design-tokens | Build design tokens only | After token changes |
pnpm run build:design-tokens:deps | Build tokens and dependents | Token changes affecting other packages |
Aruuri employs a robust testing strategy to ensure code quality and reliability, leveraging the following tools:
All test suites across the monorepo can be executed with a single command:
This command uses Turborepo to run tests in parallel across all packages.
To run tests for a specific package or to use package-specific test commands (like test:ui or test:coverage), use the --filter flag:
For end-to-end tests:
.test.ts, .spec.ts, .test.tsx, .spec.tsx) or placed in a dedicated test/ directory within a package.apps/web/test/utils.tsx) centralize common setup for React component tests.For more detailed information on testing setup, patterns, and best practices, refer to the docs/TESTING.md guide.