Skip to content

Add CLAUDE.md with codebase guidance for AI assistants#221

Open
shazzar00ni wants to merge 3 commits into
mainfrom
claude/add-claude-documentation-YvkfD
Open

Add CLAUDE.md with codebase guidance for AI assistants#221
shazzar00ni wants to merge 3 commits into
mainfrom
claude/add-claude-documentation-YvkfD

Conversation

@shazzar00ni

@shazzar00ni shazzar00ni commented May 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds CLAUDE.md to provide structured guidance for future Claude Code sessions working in this repository
  • Documents all development commands (dev, build, lint, typecheck, test, e2e) including how to run a single test file
  • Explains the high-level architecture: single-page landing site with anchor navigation, lazy-loaded below-fold sections, centralized content in src/data/content.ts, theme system via React Context + localStorage + Tailwind dark class
  • Captures code conventions (named exports only, no any, import order, component file structure) and testing setup (global mocks for localStorage and IntersectionObserver)

Test plan

  • Verify commands listed in CLAUDE.md match package.json scripts
  • Confirm architecture description matches current src/App.tsx and src/lib/ThemeContext.tsx

Generated by Claude Code

Documents build/test commands, app architecture (single-page landing,
lazy loading, content layer, theme system), code conventions, and
testing setup for future Claude Code sessions.

https://claude.ai/code/session_01ProhZcrkuekv742hSoWLct
@strix-security

Copy link
Copy Markdown

Strix is installed on this repository, but we could not run this PR security review because this workspace does not have an active plan. If you'd like to continue receiving code reviews, you can add a payment method or manage billing here.

@vercel

vercel Bot commented May 13, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docugen Ready Ready Preview, Comment May 21, 2026 10:20am

@github-actions

github-actions Bot commented May 13, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@coderabbitai

coderabbitai Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Rate limit exceeded

@shazzar00ni has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 56 minutes and 57 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 87b76545-7148-40ce-80d7-c8688e495b2c

📥 Commits

Reviewing files that changed from the base of the PR and between c9965a6 and 0b5526d.

📒 Files selected for processing (1)
  • CLAUDE.md

Walkthrough

A new CLAUDE.md file documents repository commands, the static single-page site architecture, frontend composition and theming, design/animation rules, code conventions, testing setup, and the VITE_PLAUSIBLE_DOMAIN client env var.

Changes

Repository Documentation

Layer / File(s) Summary
Setup and commands
CLAUDE.md
Adds repository header, npm scripts (dev/build/preview/lint/format/typecheck), Vitest single-file run example, Playwright E2E instructions, and pre-commit guidance.
Frontend entry, content, and theming
CLAUDE.md
Documents eager vs React.lazy section loading, content sourcing from src/data/content.ts, and theme system with ThemeContext/useTheme, localStorage persistence, prefers-color-scheme fallback, and dark class on <html>; includes design-token and Framer Motion constraints.
Code conventions, testing, and env
CLAUDE.md
Defines named-export and import-path rules, bans any, unused-variable handling, component file ordering; specifies Vitest+RTL with src/test/setup.ts shared mocks and Playwright E2E placement; documents VITE_PLAUSIBLE_DOMAIN.

🎯 1 (Trivial) | ⏱️ ~3 minutes

A crisp guide dropped into the repo's core,
Commands and themes, and tests to explore,
Rules for imports, animations kept neat,
Content, context, and envs all in one sheet.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding CLAUDE.md documentation for AI assistants, which aligns with the changeset.
Description check ✅ Passed The description is directly related to the changeset, detailing what CLAUDE.md documents, the architecture it describes, conventions captured, and a test plan verifying accuracy.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/add-claude-documentation-YvkfD

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.

@codacy-production

codacy-production Bot commented May 13, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@shazzar00ni shazzar00ni self-assigned this May 13, 2026
@shazzar00ni shazzar00ni marked this pull request as ready for review May 13, 2026 16:42

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a744e6a169

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CLAUDE.md Outdated
npm run e2e # Playwright end-to-end tests (requires a running dev server)
```

To run a single unit test file: `npx vitest run src/components/Navbar.test.tsx`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use an existing test file in the single-test example

The documented command npx vitest run src/components/Navbar.test.tsx fails in this repo because src/components/Navbar.test.tsx does not exist, so readers following the guide cannot run the advertised single-file workflow as written. Please point this example at a real test file (for example one under src/components/ that currently exists) so the command is directly usable.

Useful? React with 👍 / 👎.

Comment thread CLAUDE.md Outdated
## Code Conventions

- **Named exports only** — no default exports for components.
- **Absolute imports** from `src/` (TypeScript `moduleResolution: "bundler"` is configured; use `./` or `../` only when needed by tooling).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove unsupported absolute-import guidance

The note says absolute imports from src/ are configured, but this repo has no baseUrl/paths mapping in tsconfig.json and no alias in vite.config.ts, so following this guidance can produce unresolved-import errors. Please either document the current relative-import approach or add and reference the actual alias configuration.

Useful? React with 👍 / 👎.

Comment thread CLAUDE.md Outdated

### Content layer

**All copy lives in `src/data/content.ts`.** Never hardcode strings inside components. The file exports named constants (`HERO_COPY`, `FEATURES`, `FAQS`, `PRICING_COPY`, etc.) consumed directly in components.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Align content-source guidance with current components

The architecture section says all copy lives in src/data/content.ts and should never be hardcoded in components, but current components still embed user-facing text directly (for example Sign In and Get Early Access in src/components/Navbar.tsx). Keeping this claim inaccurate can mislead assistants about where copy changes must be made and cause inconsistent edits.

Useful? React with 👍 / 👎.

- Use FAQ.test.tsx (exists) in the single-test example instead of
  Navbar.test.tsx (does not exist)
- Correct import guidance: no baseUrl/paths configured, so relative
  imports are used throughout, not absolute src/ imports
- Soften content-layer claim: note that some components (e.g. Navbar)
  still have inline strings not yet migrated to content.ts

https://claude.ai/code/session_01ProhZcrkuekv742hSoWLct
@greptile-apps

greptile-apps Bot commented May 21, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds CLAUDE.md to document development commands, architecture, code conventions, and testing setup for AI assistants working in this repository. The file is thorough and largely accurate, but contains one factual error in the architecture section.

  • Commands: All npm run scripts match package.json exactly, including the lint-staged pre-commit hook description.
  • Architecture: The eager/lazy split description is correct in terms of import strategy, but FAQ is labelled as an "above-fold section" alongside Hero and HowItWorks when it is actually rendered after the lazy-loaded Features and Testimonials sections in App.tsx.
  • Conventions & Testing: The TypeScript, ESLint, and Vitest/setup.ts details are all accurate.

Confidence Score: 4/5

Safe to merge after correcting the FAQ section placement description.

The file is documentation only and cannot break the app, but the incorrect 'above-fold' label for FAQ will give AI assistants a wrong mental model of the page layout — FAQ actually renders after Features and Testimonials, not before them. This could lead to incorrect decisions about section ordering or performance optimisation in future sessions.

CLAUDE.md — the above-fold/below-fold grouping in the Architecture section needs to be corrected to reflect the actual render order in App.tsx.

Important Files Changed

Filename Overview
CLAUDE.md New guidance file for AI assistants — mostly accurate, but misclassifies FAQ as an above-fold section when it is actually rendered after Features and Testimonials in App.tsx

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[main.tsx\nReact.StrictMode] --> B[App.tsx\nThemeProvider + ErrorBoundary]
    B --> C[Navbar]
    B --> D[Hero — eager]
    B --> E[HowItWorks — eager]
    B --> F[Features — React.lazy]
    B --> G[Testimonials — React.lazy]
    B --> H[FAQ — eager\n⚠️ labelled above-fold in CLAUDE.md\nbut rendered after lazy sections]
    B --> I[Preview — React.lazy]
    B --> J[Pricing — React.lazy]
    B --> K[Newsletter — React.lazy]
    B --> L[Footer]
Loading

Reviews (2): Last reviewed commit: "Fix ThemeProvider placement in entry-poi..." | Re-trigger Greptile

Comment thread CLAUDE.md Outdated
main.tsx only mounts <App> in <React.StrictMode>; ThemeProvider
is rendered inside App.tsx, not main.tsx.

https://claude.ai/code/session_01ProhZcrkuekv742hSoWLct
@sonarqubecloud

Copy link
Copy Markdown

Comment thread CLAUDE.md
Comment on lines +30 to +32
`main.tsx` mounts `<App>` inside `<React.StrictMode>`. `App.tsx` owns the `<ThemeProvider>` wrapper and renders the full page as a vertical stack of sections.

Above-fold sections (`Hero`, `HowItWorks`, `FAQ`) are eagerly imported. Below-fold sections (`Features`, `Testimonials`, `Preview`, `Pricing`, `Newsletter`) use `React.lazy` + `<Suspense>` for code splitting.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 FAQ is not above the fold

FAQ is eagerly imported (not lazy), but the render order in App.tsx is: HeroHowItWorksFeatures (lazy) → Testimonials (lazy) → FAQPreview (lazy) → Pricing (lazy) → Newsletter (lazy). This means FAQ appears after two lazy-loaded sections, well below the fold. Grouping it with Hero and HowItWorks as "above-fold sections" will mislead an AI assistant about the page layout when reasoning about load order, section sequencing, or above-fold optimisation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants