Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Use `pnpm w:<workspace>` shortcuts:
- Follow existing code conventions and patterns in the file being edited
- Test changes thoroughly before completion
- Using `any` to fix type errors shuold be avoided
- Code quality is enforced via **Prettier** (formatting) and **TypeScript** (type checking) only

### Coding Conventions

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ Backend services and utilities, often consumed by the applications.

Shareable configurations for tooling.

- **[`configs/eslint-config`](./configs/eslint-config/README.md)**: Shared ESLint configurations (`base.js`, `next.js`, etc.) to enforce consistent code style and quality. The `next.js` config is widely used across workspaces.
- **[`configs/typescript-config`](./configs/typescript-config/README.md)**: Shared TypeScript `tsconfig.json` base files (`base.json`, `nextjs.json`, `react-library.json`, etc.) to ensure consistent compiler options.

## Development Workflow
Expand All @@ -64,7 +63,7 @@ _(Commands below assume usage of the `w:<workspace>` shorthand)_
- After modifying the database schema (`services/db/schema/tables/*.sql`), run `pnpm w:db generate` to create SQL migrations and extract indexes.
- Apply migrations by running `pnpm w:db migrate`.
- Generate Supabase types by running `pnpm w:supabase typegen`.
- **Linting**: Run `pnpm lint` in the root to lint all workspaces, or `pnpm w:<workspace> lint` (e.g., `pnpm w:app lint`) to lint a specific workspace.
- **Type Checking**: Run `pnpm typecheck` to type-check all workspaces, or `pnpm w:<workspace> typecheck` (e.g., `pnpm w:app typecheck`) for a specific workspace.
- **Running Specific Workspaces**: Use `pnpm w:<workspace> <script>` (e.g., `pnpm w:app dev`). Workspace names (`app`, `api`, `ui`, `core`, `hooks`, `db`, `emails`, `supabase`, `trpc`) correspond to the directories.
- **Adding Dependencies**: Use `pnpm add <package-name> --filter <workspace-name>` (e.g., `pnpm add zod --filter @op/core`). For dev dependencies, use `-D`. (Note: Using `--filter` is recommended when adding dependencies from the root to ensure the `package.json` is updated correctly).

Expand Down
2 changes: 1 addition & 1 deletion apps/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ As a Next.js application using the App Router, the structure includes:
## Development

- Run `pnpm dev` to start the Next.js development server (usually on port 3300).
- Run `pnpm lint` to lint and type-check the code.
- Run `pnpm typecheck` to type-check the code.
- Run `pnpm build` to create a production build.
- Run `pnpm start` to run the production build.
4 changes: 2 additions & 2 deletions apps/app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ As a Next.js application using the App Router, it follows standard conventions:
**Depends On:**

- **`@op/core`**: For shared configuration or types.
- **`@op/eslint-config` (Dev)**: For linting configuration.

- **`@op/hooks`**: Utilizes shared hooks.
- **`@op/supabase`**: Uses Supabase client utilities.
- **`@op/trpc`**: Imports the tRPC provider/client.
Expand All @@ -58,7 +58,7 @@ As a Next.js application using the App Router, it follows standard conventions:
## Development

- Run `pnpm dev` to start the Next.js development server (on port 3100).
- Run `pnpm lint` to lint and type-check the code.
- Run `pnpm typecheck` to type-check the code.
- Run `pnpm build` to create a production build.
- Run `pnpm start` to run the production build (on port 3100).

Expand Down
4 changes: 2 additions & 2 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The main exports are defined in the `exports` field of `package.json`.

**Depends On:**

- **`@op/eslint-config` (Dev)**: Used for linting configuration during development.

- **`@op/typescript-config` (Dev)**: Used for TypeScript configuration during development.

**Depended On By:**
Expand All @@ -38,5 +38,5 @@ The main exports are defined in the `exports` field of `package.json`.

## Development

- Run `pnpm lint` to lint and type-check the code.
- Run `pnpm typecheck` to type-check the code.
- There might not be a specific `dev` script if this package primarily exports utilities/config.
4 changes: 2 additions & 2 deletions packages/hooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Specific hooks and utilities are made available through the `exports` map in `pa
**Depends On:**

- **`@op/core`**: For shared configurations or utilities (e.g., `cookieDomains`, `OPURLConfig` used in `src/utils/nukeCookies.ts`).
- **`@op/eslint-config` (Dev)**: Used for linting configuration during development.

- **`@op/supabase`**: To interact with the Supabase backend client (specifically the browser client) and import Supabase types.
- **`@op/typescript-config` (Dev)**: Used for TypeScript configuration during development.

Expand All @@ -37,6 +37,6 @@ Specific hooks and utilities are made available through the `exports` map in `pa

