Skip to content
Closed
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
29 changes: 10 additions & 19 deletions .github/workflows/cdn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,17 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.19
bun-version: 1.2.21

- name: Cache dependencies
- name: Cache Bun download cache
uses: actions/cache@v4
id: bun-cache
with:
path: |
**/node_modules
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-cache-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
${{ runner.os }}-bun-cache-

- name: Install dependencies
if: steps.bun-cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile

- name: TypeScript type checking
Expand Down Expand Up @@ -140,18 +136,15 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.19
bun-version: 1.2.21

- name: Cache dependencies
- name: Cache Bun download cache
uses: actions/cache@v4
id: bun-cache
with:
path: |
**/node_modules
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-cache-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
${{ runner.os }}-bun-cache-

- name: Cache Turbo build
uses: actions/cache@v4
Expand All @@ -166,7 +159,6 @@ jobs:
${{ runner.os }}-turbo-cdn-

- name: Install dependencies
if: steps.bun-cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile

- name: Generate version
Expand Down Expand Up @@ -332,4 +324,3 @@ jobs:
description: 'CDN service deployed - version ${{ steps.version.outputs.version }}'
ref: ${{ github.sha }}


28 changes: 10 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,17 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.19
bun-version: 1.2.21

- name: Cache dependencies
- name: Cache Bun download cache
uses: actions/cache@v4
id: bun-cache
with:
path: |
**/node_modules
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-cache-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
${{ runner.os }}-bun-cache-

- name: Install dependencies
if: steps.bun-cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile

- name: TypeScript type checking
Expand Down Expand Up @@ -148,18 +144,15 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.19
bun-version: 1.2.21

- name: Cache dependencies
- name: Cache Bun download cache
uses: actions/cache@v4
id: bun-cache
with:
path: |
**/node_modules
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-cache-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
${{ runner.os }}-bun-cache-

- name: Cache Turbo build
uses: actions/cache@v4
Expand All @@ -174,7 +167,6 @@ jobs:
${{ runner.os }}-turbo-deploy-

- name: Install dependencies
if: steps.bun-cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile

- name: Generate version
Expand Down
28 changes: 10 additions & 18 deletions .github/workflows/dispatcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,17 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.19
bun-version: 1.2.21

- name: Cache dependencies
- name: Cache Bun download cache
uses: actions/cache@v4
id: bun-cache
with:
path: |
**/node_modules
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-cache-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
${{ runner.os }}-bun-cache-

- name: Install dependencies
if: steps.bun-cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile

- name: TypeScript type checking
Expand Down Expand Up @@ -137,18 +133,15 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.19
bun-version: 1.2.21

- name: Cache dependencies
- name: Cache Bun download cache
uses: actions/cache@v4
id: bun-cache
with:
path: |
**/node_modules
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-cache-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
${{ runner.os }}-bun-cache-

- name: Cache Turbo build
uses: actions/cache@v4
Expand All @@ -163,7 +156,6 @@ jobs:
${{ runner.os }}-turbo-dispatcher-

- name: Install dependencies
if: steps.bun-cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile

- name: Generate version
Expand Down
28 changes: 10 additions & 18 deletions .github/workflows/screenshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,17 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.19
bun-version: 1.2.21

- name: Cache dependencies
- name: Cache Bun download cache
uses: actions/cache@v4
id: bun-cache
with:
path: |
**/node_modules
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-cache-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
${{ runner.os }}-bun-cache-

- name: Install dependencies
if: steps.bun-cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile

- name: TypeScript type checking
Expand Down Expand Up @@ -140,18 +136,15 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.19
bun-version: 1.2.21

- name: Cache dependencies
- name: Cache Bun download cache
uses: actions/cache@v4
id: bun-cache
with:
path: |
**/node_modules
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-cache-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
${{ runner.os }}-bun-cache-

- name: Cache Turbo build
uses: actions/cache@v4
Expand All @@ -166,7 +159,6 @@ jobs:
${{ runner.os }}-turbo-screenshot-

- name: Install dependencies
if: steps.bun-cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile

- name: Generate version
Expand Down
51 changes: 25 additions & 26 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
# Repository Guidelines

