diff --git a/.coderabbit.yaml b/.coderabbit.yaml index bb5b9b03..6a499de8 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -44,7 +44,7 @@ reviews: - "!**/gen/**" - "!**/*.gen.ts" - "!**/*.gen.js" - - "!apps/fastify/src/db/migrations/**" + - "!apps/api/src/db/migrations/**" # Documentation assets - "!**/*.png" @@ -90,7 +90,7 @@ reviews: - .cursor/rules/frontend/react.mdc - .cursor/rules/base/typescript.mdc - - path: "apps/next/**" + - path: "apps/web/**" instructions: | - Verify Next.js App Router conventions and React Server Components usage - Follow all coding standards defined in: @@ -111,7 +111,7 @@ reviews: - .cursor/rules/base/docs.mdc - .cursor/rules/base/typescript.mdc - - path: "apps/fastify/**" + - path: "apps/api/**" instructions: | - CRITICAL: never edit db/migrations, openapi schema files directly. All migrations must be created through the typical Drizzle flow and OpenAPI is autogenerated. Always validate no discrepancies. - Verify Fastify functional patterns and TypeBox schema usage diff --git a/.cursor/rules/backend/fastify.mdc b/.cursor/rules/backend/fastify.mdc index c3beebd2..dc5a2e52 100644 --- a/.cursor/rules/backend/fastify.mdc +++ b/.cursor/rules/backend/fastify.mdc @@ -1,6 +1,6 @@ --- description: Fastify backend development standards and patterns -glob: "apps/fastify/**/*" +glob: "apps/api/**/*" alwaysApply: true --- diff --git a/.cursor/rules/frontend/auth.mdc b/.cursor/rules/frontend/auth.mdc index 214cb01e..8ff525e8 100644 --- a/.cursor/rules/frontend/auth.mdc +++ b/.cursor/rules/frontend/auth.mdc @@ -1,6 +1,6 @@ --- description: Next.js auth patterns—single cookie, core client modes, refresh flow -glob: "apps/next/**/*,packages/core/**/*,packages/react/**/*" +glob: "apps/web/**/*,packages/core/**/*,packages/react/**/*" alwaysApply: false --- diff --git a/.cursor/rules/frontend/e2e-playwright.mdc b/.cursor/rules/frontend/e2e-playwright.mdc index 1bb2457a..810be3de 100644 --- a/.cursor/rules/frontend/e2e-playwright.mdc +++ b/.cursor/rules/frontend/e2e-playwright.mdc @@ -1,10 +1,10 @@ --- description: Playwright E2E patterns for Next.js and Fastify API -glob: "apps/next/e2e/**/*, apps/next/playwright.config.ts, apps/fastify/test/**/*, apps/fastify/playwright.config.ts" +glob: "apps/web/e2e/**/*, apps/web/playwright.config.ts, apps/api/test/**/*, apps/api/playwright.config.ts" --- ## Config -- Frontend apps (`apps/next`) use **Playwright E2E only** — no Vitest/Testing Library unit or integration tests +- Frontend apps (`apps/web`) use **Playwright E2E only** — no Vitest/Testing Library unit or integration tests - No webServer; URLs from `PLAYWRIGHT_APP_URL` / `PLAYWRIGHT_API_URL` (env or `--app` / `--api` params) - Fastify: only `--api` param; `test:e2e` = URL-based, `test:e2e:local` = spawn API, poll, run, cleanup - Param format: `--app=URL` or `--app URL`, `--api=URL` or `--api URL` diff --git a/.cursor/rules/web3/wagmi.mdc b/.cursor/rules/web3/wagmi.mdc index e8fc0169..42708373 100644 --- a/.cursor/rules/web3/wagmi.mdc +++ b/.cursor/rules/web3/wagmi.mdc @@ -1,6 +1,6 @@ --- description: Web3 integration patterns using Wagmi v3 -glob: "apps/next/**/*.{ts,tsx}" +glob: "apps/web/**/*.{ts,tsx}" alwaysApply: false --- diff --git a/.github/workflows/api-e2e.yml b/.github/workflows/api-e2e.yml index 36c60ba7..5f074555 100644 --- a/.github/workflows/api-e2e.yml +++ b/.github/workflows/api-e2e.yml @@ -3,7 +3,7 @@ name: API (E2E) on: pull_request: paths: - - 'apps/fastify/**' + - 'apps/api/**' - 'packages/email/**' - 'packages/sentry/**' - 'packages/utils/**' @@ -48,17 +48,17 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - name: Build - run: pnpm turbo run build --filter=@repo/fastify... + run: pnpm turbo run build --filter=@repo/api... - name: Unit tests - run: pnpm turbo run test --filter=@repo/fastify + run: pnpm turbo run test --filter=@repo/api - name: Install Playwright - run: pnpm --filter @repo/fastify exec playwright install chromium --with-deps + run: pnpm --filter @repo/api exec playwright install chromium --with-deps - name: E2E tests (local) - run: pnpm --filter @repo/fastify test:e2e:local + run: pnpm --filter @repo/api test:e2e:local - name: Upload Playwright report if: always() uses: actions/upload-artifact@v4 with: - name: playwright-report-fastify - path: apps/fastify/playwright-report/ + name: playwright-report-api + path: apps/api/playwright-report/ retention-days: 30 diff --git a/.github/workflows/packages-test.yml b/.github/workflows/packages-test.yml index cb1f9757..5461c82e 100644 --- a/.github/workflows/packages-test.yml +++ b/.github/workflows/packages-test.yml @@ -43,8 +43,8 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - name: Generate OpenAPI (for @repo/core) - run: pnpm turbo run generate:openapi --filter=@repo/fastify + run: pnpm turbo run generate:openapi --filter=@repo/api - name: Build packages - run: pnpm turbo run build --filter='!@repo/next' --filter='!@repo/fastify' --filter='!@repo/docu' + run: pnpm turbo run build --filter='!@repo/web' --filter='!@repo/api' --filter='!@repo/docu' - name: Unit tests (packages only) - run: pnpm turbo run test --filter='!@repo/next' --filter='!@repo/fastify' --filter='!@repo/docu' + run: pnpm turbo run test --filter='!@repo/web' --filter='!@repo/api' --filter='!@repo/docu' diff --git a/.github/workflows/next-e2e.yml b/.github/workflows/web-e2e.yml similarity index 78% rename from .github/workflows/next-e2e.yml rename to .github/workflows/web-e2e.yml index 01706c80..e0a64982 100644 --- a/.github/workflows/next-e2e.yml +++ b/.github/workflows/web-e2e.yml @@ -1,9 +1,9 @@ -name: Next (E2E) +name: Web (E2E) on: pull_request: paths: - - 'apps/next/**' + - 'apps/web/**' - 'scripts/**' - 'packages/core/**' - 'packages/react/**' @@ -11,13 +11,13 @@ on: - 'packages/utils/**' - 'packages/eslint-config/**' - 'packages/typescript-config/**' - - 'apps/fastify/openapi/**' + - 'apps/api/openapi/**' - 'pnpm-lock.yaml' - 'package.json' - 'turbo.json' concurrency: - group: next-e2e-${{ github.ref }} + group: web-e2e-${{ github.ref }} cancel-in-progress: false env: @@ -52,19 +52,19 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - name: Build - run: pnpm turbo run build --filter=@repo/next... + run: pnpm turbo run build --filter=@repo/web... - name: Unit tests - run: pnpm turbo run test --filter=@repo/next + run: pnpm turbo run test --filter=@repo/web - name: Install Playwright - run: pnpm --filter @repo/next exec playwright install chromium --with-deps + run: pnpm --filter @repo/web exec playwright install chromium --with-deps - name: E2E tests (local) env: SKIP_BUILD: '1' - run: pnpm --filter @repo/next test:e2e:local + run: pnpm --filter @repo/web test:e2e:local - name: Upload Playwright report if: always() uses: actions/upload-artifact@v4 with: - name: playwright-report-next - path: apps/next/playwright-report/ + name: playwright-report-web + path: apps/web/playwright-report/ retention-days: 30 diff --git a/.gitleaks.toml b/.gitleaks.toml index 2d3ac641..91991728 100644 --- a/.gitleaks.toml +++ b/.gitleaks.toml @@ -10,12 +10,12 @@ useDefault = true [allowlist] description = "Allowlist for test fixtures and example files" paths = [ - '''apps/next/e2e/wallet-setup/.*\.(ts|js|mjs)$''', + '''apps/web/e2e/wallet-setup/.*\.(ts|js|mjs)$''', '''\.env-example$''', '''\.env\.example$''', '''\.env\.test\.example$''', '''\.env-sample$''', - '''^apps/next/\.env\.local\.example$''', + '''^apps/web/\.env\.local\.example$''', '''\.env\.sample$''', '''\.env\.schema$''', '''\.env\.test$''', @@ -28,7 +28,7 @@ paths = [ '''fixtures/''', '''examples/''', '''docs/''', - '''apps/fastify/scripts/generate-openapi\.ts$''', + '''apps/api/scripts/generate-openapi\.ts$''', '''scripts/run-qa\.mjs$''', ] diff --git a/README.md b/README.md index 283c92e9..b800c4bd 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,8 @@ Fastify • OpenAPI • Next.js • Expo — one stack, multiple platforms. ## Apps -- **[API](apps/fastify/README.md)** — Type-safe REST API built with Fastify & OpenAPI -- **[Web App](apps/next/README.md)** — Next.js app with monorepo integration +- **[API](apps/api/README.md)** — Type-safe REST API built with Fastify & OpenAPI +- **[Web App](apps/web/README.md)** — Next.js app with monorepo integration - **[Documentation](apps/docu/README.md)** — Fumadocs-based docs site for architecture, ADRs, and development workflows ## Packages @@ -55,7 +55,7 @@ Run with `pnpm