## Development

- Run `pnpm lint` to lint and type-check the code.
- Run `pnpm typecheck` to type-check the code.
- Testing might involve using React Testing Library or similar tools, although no specific test script is present in the `package.json`.
- No specific test setup is currently configured in this package.
4 changes: 2 additions & 2 deletions packages/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Components and utilities are exported via the `exports` map in `package.json`.
**Depends On:**

- **`@op/core`**: For shared constants, specifically `commonColors` used in `tailwind.shared.ts`.
- **`@op/eslint-config` (Dev)**: Used for linting configuration during development.

- **`@op/typescript-config` (Dev)**: Used for TypeScript configuration during development.

**Depended On By:**
Expand All @@ -44,7 +44,7 @@ Components and utilities are exported via the `exports` map in `package.json`.
## Development

- Run `pnpm dev` to start the Storybook server (usually on port 3600).
- Run `pnpm lint` to lint and type-check the code.
- Run `pnpm typecheck` to type-check the code.
- Run `pnpm build` to create a production build of Storybook.

## Adding Intent UI Components
Expand Down
4 changes: 2 additions & 2 deletions services/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Key exports (`.`, `client` -> `TRPCProvider.tsx`, `vanilla`) are defined in `pac

- **`@op/core`**: Relies on the core package for shared configuration and constants (e.g., `OPURLConfig`, `cookieOptionsDomain`, `adminEmails`, `APP_NAME`).
- **`@op/db`**: Relies heavily on the database package for schema definitions and the database client (used within procedures/middleware, often via context augmentation not shown in `createContext` directly).
- **`@op/eslint-config` (Dev)**: Used for linting configuration during development.

- **`@op/supabase`**: Uses the Supabase package for client creation helpers (`@op/supabase/lib`), types (`@op/supabase/types`), and relies on its cookie handling logic for authentication state management.
- **`@op/typescript-config` (Dev)**: Used for TypeScript configuration during development.

Expand All @@ -56,5 +56,5 @@ Key exports (`.`, `client` -> `TRPCProvider.tsx`, `vanilla`) are defined in `pac

## Development

- Run `pnpm lint` to lint and type-check the code.
- Run `pnpm typecheck` to type-check the code.
- Development typically involves defining routers and procedures here and consuming them in `apps/app`. The tRPC server endpoint itself is hosted within `apps/api`.
2 changes: 1 addition & 1 deletion services/db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Key exports (`client`, `schema`, `tables`) are defined in `package.json`.
**Depends On:**

- **`@op/core`**: For configuration or shared types, specifically `adminEmails` used in `seed.ts`.
- **`@op/eslint-config` (Dev)**: Used for linting configuration during development.

- **`@op/typescript-config` (Dev)**: Used for TypeScript configuration during development.

**Depended On By:**
Expand Down
4 changes: 2 additions & 2 deletions services/emails/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The `package.json` includes scripts provided by the `react-email` CLI:
**Depends On:**

- **`@op/core`**: For shared configuration used in sending, specifically `APP_NAME` and `genericEmail` used in `index.tsx`.
- **`@op/eslint-config` (Dev)**: Used for linting configuration during development.

- **`@op/typescript-config` (Dev)**: Used for TypeScript configuration during development.

**Depended On By:**
Expand All @@ -42,5 +42,5 @@ The `package.json` includes scripts provided by the `react-email` CLI:
## Development

- Run `pnpm dev` to start the React Email development server and preview email templates in the browser.
- Run `pnpm lint` to lint and type-check the code.
- Run `pnpm typecheck` to type-check the code.
- Modify or create new React components in the designated templates directory.
4 changes: 2 additions & 2 deletions services/supabase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Key exports (`client`, `lib`, `server`, `types`) are defined in `package.json`.
**Depends On:**

- **`@op/core`**: To access shared configuration such as Supabase URL, anon key, and cookie domain settings used in client/server creation.
- **`@op/eslint-config` (Dev)**: Used for linting configuration during development.

- **`@op/typescript-config` (Dev)**: Used for TypeScript configuration during development.

**Depended On By:**
Expand All @@ -41,4 +41,4 @@ Key exports (`client`, `lib`, `server`, `types`) are defined in `package.json`.
## Development

- **Type Generation**: Run `pnpm typegen` to update `src/types.ts` based on the schema of your local Supabase instance (ensure the local Supabase stack is running via `pnpm start` in `services/db`). This should typically be done after running database migrations in the `@op/db` package.
- **Lint**: Run `pnpm lint` to lint and type-check the code.
- **Type Check**: Run `pnpm typecheck` to type-check the code.