- Self-contained: Everything needs to be contained in one folder (subfolders are acceptable). The folder must be named using UpperCamelCase (e.g.,
ComponentName
). - Technical Stack & Standards: All components must adhere to the following unless a specific, pre-approved exception is granted.
- a. Server-Side by Default: We use Next.js App Router. Components must be React Server Components. Do not use the
"use client"
directive unless explicitly required. - b. TypeScript: We enforce a strict linter. No linter errors or
any
types will be accepted. - c. Clarity and Naming: Code must be clean and well-commented. Use long, descriptive variable names. The code should be immediately understandable.
- d. Styling: Use Tailwind CSS exclusively. No third-party styling libraries are permitted.
- e. No External Libraries: Do not add or modify
package.json
. - f. No Global Dependencies: Components must be fully self-sufficient and not rely on global variables or styles.
- g. Relative Imports Only: Do not use aliased imports like
@/
. - h. No Image Files: All images are either SVGs embedded directly or served from our CMS.
- i. Folder Conventions: Follow the specified folder structure. For simple projects, a single file
<ComponentName.tsx>
is expected. - j. Responsive Design: Display/work reasonably well on mobile as well as desktop.
- Required File Header: Every file must begin with these lines, with the version incremented on every change.
// app/settings/consult/projp/actionable-advice-proj/components/ActionableAdvice.tsx
// version: 1
// author: [name of developer/company]