## Project Structure & Module Organization
- Monorepo managed by Turborepo. Workspaces: `apps/*`, `packages/*`, `tooling/*`, `scripts/`.
- Web app and workers live in `apps/` (e.g., `apps/web`, `apps/opennext-cache`).
- Reusable libraries live in `packages/` (e.g., `packages/api`, `packages/db`, `packages/ui`).
- Environment examples in `.env.example`; copy and adapt to `.env.local`.
- Monorepo managed by Turborepo. Workspaces live in `apps/*`, `packages/*`, `tooling/*`, and `scripts/*`.
- Apps: web and workers in `apps/` (e.g., `apps/web`, `apps/opennext-cache`).
- Libraries: reusable code in `packages/` (e.g., `packages/api`, `packages/db`, `packages/ui`).
- Tests sit next to code or in `__tests__/` within each workspace.
- Env: copy `.env.example` to `.env.local` and adapt per app/package.

## Build, Test, and Development Commands
- Install deps: `bun install` (requires Node >= 24, Bun 1.2+).
- Dev (all apps): `bun run dev`; Web-only: `bun run dev:web`.
- Build all: `bun run build`; Type checks: `bun run typecheck`.
- Format check/fix: `bun run format` / `bun run format:fix`.
- Lint check/fix: `bun run lint` / `bun run lint:fix`.
- DB workflows: `bun run migration:generate`, `bun run migration:local`, `bun run studio:dev`.
- Preview/Deploy (Cloudflare): `bun run preview`, `bun run deploy`.
- Tests across workspaces (if defined): `turbo test` (or run per package).
- Install deps: `bun install` (Node >= 24, Bun 1.2+).
- Dev: `bun run dev` (all) or `bun run dev:web` (web only).
- Build: `bun run build`; Types: `bun run typecheck`.
- Format: `bun run format` / `bun run format:fix`.
- Lint: `bun run lint` / `bun run lint:fix`.
- Tests: `turbo test` (all) or `bun test` in a workspace.
- DB: `bun run migration:generate`, `bun run migration:local`, `bun run studio:dev`.
- Cloudflare: `bun run preview`, `bun run deploy`.

## Coding Style & Naming Conventions
- Formatter/Linter: Biome (see `biome.json`).
- Indentation: 2 spaces; line width: 100; quotes: single; semicolons: as needed; trailing commas: ES5.
- TypeScript-first; keep strict types and meaningful names.
- Prefer feature-oriented folders; test files near code or under `__tests__/`.
- Formatter/Linter: Biome (`biome.json`). Use 2-space indent, 100-char width, single quotes, semicolons as needed, ES5 trailing commas.
- TypeScript-first with strict types and meaningful names; prefer feature-oriented folders.
- Zod v4 only: `import { z } from 'zod/v4'`.

## Testing Guidelines
- Framework: Vitest. Typical locations: `__tests__/` or `*.test.ts` adjacent to source.
- Run all: `turbo test`; per package: `bun test` (from that workspace) or package-specific scripts.
- Name tests `*.test.ts`; add integration tests where behavior spans modules.
- Aim for reliable, isolated tests; include minimal setup files when needed.
- Framework: Vitest. Name files `*.test.ts` and keep tests isolated.
- Location: beside source or in `__tests__/`.
- Run all tests via `turbo test`; per workspace use `bun test`.

## Commit & Pull Request Guidelines
- Use Conventional Commits: `feat:`, `fix:`, `chore:`, `refactor:`; optional scope (e.g., `feat(web): ...`).
- PRs must include: concise description, linked issues (`#123`), screenshots for UI, and passing checks (build, typecheck, lint, tests).
- Keep changes scoped; update docs and `.env.example` when config changes.
- Commits: Conventional Commits (`feat:`, `fix:`, `chore:`, `refactor:`). Optional scope, e.g., `feat(web): ...`.
- PRs: clear description, linked issues (e.g., `#123`), screenshots for UI changes, and passing build, typecheck, lint, and tests.
- Scope changes narrowly; update docs and `.env.example` when config changes.

## Security & Configuration Tips
- Never commit secrets; use `.env.local` for local-only settings.
- Validate env at runtime (see `@t3-oss/env-nextjs` usage in the repo).
- For DB changes, always generate migrations and run locally before PR.
- Do not commit secrets; keep local-only config in `.env.local`.
- Validate env at runtime (see `@t3-oss/env-nextjs`).
- For DB changes, always generate migrations and run them locally before opening a PR.

Loading
Loading