Skip to content

Conversation

@ThanhNguyxn
Copy link

@ThanhNguyxn ThanhNguyxn commented Dec 3, 2025

🚀 New Contributions

This PR adds 4 new high-quality cursorrules for trending technologies that are currently missing from the repository:

Added Rules:

Folder Technology Description
hono-typescript-cloudflare-cursorrules-prompt-file Hono + Cloudflare Workers Edge-first APIs with Hono v4, TypeScript, and Cloudflare Workers
drizzle-orm-typescript-cursorrules-prompt-file Drizzle ORM Type-safe database layer with Drizzle ORM and TypeScript
remix-react-typescript-cursorrules-prompt-file Remix Full-stack web applications with Remix v2, React, and TypeScript
bun-typescript-runtime-cursorrules-prompt-file Bun Fast all-in-one JavaScript runtime development with Bun

Why These Technologies?

  • Hono - 20k+ GitHub stars, fastest-growing edge framework with zero existing coverage
  • Drizzle ORM - Top TypeScript-first ORM, rapidly gaining adoption
  • Remix - Major full-stack React framework that was surprisingly missing
  • Bun - Revolutionary JS runtime/bundler/package manager, no dedicated rules existed

Each .cursorrules File Includes:

  • ✅ Expert persona definition
  • ✅ Tech stack specifics with versions
  • ✅ Code style and structure guidelines
  • ✅ Best practices and patterns
  • ✅ Error handling strategies
  • ✅ Testing approaches
  • ✅ What to avoid

Checklist:

  • Follows naming convention: technology-focus-cursorrules-prompt-file
  • Each folder contains .cursorrules and README.md
  • No duplicate entries
  • Comprehensive, production-ready content

Summary by CodeRabbit

  • Documentation
    • Added comprehensive Cursor AI guidance rule sets for Bun (TypeScript runtime), Drizzle ORM (TypeScript), Hono (Cloudflare Workers + TypeScript), and Remix (React + TypeScript).
    • Each rule set includes best practices, patterns, example project structures, setup/usage instructions, and README guidance for adopters.

✏️ Tip: You can customize this high-level summary in your review settings.

- hono-typescript-cloudflare: Edge-first APIs with Hono v4 and Cloudflare Workers
- drizzle-orm-typescript: Type-safe database layer with Drizzle ORM
- remix-react-typescript: Full-stack web apps with Remix v2 and React
- bun-typescript-runtime: Fast all-in-one JavaScript runtime with Bun
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

Walkthrough

Adds four new Cursor Rules documentation sets (Bun TypeScript Runtime, Drizzle ORM TypeScript, Hono TypeScript Cloudflare Workers, Remix React TypeScript). Each set includes a .cursorrules prompt file and a README with guidance, code patterns, and best-practice examples. No runtime code or exported APIs changed.

Changes

Cohort / File(s) Summary
Bun TypeScript Runtime Rules
rules/bun-typescript-runtime-cursorrules-prompt-file/.cursorrules, rules/bun-typescript-runtime-cursorrules-prompt-file/README.md
Adds a Bun runtime expert prompt and README covering Bun-specific patterns (HTTP server, file I/O, SQLite, env, hashing, subprocess, WebSocket, testing, bundling) and recommended project conventions.
Drizzle ORM TypeScript Rules
rules/drizzle-orm-typescript-cursorrules-prompt-file/.cursorrules, rules/drizzle-orm-typescript-cursorrules-prompt-file/README.md
Adds a Drizzle ORM expert prompt and README with schema examples, DB connection patterns (Postgres, Turso/LibSQL), CRUD, transactions, migrations, type-safety practices, and configuration guidance.
Hono TypeScript Cloudflare Rules
rules/hono-typescript-cloudflare-cursorrules-prompt-file/.cursorrules, rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md
Adds a Hono + Cloudflare Workers expert prompt and README covering app initialization, routing, Zod validation, middleware, D1/KV/R2 usage, edge-first patterns, and testing guidance.
Remix React TypeScript Rules
rules/remix-react-typescript-cursorrules-prompt-file/.cursorrules, rules/remix-react-typescript-cursorrules-prompt-file/README.md
Adds a Remix React TypeScript expert prompt and README with route/module conventions, data loading strategies, form validation, auth/session patterns, optimistic UI, and performance recommendations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–25 minutes

  • Review documentation accuracy and internal consistency across examples.
  • Check Hono Cloudflare Workers guidance for Worker API constraints and binding usage.
  • Verify Drizzle examples for correct connection/migration commands and transaction patterns.
  • Confirm Bun examples use Bun-native APIs (not Node-only) and accurate bundling/testing instructions.
  • Validate Remix patterns align with current Remix conventions and data-loading APIs.

