Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.31 KB

File metadata and controls

40 lines (28 loc) · 1.31 KB

Project Coding Guidelines

These are the coding guidelines for this project. All AI coding agents should follow these rules.

General

  • Keep code as simple and minimal as possible
  • Avoid adding comments for describing obvious behavior, focus comments on "why"
  • Ask yourself "Is there a better way to do this?"
  • Fix problems at the root cause, not with bandaids. If a function has a side effect that makes it hard to use correctly, refactor the function rather than working around it with fake data or wrapper hacks.

Technology Stack

We're using the latest versions of:

  • TypeScript
  • Next.js app router (16+)
  • React (19.2+)
  • Tailwind CSS (v4+)
  • Shadcn UI components

TypeScript Guidelines

  • Import local TypeScript files using @/ syntax
  • Import types using the type keyword
  • Use normal static imports instead of await import()
  • Avoid using the any type in TypeScript
  • Minimize casting in TypeScript
  • Prefer TypeScript objects and arrays over Maps and Sets
  • Prefer single quotes over double quotes for TypeScript strings
  • Import Lucide icons with the Icon suffix

React

  • Minimize useEffect if there is a better alternative
  • Don't use forwardRef, you can pass ref props in React 19+

UI Components

  • When installing Shadcn components use the npx shadcn@latest add [component] command