Skip to content

Conversation

@nirnejak
Copy link
Collaborator

@nirnejak nirnejak commented Jan 14, 2026

Pull Request

Summary

  • Blog Layout Updated
  • AGENTS.md added for Agent Context

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that causes existing functionality to change)
  • Documentation update
  • Refactoring/code cleanup
  • Content update (blog posts, tools data, etc.)

Changes Made

Testing

  • Local development tested
  • Build passes (npm run build)
  • No TypeScript errors
  • No linting errors
  • Manual testing completed

Database Changes (if applicable)

  • Database migration included
  • Migration tested locally
  • Rollback plan documented

Content Changes (if applicable)

  • Tool data updated in src/lib/toolData.json
  • Blog post follows content guidelines
  • Images optimized and properly sized
  • SEO metadata updated

UI/UX Changes (if applicable)

  • Responsive design tested
  • Accessibility considerations addressed
  • Dark mode compatibility verified
  • Loading states implemented

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Documentation updated if needed
  • No new console warnings or errors
  • Performance impact considered

Screenshots/Demo

Related Issues

Additional Notes

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive developer guide as a centralized reference: tech stack, development and quality commands, coding style and conventions (TypeScript, imports, components, styling), error and form handling, database/API patterns, performance, accessibility, security, Git workflow, file structure, examples, and quality gates for contributors.

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

@vercel
Copy link

vercel bot commented Jan 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
devtoolsacademy Ready Ready Preview, Comment Jan 14, 2026 2:51pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 14, 2026

Walkthrough

Adds AGENTS.md, a new comprehensive documentation file that centralizes development guidelines for the DevTools Academy project, covering tech stack, development and quality commands, code style, error and form handling, API/database patterns, performance, accessibility, security, Git workflow, and file structure (411+ lines).

Changes

Cohort / File(s) Summary
Documentation
AGENTS.md
New file (+411 lines). Introduces project-wide development guidelines: tech stack, CLI/dev commands, linting/tests/CI, TypeScript/imports/components styling (Tailwind/CVA), error handling, Zod forms, DB/API patterns, performance tips, accessibility/security notes, Git workflow, and file structure conventions.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'Blog Layout' does not match the primary change in the pull request, which is the addition of AGENTS.md documentation file for development guidelines. Update the title to accurately reflect the main change, such as 'Add AGENTS.md development guidelines documentation' or similar.
Description check ⚠️ Warning The PR description is incomplete and vague. It lacks essential details: the Type of Change is not selected, Changes Made section is empty, Testing checkboxes are mostly unchecked, and no specific context is provided about the actual changes. Select appropriate Type of Change (likely Documentation update or New feature), populate Changes Made with specific modifications, check Testing items with evidence, and provide detailed explanation of blog layout updates and AGENTS.md content.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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: 2

🤖 Fix all issues with AI agents
In `@AGENTS.md`:
- Around line 411-412: Remove the stray XML/HTML closing tags at the end of the
Markdown file by deleting the unexpected tokens `</content>` and the `<parameter
name="filePath">...` (or its unmatched closing tag) that appear on lines
411-412; ensure the file ends with valid Markdown content or a single newline
and no leftover angle-bracket tags so AGENTS.md contains only Markdown.
- Around line 308-316: The example's onKeyDown only handles Enter and misses
Space and preventing default scrolling; update the keyboard handler for the
interactive element using onKeyDown={(e) => { if (e.key === 'Enter' || e.key ===
' ' || e.key === 'Spacebar') { e.preventDefault(); handleClick(); } }} and
mention that native <button> already handles Enter/Space so this pattern
(role="button"/custom element) is only needed for non-button elements; reference
the existing handleClick and the onKeyDown usage to locate the change.
🧹 Nitpick comments (2)
AGENTS.md (2)

42-56: Consider recommending a specific testing framework for the tech stack.

While the documentation acknowledges that automated tests aren't configured, it could be more helpful to recommend Vitest (better Next.js/TypeScript integration) or Jest with React Testing Library, given the project's stack.

📝 Suggestion: Add framework recommendation
-**Note**: This project currently does not have automated tests configured. When adding tests:
+**Note**: This project currently does not have automated tests configured. Recommended: Vitest with React Testing Library for optimal Next.js 15 and TypeScript integration. When adding tests:
 
 1. Install a testing framework like Jest or Vitest

348-348: Add language specifiers to fenced code blocks.

Markdownlint flags three code blocks missing language specifiers. Adding these improves syntax highlighting and documentation clarity.

📋 Add language specifiers

Line 348 - Commit message examples:

-```
+```text
 feat: add user authentication
 fix: resolve login form validation bug

Line 358 - Branch naming examples:

-```
+```text
 feature/user-authentication
 bugfix/login-validation

Line 373 - File structure:

-```
+```text
 src/
 ├── app/                    # Next.js app router pages

Based on static analysis hints from markdownlint.

Also applies to: 358-358, 373-373

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4374fa8 and 8fbe272.

📒 Files selected for processing (1)
  • AGENTS.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
AGENTS.md

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

(MD040, fenced-code-language)


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