Suggested reviewers

  • PatrickJS

Poem

🐰 I hopped through docs both wide and bright,
Bun, Drizzle, Hono, Remix—each a light,
Rules stitched tidy, examples in tune,
Cursor-ready guides beneath the moon. ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately reflects the main change: adding 4 new cursorrules for modern TypeScript tech stacks (Hono, Drizzle ORM, Remix, Bun).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1fe61cf and 8aa4c6d.

📒 Files selected for processing (6)
  • rules/bun-typescript-runtime-cursorrules-prompt-file/.cursorrules (1 hunks)
  • rules/bun-typescript-runtime-cursorrules-prompt-file/README.md (1 hunks)
  • rules/drizzle-orm-typescript-cursorrules-prompt-file/README.md (1 hunks)
  • rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md (1 hunks)
  • rules/remix-react-typescript-cursorrules-prompt-file/.cursorrules (1 hunks)
  • rules/remix-react-typescript-cursorrules-prompt-file/README.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • rules/remix-react-typescript-cursorrules-prompt-file/.cursorrules
🚧 Files skipped from review as they are similar to previous changes (5)
  • rules/drizzle-orm-typescript-cursorrules-prompt-file/README.md
  • rules/bun-typescript-runtime-cursorrules-prompt-file/.cursorrules
  • rules/bun-typescript-runtime-cursorrules-prompt-file/README.md
  • rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md
  • rules/remix-react-typescript-cursorrules-prompt-file/README.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🧹 Nitpick comments (5)
rules/bun-typescript-runtime-cursorrules-prompt-file/.cursorrules (1)

303-316: Clarify configuration examples with proper separation.

The Type Safety section mixes bunfig.toml and tsconfig.json examples within a single code block, which may confuse users. Consider separating them into distinct code blocks with appropriate language identifiers.

 ### Type Safety
-```typescript
-// bunfig.toml for strict mode
-// [install]
-// auto = "force"
-
-// tsconfig.json
-{
-  "compilerOptions": {
-    "strict": true,
-    "types": ["bun-types"]
+```toml
+# bunfig.toml
+[install]
+auto = "force"
+```
+
+```json
+// tsconfig.json
+{
+  "compilerOptions": {
+    "strict": true,
+    "types": ["bun-types"]
   }
 }

</blockquote></details>
<details>
<summary>rules/drizzle-orm-typescript-cursorrules-prompt-file/.cursorrules (1)</summary><blockquote>

`87-114`: **Separate connection examples for clarity.**

The database connection section shows two different connection examples (PostgreSQL and Turso/LibSQL) within the same code block with duplicate imports and exports. Consider separating them into distinct code blocks to avoid confusion.



Consider restructuring as:

```markdown
### PostgreSQL Connection
\`\`\`typescript
import { drizzle } from 'drizzle-orm/node-postgres'
// ... PostgreSQL example
\`\`\`

### Turso/LibSQL Connection
\`\`\`typescript
import { drizzle } from 'drizzle-orm/libsql'
// ... Turso example
\`\`\`
rules/hono-typescript-cloudflare-cursorrules-prompt-file/.cursorrules (1)

231-238: OpenAPI example is incomplete.

The OpenAPI example at line 237 shows app.openAPIRegistry.registerPath({...}) which is a placeholder rather than a working example. Consider either providing a complete example or adding a comment indicating users should refer to documentation.

 ### OpenAPI Documentation
 ```typescript
 import { OpenAPIHono } from '@hono/zod-openapi'
 
 const app = new OpenAPIHono()
 app.doc('/doc', { openapi: '3.0.0', info: { title: 'API', version: '1.0.0' } })
