From 07239bd811b77b6c82163d9e26b16831e29c653b Mon Sep 17 00:00:00 2001 From: alireza Date: Sun, 14 Jun 2026 17:01:28 +0330 Subject: [PATCH] feat: radar category pages, post detail page, panel CMS wiring + webp uploads - Add /radar/:category dynamic detail pages (hero, special banner, grids, pagination) - Add /posts/:id article page: cover mask, magic-text scroll reveal, charts, comments, floating related sidebar, logged-out membership gate - Panel: radar_pages table/routes + admin UI, grouped right sidebar, webp image conversion on upload (sharp) - Mobile fixes: overflow-x guards, left-side accordion menu, globe/podcast/hero - Header: flag language toggle Co-Authored-By: Claude Opus 4.8 (1M context) --- .rtk/filters.toml | 13 + CLAUDE.md | 139 ++ panel/db.js | 488 ++++++ panel/package-lock.json | 564 ++++++- panel/package.json | 3 +- panel/public/app.js | 1353 ++++++++++++++++- panel/public/style.css | 10 +- panel/seed-content.js | 702 +++++++++ panel/server.js | 827 +++++++++- public/hero 2.webp | Bin 120546 -> 0 bytes public/hero 3.webp | Bin 282938 -> 0 bytes public/hero2.webp | Bin 0 -> 84676 bytes public/hero3.webp | Bin 0 -> 99016 bytes src/app/layout/Footer.tsx | 70 +- src/app/layout/Header.tsx | 51 +- src/app/router.tsx | 8 + src/components/ui/StrategicEvents.tsx | 24 +- src/components/ui/bento-grid.tsx | 4 + src/components/ui/magic-text.tsx | 111 ++ src/content/factoryReports.ts | 43 +- src/content/integrations.ts | 42 +- src/content/posts.ts | 118 ++ src/content/radar.ts | 22 + src/content/radarCategories.ts | 276 ++++ src/data/about.ts | 144 ++ src/data/banners.ts | 82 + src/data/events.ts | 18 + src/data/market.ts | 99 ++ src/data/media.ts | 157 ++ src/data/plans.ts | 34 + src/data/risks.ts | 69 + src/data/team.ts | 18 + src/index.css | 21 + src/lib/api.ts | 19 + src/main.tsx | 18 +- src/pages/About/About.tsx | 209 +++ src/pages/Contact/Contact.tsx | 449 ++++++ src/pages/Events/Events.tsx | 196 +-- src/pages/Experts/Experts.tsx | 8 +- src/pages/Home/Home.tsx | 2 - src/pages/Home/sections/AtAGlanceSection.tsx | 119 +- .../Home/sections/FactoryBentoSection.tsx | 27 +- .../Home/sections/FactoryReportsScroll.tsx | 30 +- .../Home/sections/FeaturedReportBanner.tsx | 95 +- .../Home/sections/GlobalScannerSection.tsx | 2 +- src/pages/Home/sections/HeroSection.tsx | 83 +- .../Home/sections/IntegrationsSection.tsx | 7 +- src/pages/Home/sections/MapEventsSection.tsx | 4 +- src/pages/Home/sections/RadarTechSection.tsx | 51 +- src/pages/Home/sections/SpreadFeatures.tsx | 49 +- .../Home/sections/VideocastPodcastSection.tsx | 191 +-- src/pages/Membership/Membership.tsx | 2 +- src/pages/PostDetail/PostDetail.tsx | 400 +++++ src/pages/Radar/Radar.tsx | 21 +- src/pages/RadarCategory/RadarCategory.tsx | 351 +++++ src/pages/Scanner/Scanner.tsx | 23 +- src/pages/Team/Team.tsx | 6 +- 57 files changed, 7289 insertions(+), 583 deletions(-) create mode 100644 .rtk/filters.toml create mode 100644 panel/seed-content.js delete mode 100644 public/hero 2.webp delete mode 100644 public/hero 3.webp create mode 100644 public/hero2.webp create mode 100644 public/hero3.webp create mode 100644 src/components/ui/magic-text.tsx create mode 100644 src/content/posts.ts create mode 100644 src/content/radarCategories.ts create mode 100644 src/data/about.ts create mode 100644 src/data/banners.ts create mode 100644 src/data/media.ts create mode 100644 src/data/risks.ts create mode 100644 src/lib/api.ts create mode 100644 src/pages/About/About.tsx create mode 100644 src/pages/Contact/Contact.tsx create mode 100644 src/pages/PostDetail/PostDetail.tsx create mode 100644 src/pages/RadarCategory/RadarCategory.tsx diff --git a/.rtk/filters.toml b/.rtk/filters.toml new file mode 100644 index 0000000..d9bd43f --- /dev/null +++ b/.rtk/filters.toml @@ -0,0 +1,13 @@ +# Project-local RTK filters — commit this file with your repo. +# Filters here override user-global and built-in filters. +# Docs: https://github.com/rtk-ai/rtk#custom-filters +schema_version = 1 + +# Example: suppress build noise from a custom tool +# [filters.my-tool] +# description = "Compact my-tool output" +# match_command = "^my-tool\\s+build" +# strip_ansi = true +# strip_lines_matching = ["^\\s*$", "^Downloading", "^Installing"] +# max_lines = 30 +# on_empty = "my-tool: ok" diff --git a/CLAUDE.md b/CLAUDE.md index 845e74b..4a497d0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -59,3 +59,142 @@ npm rebuild better-sqlite3 # REQUIRED if Node's ABI changed — native addon, f ## Wiring the panel to the site (not done yet) When asked to make published content appear on the site: add a frontend fetch client (e.g. `src/lib/api.ts` reading `import.meta.env.VITE_API_URL`), replace a section's `src/content/*` import with a hook that calls `GET /api/articles?category=
`, and keep the static file as the loading fallback. Do it one section at a time. The `articles` table's `category` column is the per-section discriminator. Recommended schema additions before going live: a `status` (draft/published) column, and an `events` resource for the calendar. + + +# RTK (Rust Token Killer) - Token-Optimized Commands + +## Golden Rule + +**Always prefix commands with `rtk`**. If RTK has a dedicated filter, it uses it. If not, it passes through unchanged. This means RTK is always safe to use. + +**Important**: Even in command chains with `&&`, use `rtk`: +```bash +# ❌ Wrong +git add . && git commit -m "msg" && git push + +# ✅ Correct +rtk git add . && rtk git commit -m "msg" && rtk git push +``` + +## RTK Commands by Workflow + +### Build & Compile (80-90% savings) +```bash +rtk cargo build # Cargo build output +rtk cargo check # Cargo check output +rtk cargo clippy # Clippy warnings grouped by file (80%) +rtk tsc # TypeScript errors grouped by file/code (83%) +rtk lint # ESLint/Biome violations grouped (84%) +rtk prettier --check # Files needing format only (70%) +rtk next build # Next.js build with route metrics (87%) +``` + +### Test (60-99% savings) +```bash +rtk cargo test # Cargo test failures only (90%) +rtk go test # Go test failures only (90%) +rtk jest # Jest failures only (99.5%) +rtk vitest # Vitest failures only (99.5%) +rtk playwright test # Playwright failures only (94%) +rtk pytest # Python test failures only (90%) +rtk rake test # Ruby test failures only (90%) +rtk rspec # RSpec test failures only (60%) +rtk test # Generic test wrapper - failures only +``` + +### Git (59-80% savings) +```bash +rtk git status # Compact status +rtk git log # Compact log (works with all git flags) +rtk git diff # Compact diff (80%) +rtk git show # Compact show (80%) +rtk git add # Ultra-compact confirmations (59%) +rtk git commit # Ultra-compact confirmations (59%) +rtk git push # Ultra-compact confirmations +rtk git pull # Ultra-compact confirmations +rtk git branch # Compact branch list +rtk git fetch # Compact fetch +rtk git stash # Compact stash +rtk git worktree # Compact worktree +``` + +Note: Git passthrough works for ALL subcommands, even those not explicitly listed. + +### GitHub (26-87% savings) +```bash +rtk gh pr view # Compact PR view (87%) +rtk gh pr checks # Compact PR checks (79%) +rtk gh run list # Compact workflow runs (82%) +rtk gh issue list # Compact issue list (80%) +rtk gh api # Compact API responses (26%) +``` + +### JavaScript/TypeScript Tooling (70-90% savings) +```bash +rtk pnpm list # Compact dependency tree (70%) +rtk pnpm outdated # Compact outdated packages (80%) +rtk pnpm install # Compact install output (90%) +rtk npm run