(MD040, fenced-code-language)


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

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build (18.x)
🔇 Additional comments (4)
AGENTS.md (4)

1-16: LGTM! Clear documentation header and comprehensive tech stack.

The introduction and tech stack section provide a solid foundation for understanding the project's technologies and purpose.


58-247: LGTM! Comprehensive and well-structured code style guidelines.

The TypeScript configuration, component patterns, styling conventions, naming standards, error handling, and form validation examples all follow React and Next.js best practices.


322-389: LGTM! Security, Git workflow, and file structure guidelines are well-defined.

The security considerations cover essential practices, Git conventions follow industry standards, and the file structure accurately represents Next.js 15 App Router organization.


253-265: Fix Prisma Client instantiation anti-pattern.

Creating a new PrismaClient instance in API routes leads to connection pool exhaustion in serverless environments like Vercel. Use a singleton pattern instead.

🔧 Correct Prisma singleton pattern

Update the example to reference the singleton:

 // In API routes
-import { PrismaClient } from "@prisma/client"
-const prisma = new PrismaClient()
+import { prisma } from "@/lib/prisma"
 
 export async function GET() {
   try {

Ensure lib/prisma.ts implements the singleton pattern (as mentioned in line 383):

import { PrismaClient } from '@prisma/client'

const globalForPrisma = global as unknown as { prisma: PrismaClient }

export const prisma = globalForPrisma.prisma || new PrismaClient()

if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma
⛔ Skipped due to learnings
Learnt from: Ankur1493
Repo: tyaga001/devtoolsacademy PR: 39
File: src/lib/tools.ts:1-1
Timestamp: 2024-11-23T11:57:43.371Z
Learning: In `src/lib/tools.ts`, creating a new `PrismaClient` instance for each request is acceptable in this project and does not cause connection pool exhaustion due to previous optimizations.
Learnt from: tyaga001
Repo: tyaga001/devtoolsacademy PR: 110
File: package.json:39-39
Timestamp: 2025-04-14T07:46:36.019Z
Learning: The "prisma" package should be placed in devDependencies rather than dependencies, as it's only needed during development. The "prisma/client" package should remain in dependencies as it's used at runtime.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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: 2

🤖 Fix all issues with AI agents
In `@AGENTS.md`:
- Around line 348-362: Add a language specifier (e.g., "text") to both fenced
code blocks shown: the commit message block starting with "feat: add user
authentication ..." and the branch naming block listing
"feature/user-authentication ...", by changing their opening fences from ``` to
```text so markdown linters stop flagging missing language specifiers.
- Around line 373-388: The fenced code block containing the file structure
diagram in AGENTS.md is missing a language specifier and triggers a markdown
lint warning; update that fenced code block that shows the "src/ ├── app/ ..."
file tree to include a language specifier (for example "text") immediately after
the opening fence so the block is recognized correctly by the linter.
♻️ Duplicate comments (1)
AGENTS.md (1)

308-316: Improve keyboard accessibility example.

The keyboard handler only checks for Enter key, but accessible buttons must also respond to Space key. Additionally, native <button> elements already handle both keys automatically, so this pattern is primarily needed for custom interactive elements with role="button".

♿ Improved keyboard accessibility pattern
-<button onClick={handleClick} onKeyDown={(e) => e.key === 'Enter' && handleClick()}>
+// Note: Native <button> elements already handle Enter and Space automatically.
+// This pattern is for custom interactive elements with role="button":
+<div 
+  role="button"
+  tabIndex={0}
+  onClick={handleClick} 
+  onKeyDown={(e) => {
+    if (e.key === 'Enter' || e.key === ' ') {
+      e.preventDefault()
+      handleClick()
+    }
+  }}
+>
   Click me
-</button>
+</div>
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8fbe272 and 61720aa.

📒 Files selected for processing (1)
  • AGENTS.md
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2024-12-06T20:47:07.465Z
Learnt from: Rahulsoni9321
Repo: tyaga001/devtoolsacademy PR: 49
File: src/components/ChatSuggestions.tsx:16-27
Timestamp: 2024-12-06T20:47:07.465Z
Learning: In the `ChatSuggestions` component, keyboard accessibility for suggestions is intentionally not implemented because there are only two questions displayed, and the 'Enter' key is reserved for sending out user questions.

Applied to files:

  • AGENTS.md
📚 Learning: 2024-12-04T09:02:22.583Z
Learnt from: tyaga001
Repo: tyaga001/devtoolsacademy PR: 45
File: src/components/Footer.tsx:15-24
Timestamp: 2024-12-04T09:02:22.583Z
Learning: When verifying the accessibility of blog post URLs in `src/components/Footer.tsx`, ensure that accessible URLs are not incorrectly flagged as inaccessible. Double-check the URLs before reporting accessibility issues.

Applied to files:

  • AGENTS.md
📚 Learning: 2024-12-06T20:37:00.154Z
Learnt from: Rahulsoni9321
Repo: tyaga001/devtoolsacademy PR: 49
File: src/components/ChatSuggestions.tsx:19-24
Timestamp: 2024-12-06T20:37:00.154Z
Learning: Keyboard accessibility was not added to `ChatSuggestions.tsx` because it displays only two questions.

Applied to files:

  • AGENTS.md
🪛 markdownlint-cli2 (0.18.1)
AGENTS.md

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

(MD040, fenced-code-language)


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

(MD040, fenced-code-language)


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

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build (18.x)
🔇 Additional comments (1)
AGENTS.md (1)

252-265: Use Prisma singleton pattern to prevent connection exhaustion.

Creating a new PrismaClient() instance in API routes can exhaust database connections, especially in development where hot reloading creates multiple instances. Use a singleton pattern instead.

🔧 Recommended singleton pattern

Update the example to use a singleton:

-// In API routes
-import { PrismaClient } from "@prisma/client"
-const prisma = new PrismaClient()
+// In API routes
+import prisma from "@/lib/prisma"

 export async function GET() {
   try {
     const data = await prisma.table.findMany()
     return Response.json(data)
   } catch (error) {
     return Response.json({ error: "Database error" }, { status: 500 })
   }
 }

And note that @/lib/prisma.ts should export a singleton:

import { PrismaClient } from "@prisma/client"

const globalForPrisma = globalThis as unknown as {
  prisma: PrismaClient | undefined
}

export const prisma = globalForPrisma.prisma ?? new PrismaClient()

if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma

export default prisma

This pattern is mentioned in the File Structure section at line 383, so the example should align with it.

⛔ Skipped due to learnings
Learnt from: Ankur1493
Repo: tyaga001/devtoolsacademy PR: 39
File: src/lib/tools.ts:1-1
Timestamp: 2024-11-23T11:57:43.371Z
Learning: In `src/lib/tools.ts`, creating a new `PrismaClient` instance for each request is acceptable in this project and does not cause connection pool exhaustion due to previous optimizations.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +348 to +362
```
feat: add user authentication
fix: resolve login form validation bug
docs: update API documentation
style: format code with prettier
refactor: simplify component structure
```

#### Branch Naming

```
feature/user-authentication
bugfix/login-validation
hotfix/security-patch
```
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

Add language specifiers to fenced code blocks.

The fenced code blocks for commit message examples and branch naming patterns are missing language specifiers, which triggers markdown linting warnings.

📝 Add language specifiers
 #### Commit Messages

 Follow conventional commit format:

-```
+```text
 feat: add user authentication
 fix: resolve login form validation bug
 docs: update API documentation
 style: format code with prettier
 refactor: simplify component structure

Branch Naming

- +text
feature/user-authentication
bugfix/login-validation
hotfix/security-patch

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

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

(MD040, fenced-code-language)


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

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In `@AGENTS.md` around lines 348 - 362, Add a language specifier (e.g., "text") to
both fenced code blocks shown: the commit message block starting with "feat: add
user authentication ..." and the branch naming block listing
"feature/user-authentication ...", by changing their opening fences from ``` to
```text so markdown linters stop flagging missing language specifiers.

Comment on lines +373 to +388
```
src/
├── app/ # Next.js app router pages
│ ├── api/ # API routes
│ ├── (routes)/ # Route groups
│ └── globals.css # Global styles
├── components/ # Reusable components
│ ├── ui/ # shadcn/ui components
│ └── (feature)/ # Feature-specific components
├── lib/ # Utilities and configurations
│ ├── prisma.ts # Database client
│ ├── types.ts # TypeScript interfaces
│ ├── utils.ts # Utility functions
│ └── zodSchema.ts # Validation schemas
└── assets/ # Static assets
```
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

Add language specifier to file structure code block.

The file structure diagram is missing a language specifier, triggering a markdown linting warning.

📝 Add language specifier
 ### File Structure

-```
+```text
 src/
 ├── app/                    # Next.js app router pages
 │   ├── api/               # API routes
📝 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
```
src/
├── app/ # Next.js app router pages
│ ├── api/ # API routes
│ ├── (routes)/ # Route groups
│ └── globals.css # Global styles
├── components/ # Reusable components
│ ├── ui/ # shadcn/ui components
│ └── (feature)/ # Feature-specific components
├── lib/ # Utilities and configurations
│ ├── prisma.ts # Database client
│ ├── types.ts # TypeScript interfaces
│ ├── utils.ts # Utility functions
│ └── zodSchema.ts # Validation schemas
└── assets/ # Static assets
```
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

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

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In `@AGENTS.md` around lines 373 - 388, The fenced code block containing the file
structure diagram in AGENTS.md is missing a language specifier and triggers a
markdown lint warning; update that fenced code block that shows the "src/ ├──
app/ ..." file tree to include a language specifier (for example "text")
immediately after the opening fence so the block is recognized correctly by the
linter.

@nirnejak nirnejak changed the title Blog Layout Blog Layout [DO NOT MERGE] Jan 15, 2026
@nirnejak nirnejak changed the title Blog Layout [DO NOT MERGE] Blog Layout Jan 20, 2026
@tyaga001 tyaga001 merged commit 3567019 into main Jan 20, 2026
6 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Jan 20, 2026
27 tasks
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.

3 participants