-app.openAPIRegistry.registerPath({...})
+// See @hono/zod-openapi documentation for route registration

</blockquote></details>
<details>
<summary>rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md (1)</summary><blockquote>

`51-53`: **Consider providing specific author attribution.**

The generic "Contributed by the community" attribution doesn't align with the coding guideline to "use this README to provide credit to the original author." If a specific author created this rule, please credit them appropriately.



Based on coding guidelines, which state that READMEs should provide credit to original authors.

</blockquote></details>
<details>
<summary>rules/remix-react-typescript-cursorrules-prompt-file/README.md (1)</summary><blockquote>

`53-55`: **Consider providing specific author attribution.**

The generic "Contributed by the community" attribution doesn't align with the coding guideline to "use this README to provide credit to the original author." If a specific author created this rule, please credit them appropriately.



Based on coding guidelines, which state that READMEs should provide credit to original authors.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: CodeRabbit UI

**Review profile**: CHILL

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between fc2ce049c55b369b498eef396506a7a269a1b461 and 1fe61cf22a07e5978a058989f3a6e2c6b930a554.

</details>

<details>
<summary>📒 Files selected for processing (8)</summary>

* `rules/bun-typescript-runtime-cursorrules-prompt-file/.cursorrules` (1 hunks)
* `rules/bun-typescript-runtime-cursorrules-prompt-file/README.md` (1 hunks)
* `rules/drizzle-orm-typescript-cursorrules-prompt-file/.cursorrules` (1 hunks)
* `rules/drizzle-orm-typescript-cursorrules-prompt-file/README.md` (1 hunks)
* `rules/hono-typescript-cloudflare-cursorrules-prompt-file/.cursorrules` (1 hunks)
* `rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md` (1 hunks)
* `rules/remix-react-typescript-cursorrules-prompt-file/.cursorrules` (1 hunks)
* `rules/remix-react-typescript-cursorrules-prompt-file/README.md` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>📓 Path-based instructions (3)</summary>

<details>
<summary>**/*.md</summary>


**📄 CodeRabbit inference engine (.cursorrules)**

> Always use Markdown for documentation and README files

Files:
- `rules/bun-typescript-runtime-cursorrules-prompt-file/README.md`
- `rules/drizzle-orm-typescript-cursorrules-prompt-file/README.md`
- `rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md`
- `rules/remix-react-typescript-cursorrules-prompt-file/README.md`

</details>
<details>
<summary>rules/*/README.md</summary>


**📄 CodeRabbit inference engine (.cursorrules)**

> `rules/*/README.md`: Refer to the README in each folder for guidance on naming conventions and descriptions
> Each .cursorrules file may have an accompanying README.md file in its folder; use this README to provide credit to the original author and a brief description of the .cursorrules file's purpose

Files:
- `rules/bun-typescript-runtime-cursorrules-prompt-file/README.md`
- `rules/drizzle-orm-typescript-cursorrules-prompt-file/README.md`
- `rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md`
- `rules/remix-react-typescript-cursorrules-prompt-file/README.md`

