Skip to content

Commit a082d11

Browse files
authored
chore: remove per-file SPDX headers (#2135)
1 parent eda1222 commit a082d11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+144
-608
lines changed

.claude/commands/migrate-to-d1.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,8 @@ Migrate the project from Neon to Cloudflare D1 database following these steps:
66

77
```typescript
88
/**
9-
* Drizzle ORM configuration supporting dual-mode database connections.
10-
*
11-
* Local: Uses Wrangler-generated SQLite file from .wrangler/state/v3/d1/ directory.
12-
* Remote: Connects to Cloudflare D1 production database via HTTPS using account credentials.
13-
*
14-
* Environment detection based on npm lifecycle events or DB environment variable.
15-
*
16-
* SPDX-FileCopyrightText: 2014-present Kriasoft
17-
* SPDX-License-Identifier: MIT
9+
* Drizzle ORM configuration for dual-mode (local/remote) D1 connections.
10+
* Local: Wrangler SQLite file. Remote: D1 via HTTPS with account credentials.
1811
*/
1912

2013
import { defineConfig } from "drizzle-kit";

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ docs/.vitepress/dist
7676
*.local.md
7777
*.local.json
7878
*.local.jsonc
79+
*.local.ts
7980

8081
# macOS
8182
# https://github.com/github/gitignore/blob/master/Global/macOS.gitignore

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@
100100
"relyingparty",
101101
"signup",
102102
"sourcemap",
103-
"spdx",
104103
"swapi",
105104
"tarkus",
106105
"trpc",

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,4 @@ bun app:deploy # Deploy main React app
8383
2. **Modern TypeScript:** Leverage latest features (e.g., const assertions, template literals); avoid legacy patterns like `_` prefixes for private variables.
8484
3. **Imports:** Use named imports (e.g., `import { foo } from "bar";`) for tree-shaking, readability, and modern standards; avoid namespace imports (e.g., `import * as baz from "bar";`).
8585
4. **Bun/Hono Idioms:** Incorporate Bun-specific features (e.g., native APIs) and Hono middleware patterns for performance and simplicity.
86+
5. **Comments:** Use brief `//` rationale comments for non-obvious logic; reserve `@file` JSDoc blocks for core architectural files only.

apps/api/dev.ts

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
/**
2-
* Local development server that emulates Cloudflare Workers runtime with Neon database.
2+
* @file Local development server emulating Cloudflare Workers runtime.
33
*
4-
* WARNING: This file uses getPlatformProxy which requires wrangler.jsonc configuration.
5-
* Hyperdrive bindings must be configured for both HYPERDRIVE_CACHED and HYPERDRIVE_DIRECT.
6-
*
7-
* @example
8-
* ```bash
9-
* bun --filter @repo/api dev
10-
* bun --filter @repo/api dev --env=staging # Use staging environment config
11-
* ```
12-
*
13-
* SPDX-FileCopyrightText: 2014-present Kriasoft
14-
* SPDX-License-Identifier: MIT
4+
* Requires wrangler.jsonc with HYPERDRIVE_CACHED and HYPERDRIVE_DIRECT bindings.
155
*/
166

177
import { Hono } from "hono";
@@ -35,27 +25,23 @@ type CloudflareEnv = {
3525
HYPERDRIVE_DIRECT: Hyperdrive;
3626
} & Env;
3727

38-
// [INITIALIZATION]
3928
const app = new Hono<AppContext>();
4029

41-
// NOTE: persist:true maintains D1 state across restarts (.wrangler directory)
42-
// Environment defaults to 'dev' unless --env flag is provided
30+
// persist:true maintains state across restarts in .wrangler directory
4331
const cf = await getPlatformProxy<CloudflareEnv>({
4432
configPath: "./wrangler.jsonc",
4533
environment: args.env ?? "dev",
4634
persist: true,
4735
});
4836

49-
// [CONTEXT INJECTION]
50-
// Creates two database connections per request:
51-
// - db: Uses Hyperdrive caching (read-heavy queries)
52-
// - dbDirect: Bypasses cache (write operations, transactions)
37+
// Inject context with two database connections:
38+
// - db: Hyperdrive caching for read-heavy queries
39+
// - dbDirect: No cache for writes and transactions
5340
app.use("*", async (c, next) => {
5441
const db = createDb(cf.env.HYPERDRIVE_CACHED);
5542
const dbDirect = createDb(cf.env.HYPERDRIVE_DIRECT);
5643

57-
// Priority: Cloudflare bindings > process.env > empty string
58-
// Required for local dev where secrets aren't in wrangler.jsonc
44+
// Merge secrets from process.env (local dev) with Cloudflare bindings
5945
const secretKeys = [
6046
"BETTER_AUTH_SECRET",
6147
"GOOGLE_CLIENT_ID",
@@ -72,7 +58,6 @@ app.use("*", async (c, next) => {
7258
),
7359
APP_NAME: process.env.APP_NAME || cf.env.APP_NAME || "Example",
7460
APP_ORIGIN:
75-
// Prefer origin set by `apps/app` at runtime
7661
c.req.header("x-forwarded-origin") ||
7762
process.env.APP_ORIGIN ||
7863
c.env.APP_ORIGIN ||
@@ -85,7 +70,6 @@ app.use("*", async (c, next) => {
8570
await next();
8671
});
8772

88-
// Routes from ./index.js mounted at root
8973
app.route("/", api);
9074

9175
export default app;

apps/api/index.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
/**
2-
* Main exports for the API package.
2+
* @file Public API surface for the backend package.
33
*
4-
* This file serves as the public interface for the API package, exporting
5-
* utilities, routers, types, and the core application for library usage.
6-
*
7-
* SPDX-FileCopyrightText: 2014-present Kriasoft
8-
* SPDX-License-Identifier: MIT
4+
* Re-exports the Hono app, tRPC router, and core utilities.
95
*/
106

117
// Core utilities and services

apps/api/lib/ai.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/* SPDX-FileCopyrightText: 2014-present Kriasoft */
2-
/* SPDX-License-Identifier: MIT */
3-
41
import type { OpenAIProvider } from "@ai-sdk/openai";
52
import { createOpenAI } from "@ai-sdk/openai";
63
import type { Env } from "./env";

apps/api/lib/app.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
/**
2-
* Core Hono application for the API.
2+
* @file Hono app construction and tRPC router initialization.
33
*
4-
* This module contains the pure API routing logic that can be used across
5-
* different deployment environments (local development, Cloudflare Workers, etc.).
6-
* The app expects database and auth to be initialized upstream via middleware.
7-
*
8-
* SPDX-FileCopyrightText: 2014-present Kriasoft
9-
* SPDX-License-Identifier: MIT
4+
* Combines authentication, tRPC, and health check endpoints into a single HTTP router.
105
*/
116

127
import { fetchRequestHandler } from "@trpc/server/adapters/fetch";

apps/api/lib/auth.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/* SPDX-FileCopyrightText: 2014-present Kriasoft */
2-
/* SPDX-License-Identifier: MIT */
3-
41
import { schema as Db } from "@repo/db";
52
import { betterAuth } from "better-auth";
63
import type { DB } from "better-auth/adapters/drizzle";

apps/api/lib/context.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/* SPDX-FileCopyrightText: 2014-present Kriasoft */
2-
/* SPDX-License-Identifier: MIT */
3-
41
import type { DatabaseSchema } from "@repo/db";
52
import type { CreateHTTPContextOptions } from "@trpc/server/adapters/standalone";
63
import type { Session, User } from "better-auth/types";

0 commit comments

Comments
 (0)