From b5d10f85599c97025d339eac8159d917c0ce9b03 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 4 Mar 2026 16:44:55 +0100 Subject: [PATCH 1/2] leave just ruff --- CLAUDE.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 000000000..630012c2c --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,57 @@ +# CLAUDE.md + +## What is this project? + +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. + +## Tech stack + +- **Framework:** Reflex (Python full-stack) +- **Styling:** Tailwind CSS v4 with Radix UI color system +- **Package manager:** UV (`uv sync` to install deps) +- **Linting:** Ruff — enforced via pre-commit + +## Project layout + +``` +pcweb/ # Main application code + pcweb.py # App entry point + whitelist.py # Dev mode: limits which pages are compiled (faster builds) + pages/ # All page routes (docs/, blog/, landing/, pricing/, etc.) + components/ # Reusable UI components + views/ # Shared view components (navbar, footer, cta) + templates/ # Page templates (docpage, mainpage) + meta/ # SEO meta tags +docs/ # Markdown documentation (flexdown) +blog/ # Blog posts (markdown + frontmatter) +tests/ # Pytest + Playwright tests +``` + +## Commands + +| Task | Command | +|------|---------| +| Install deps | `uv sync` | +| Run dev server | `uv run reflex run` | +| Run prod | `uv run reflex run --env prod` | +| Compile check | `uv run reflex compile` | +| Run tests | `uv run pytest tests/` | +| Install Playwright (if tests fail) | `uv run playwright install` | +| Lint / format | `uv run pre-commit run --all-files` | + +## Dev mode: page whitelist + +`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. + +## Code patterns + +- **Components:** shared components for the app — see `pcweb/components/` +- **Pages:** use `@mainpage` or `@docpage` decorators — see `pcweb/pages/`, `pcweb/templates/` +- **Imports:** absolute from project root — `from pcweb.components.button import button` +- **Elements:** use `rx.el.*` with Tailwind (not `rx.box`, `rx.text`) + +## Key conventions + +- Docs: flexdown in `docs/` +- Blog: flexdown in `blog/` +- Before committing: `uv run reflex compile` and `uv run pre-commit run --all-files` From 0c290d025fc4b9e59eaa16752a8151e356b44ba9 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 4 Mar 2026 17:20:52 +0100 Subject: [PATCH 2/2] ENG-8885: Update hosting links --- docs/hosting/config_file.md | 3 ++- docs/hosting/databricks.md | 3 ++- docs/hosting/regions.md | 3 ++- pcweb/constants.py | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/hosting/config_file.md b/docs/hosting/config_file.md index 1044167d7..b56c90da5 100644 --- a/docs/hosting/config_file.md +++ b/docs/hosting/config_file.md @@ -1,6 +1,7 @@ ```python exec import reflex as rx from reflex_image_zoom import image_zoom +from pcweb import constants from pcweb.pages.docs import hosting from pcweb.pages import docs from pcweb.styles.styles import get_code_style, cell_style @@ -99,7 +100,7 @@ You can also specify a project uuid instead of name: project: 12345678-1234-1234-1234-1234567890ab ``` -You can go to the homepage of the project in the reflex cloud dashboard to find your project uuid in the url `https://cloud.reflex.dev/project/uuid` +You can go to the homepage of the project in the reflex cloud dashboard to find your project uuid in the url `{constants.REFLEX_CLOUD_URL.rstrip("/")}/project/uuid` ### Apt Packages diff --git a/docs/hosting/databricks.md b/docs/hosting/databricks.md index d2a314dc9..67a4967d1 100644 --- a/docs/hosting/databricks.md +++ b/docs/hosting/databricks.md @@ -1,5 +1,6 @@ ```python exec import reflex as rx +from pcweb import constants from pcweb.styles.styles import get_code_style, cell_style ``` @@ -56,7 +57,7 @@ env: ### Obtain Required Tokens 1. **Reflex Access Token** - - Visit [Reflex Cloud Tokens](https://cloud.reflex.dev/tokens/) + - Visit [Reflex Cloud Tokens]({constants.REFLEX_CLOUD_URL.rstrip("/")}/tokens/) - Navigate to Account Settings → Tokens - Create a new token and copy the value - Replace `your-token-here` in the configuration diff --git a/docs/hosting/regions.md b/docs/hosting/regions.md index 94cf19c18..bc79b293f 100644 --- a/docs/hosting/regions.md +++ b/docs/hosting/regions.md @@ -1,6 +1,7 @@ ```python exec import reflex as rx from reflex_image_zoom import image_zoom +from pcweb.constants import REFLEX_CLOUD_URL from pcweb.pages.docs import hosting from pcweb.pages import docs from pcweb.styles.styles import get_code_style, cell_style @@ -95,7 +96,7 @@ rx.el.table( rx.el.td( rx.el.div( rx.image( - src=f"https://cloud.reflex.dev/flags/{COUNTRIES_CODES[region]}.svg", + src=f"{REFLEX_CLOUD_URL.rstrip('/')}/flags/{COUNTRIES_CODES[region]}.svg", class_name="rounded-[2px] mr-2 w-5 h-4", ), REGIONS_DICT[region], diff --git a/pcweb/constants.py b/pcweb/constants.py index 06f829961..7cc6e1981 100644 --- a/pcweb/constants.py +++ b/pcweb/constants.py @@ -18,7 +18,7 @@ REFLEX_URL = "https://reflex.dev/" REFLEX_DOCS_URL = "https://reflex.dev/docs/getting-started/introduction/" PYNECONE_URL = "https://pynecone.io" -REFLEX_CLOUD_URL = os.getenv("REFLEX_CLOUD_URL", "https://cloud.reflex.dev/") +REFLEX_CLOUD_URL = os.getenv("REFLEX_CLOUD_URL", "https://build.reflex.dev/") REFLEX_BUILD_URL = os.getenv("REFLEX_BUILD_URL", "https://build.reflex.dev/") JOBS_BOARD_URL = "https://www.ycombinator.com/companies/reflex/jobs" CHANGELOG_URL = "https://github.com/reflex-dev/reflex/releases"