</details>
<details>
<summary>**/*.{md,cursorrules}</summary>


**📄 CodeRabbit inference engine (.cursorrules)**

> `**/*.{md,cursorrules}`: Use clear and concise language in all documentation and .cursorrules files
> When adding examples or explanations, focus on practical use cases for Cursor AI users

Files:
- `rules/bun-typescript-runtime-cursorrules-prompt-file/README.md`
- `rules/drizzle-orm-typescript-cursorrules-prompt-file/README.md`
- `rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md`
- `rules/remix-react-typescript-cursorrules-prompt-file/README.md`

</details>

</details><details>
<summary>🪛 markdownlint-cli2 (0.18.1)</summary>

<details>
<summary>rules/drizzle-orm-typescript-cursorrules-prompt-file/README.md</summary>

39-39: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>
<details>
<summary>rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md</summary>

39-39: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>
<details>
<summary>rules/remix-react-typescript-cursorrules-prompt-file/README.md</summary>

39-39: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (12)</summary><blockquote>

<details>
<summary>rules/bun-typescript-runtime-cursorrules-prompt-file/README.md (1)</summary><blockquote>

`1-61`: **Well-structured README with clear documentation.**

The README follows the expected format with Overview, Tech Stack, coverage details, usage instructions, and related links. The content is clear, concise, and provides practical guidance for Cursor AI users.

</blockquote></details>
<details>
<summary>rules/drizzle-orm-typescript-cursorrules-prompt-file/.cursorrules (1)</summary><blockquote>

`1-356`: **Comprehensive Drizzle ORM guidance with accurate patterns.**

The cursorrules file provides thorough coverage of Drizzle ORM best practices, including schema design, query patterns, migrations, and the repository pattern. The code examples correctly demonstrate type-safe database operations.

</blockquote></details>
<details>
<summary>rules/hono-typescript-cloudflare-cursorrules-prompt-file/.cursorrules (1)</summary><blockquote>

`1-256`: **Well-crafted Hono + Cloudflare Workers guidance.**

The cursorrules file provides excellent coverage of edge-first API development with Hono v4.x. The examples correctly demonstrate Cloudflare bindings (D1, KV, R2), middleware patterns, and type-safe route handlers with Zod validation.

</blockquote></details>
<details>
<summary>rules/hono-typescript-cloudflare-cursorrules-prompt-file/README.md (2)</summary><blockquote>

`1-7`: **LGTM! Clear introduction and overview.**

The title, description, and overview effectively introduce the Hono TypeScript Cloudflare Workers Cursor Rules with appropriate context and a helpful link to the official documentation.

---

`9-17`: **No changes required—versions are accurate and current.**

The Tech Stack section correctly specifies Hono v4.x and TypeScript 5.x. As of December 2025, Hono's latest stable release is v4.10.6 and TypeScript's latest stable is 5.9, confirming that both version ranges in the README are accurate and appropriate for documentation.

</blockquote></details>
<details>
<summary>rules/remix-react-typescript-cursorrules-prompt-file/README.md (1)</summary><blockquote>

`1-7`: **LGTM! Clear introduction and overview.**

The title, description, and overview effectively introduce the Remix React TypeScript Cursor Rules with appropriate context and a helpful link to the official documentation.

</blockquote></details>
<details>
<summary>rules/remix-react-typescript-cursorrules-prompt-file/.cursorrules (6)</summary><blockquote>

`1-23`: **LGTM! Comprehensive introduction and tech stack definition.**

The core expertise and tech stack sections provide a clear foundation for the Cursor Rules, properly defining the scope and technologies covered.

---

`139-178`: **LGTM! Excellent demonstration of deferred data loading.**

The example clearly shows how to use `defer` for parallel data loading with proper Suspense boundaries, which is a key Remix pattern for improving perceived performance.

---

`180-227`: **LGTM! Solid form validation pattern.**

The example demonstrates proper integration of Zod schema validation with Conform for type-safe, progressive form handling—a best practice for Remix applications.

---

`273-301`: **LGTM! Well-structured resource route example.**

The example demonstrates proper API endpoint patterns with appropriate HTTP method checks, query parameter handling, and cache headers.

---

`303-325`: **LGTM! Effective optimistic UI pattern.**

The example clearly demonstrates how to use `useFetcher` for optimistic UI updates, improving perceived performance by immediately reflecting user actions.

---

`327-393`: **LGTM! Comprehensive error handling and best practices guidance.**

The error handling patterns, performance optimizations, key principles, and anti-patterns provide excellent guidance for building robust Remix applications.

</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Comment on lines 249 to 253
test('should throw on duplicate email', () => {
expect(async () => {
await createUser({ email: 'test@example.com', name: 'Another' })
}).toThrow()
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Async throw assertion won't work as expected.

Using expect(async () => {...}).toThrow() doesn't properly handle async rejections. The test will pass even if no error is thrown because the async function returns a Promise.

-  test('should throw on duplicate email', () => {
-    expect(async () => {
-      await createUser({ email: 'test@example.com', name: 'Another' })
-    }).toThrow()
+  test('should throw on duplicate email', async () => {
+    expect(
+      createUser({ email: 'test@example.com', name: 'Another' })
+    ).rejects.toThrow()
   })
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
test('should throw on duplicate email', () => {
expect(async () => {
await createUser({ email: 'test@example.com', name: 'Another' })
}).toThrow()
})
test('should throw on duplicate email', async () => {
expect(
createUser({ email: 'test@example.com', name: 'Another' })
).rejects.toThrow()
})
🤖 Prompt for AI Agents
In rules/bun-typescript-runtime-cursorrules-prompt-file/.cursorrules around
lines 249 to 253, the test uses expect(async () => { await createUser(...)
}).toThrow(), which does not handle async rejections; change the test to
properly assert an async throw by making the test async (or returning the
assertion) and using expect(createUser({ email: ..., name: ...
})).rejects.toThrow() (or await expect(createUser(...)).rejects.toThrow()) so
the Promise rejection is correctly asserted.

Comment on lines +9 to +17
## Tech Stack

- **Framework:** Remix v2.x
- **UI Library:** React 18+
- **Language:** TypeScript 5.x (strict mode)
- **Styling:** Tailwind CSS, CSS Modules
- **Validation:** Zod, Conform
- **Database:** Prisma, Drizzle ORM
- **Testing:** Vitest, Playwright
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

latest stable version of Remix framework React meta 2024 2025

💡 Result:

Latest stable Remix (framework) release: v2.17.0 — released July 25, 2025. [1]

Note: Remix functionality has been merged into React Router v7 (“framework mode”); see the Remix announcement for details. [2]

Sources:

  • Remix changelog (v2.17.0 release). [1]
  • Remix blog: "Wake up, Remix!" (merging with React Router v7). [2]

🌐 Web query:

latest stable version of React JavaScript library 2024 2025

💡 Result:

  • Latest stable in 2024: React 19.0 — stable release published December 5, 2024. [1]
  • Latest stable in 2025 (current): React 19.2 — released October 1, 2025. [2]

Sources:
[1] React v19 announcement (React blog, Dec 5 2024).
[2] React 19.2 release (React blog, Oct 1 2025).


🌐 Web query:

latest stable version of TypeScript 2024 2025

💡 Result:

The latest stable TypeScript release is 5.9 (released August 1, 2025). [1][2]

Sources:
[1] TypeScript blog — "Announcing TypeScript 5.9".
[2] npm / release listings showing 6.0 as development/nightly builds (not stable).


Update React version specification to reflect current stable releases.

The README specifies "React 18+" but React 19.x is now stable (19.2 as of October 2025). Update to "React 19+" or "React 18+" if intentionally targeting older versions. Remix v2.x (current: v2.17.0) and TypeScript 5.x (current: 5.9) remain current. Consider also noting that Remix v2 functionality has merged into React Router v7 framework mode, which may affect the project's tech stack guidance.

🤖 Prompt for AI Agents
In rules/remix-react-typescript-cursorrules-prompt-file/README.md around lines 9
to 17, the tech stack lists "React 18+" which is outdated; update the React
entry to "React 19+" (or "React 18+" only if you deliberately intend to support
older releases), and add a brief note that Remix v2 functionality has been
merged into React Router v7 framework mode (or mention the current Remix v2
version if you want to keep historical context); keep the rest of the stack
as-is and ensure the version notation matches the project's compatibility
targets.

- Fix variable redeclaration in Bun file I/O example (file -> metaFile)
- Fix async test assertion to use rejects.toThrow()
- Add missing useRouteError, isRouteErrorResponse imports in Remix
- Add SESSION_SECRET validation before use
- Add language identifiers to README code blocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant