Skip to content

Commit 6ef285b

Browse files
authored
ENG-8946: Add CLAUDE.md (#1767)
1 parent f0dbd13 commit 6ef285b

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

CLAUDE.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# CLAUDE.md
2+
3+
## What is this project?
4+
5+
The official Reflex website (reflex.dev) — built with Reflex itself. Includes docs, blog, pricing, landing pages, and customer showcases. Serves as both the public-facing site and a real-world example of a production Reflex app.
6+
7+
## Tech stack
8+
9+
- **Framework:** Reflex (Python full-stack)
10+
- **Styling:** Tailwind CSS v4 with Radix UI color system
11+
- **Package manager:** UV (`uv sync` to install deps)
12+
- **Linting:** Ruff, Codespell — enforced via pre-commit
13+
14+
## Project layout
15+
16+
```
17+
pcweb/ # Main application code
18+
pcweb.py # App entry point
19+
whitelist.py # Dev mode: limits which pages are compiled (faster builds)
20+
pages/ # All page routes (docs/, blog/, landing/, pricing/, etc.)
21+
components/ # Reusable UI components
22+
views/ # Shared view components (navbar, footer, cta)
23+
templates/ # Page templates (docpage, mainpage)
24+
meta/ # SEO meta tags
25+
docs/ # Markdown documentation (flexdown)
26+
blog/ # Blog posts (markdown + frontmatter)
27+
tests/ # Pytest + Playwright tests
28+
```
29+
30+
## Commands
31+
32+
| Task | Command |
33+
|------|---------|
34+
| Install deps | `uv sync` |
35+
| Run dev server | `uv run reflex run` |
36+
| Run prod | `uv run reflex run --env prod` |
37+
| Compile check | `uv run reflex compile` |
38+
| Run tests | `uv run pytest tests/` |
39+
| Install Playwright (if tests fail) | `uv run playwright install` |
40+
| Lint / format | `uv run pre-commit run --all-files` |
41+
42+
## Dev mode: page whitelist
43+
44+
`pcweb/whitelist.py` limits which pages are compiled in dev mode for faster builds. Empty list = build all. See `pcweb/whitelist.py` for format; paths start with `/`, no trailing slash.
45+
46+
## Code patterns
47+
48+
- **Components:** shared components for the app — see `pcweb/components/`
49+
- **Pages:** use `@mainpage` or `@docpage` decorators — see `pcweb/pages/`, `pcweb/templates/`
50+
- **Imports:** absolute from project root — `from pcweb.components.button import button`
51+
- **Elements:** use `rx.el.*` with Tailwind (not `rx.box`, `rx.text`)
52+
53+
## Key conventions
54+
55+
- Docs: flexdown in `docs/`
56+
- Blog: flexdown in `blog/`
57+
- Before committing: `uv run reflex compile` and `uv run pre-commit run --all-files`

0 commit comments

Comments
 (0)