WIP
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
---
|
||||
description: how to run commands in the monorepo
|
||||
globs:
|
||||
alwaysApply: true
|
||||
---
|
||||
Almost all commands in the monorepo should be executed when `pnpm run ...` from the root of the monorepo. For example, running tests for the `@internal/run-engine` internal package:
|
||||
|
||||
```
|
||||
pnpm run test --filter @internal/run-engine
|
||||
```
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
description: understanding the structure of the monorepo
|
||||
globs:
|
||||
alwaysApply: true
|
||||
---
|
||||
This is a pnpm 8.15.5 monorepo that uses turborepo [turbo.json](mdc:turbo.json). The following workspaces are relevant:
|
||||
|
||||
- <root>/apps/webapp is a remix app that is the main API and dashboard for trigger.dev
|
||||
- <root>/packages/trigger-sdk is the `@trigger.dev/sdk` main SDK package
|
||||
- <root>/packages/cli-v3 is the `trigger.dev` CLI package
|
||||
- <root>/packages/core is the `@trigger.dev/core` package that is shared across the SDK and other packages
|
||||
- <root>/packages/build defines the types and prebuilt build extensions for trigger.dev
|
||||
- <root>/packages/react-hooks defines some useful react hooks like our realtime hooks
|
||||
- <root>/internal-packages/* are packages that are used internally only, not published, and usually they have a tsc build step and are used in the webapp
|
||||
- <root>/references/* are test workspaces that we use to write and test the system. Not quite e2e tests or automated, but just a useful place to help develop new features
|
||||
- <root>/docs is our trigger.dev/docs mintlify documentation site
|
||||
|
||||
Other things in the monorepo to note:
|
||||
|
||||
The [Dockerfile](mdc:docker/Dockerfile) is the one that creates the main trigger.dev published image, and the [docker-compose.yml](mdc:docker/docker-compose.yml) is the file we run locally to start postgresql, redis, and electric when we are doing local development. The [CONTRIBUTING.md](mdc:CONTRIBUTING.md) file defines the steps it takes for OSS contributors to start contributing.
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
description: Making updates to the main trigger.dev remix webapp
|
||||
globs: apps/webapp/**/*.tsx,apps/webapp/**/*.ts
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
# Your rule content
|
||||
|
||||
The main trigger.dev webapp, which powers it's API and dashboard and makes up the docker image that is produced as an OSS image, is a Remix 2.1.0 app that uses an express server, written in TypeScript. The following subsystems are either included in the webapp or are used by the webapp in another part of the monorepo:
|
||||
|
||||
- `@trigger.dev/database` exports a Prisma 5.4.1 client that is used extensively in the webapp to access a PostgreSQL instance. The schema file is [schema.prisma](mdc:internal-packages/database/prisma/schema.prisma)
|
||||
- `@trigger.dev/core` is a published package and is used to share code between the `@trigger.dev/sdk` and the webapp. It includes functionality but also a load of Zod schemas for data validation. When importing from `@trigger.dev/core` in the webapp, we never import the root `@trigger.dev/core` path, instead we favor one of the subpath exports that you can find in [package.json](mdc:packages/core/package.json)
|
||||
Reference in New Issue
Block a user