Commit Graph

13 Commits

Author SHA1 Message Date
alireza 5a3d405ff4 fix: update VITE_PANEL_API URL and improve login form accessibility
refactor: streamline SpreadFeatures component by removing unused video handling
feat: implement SSO hand-off for Statista integration in server
2026-06-29 14:23:24 +03:30
alireza fc103c8534 Add stack-specific hardening guidelines for Node + Postgres/MySQL applications
This document provides detailed security measures tailored for applications using Node.js with Postgres or MySQL, including authentication, authorization, file uploads, Stripe integration, and more. It emphasizes the importance of rebuilding safety nets such as Postgres Row Level Security and implementing strict ownership checks to mitigate risks associated with direct database access. Additionally, it covers best practices for CORS, CSRF protection, error handling, and secrets management, ensuring a comprehensive approach to securing the stack.
2026-06-27 17:10:53 +03:30
alireza 406717be13 refactor: clean up frontend dependencies and remove unused files
- Removed several unused dependencies from frontend package.json including @tabler/icons-react, @tanstack/react-query, cobe, dotted-map, and jalaali-js.
- Deleted the hero-bg.original.mp4 video file as it was no longer needed.
- Removed live_dashboard.html and live_prices.js files, which were part of the old dashboard implementation.
- Eliminated the scraper.py script and related price fetching logic from the server, streamlining the backend.
- Removed the rtk.exe binary file as it was not required.
2026-06-27 16:00:59 +03:30
alireza b1ce43bc7b feat: enhance RTL support and add service worker for PWA
- Updated CSS to improve touch actions and text size adjustment for RTL layout.
- Modified ticker animation for RTL direction.
- Implemented service worker registration for production builds to enable offline capabilities.
- Enhanced Archive page to utilize search parameters and dynamically generate categories.
- Improved AtAGlance component with new modal design and updated content structure.
- Added keyword animation feature to the AuthPage for a more engaging login experience.
- Created a new SearchResults component to aggregate and display search results from various content sources.
- Introduced a minimal service worker to cache responses and support offline functionality.
2026-06-27 14:31:55 +03:30
alireza b2e9bcdf40 feat: phone+OTP auth, profile redesign, At-a-Glance Figma polish, radar/article fixes
- Auth: phone-or-email login, OTP login/signup (Kavenegar SFsignin/SFsignup),
  register-verify + password-otp endpoints, OTP-login session fix
- Profile page redesign (menu right / data left, RTL) + SMS password reset
- At a Glance: Figma-matched cards (gold pill badge, gray cards, meta), category
  rename, computed counts, animated news ticker, summit banner, 5-line gated preview
- About page: remove board banner, selectable dept tabs, contact section
- Radar: fix duplicated MiniCard excerpt; gate -> our own auth (login/register)
- Footer trust badges + flag-image language toggle; site-wide Persian digits
2026-06-23 16:56:16 +03:30
alireza dce09cbd23 Refactor authentication handling across PostDetail, ProfilePage, Radar, and RadarPost components
- Replaced localStorage-based authentication checks with context-based checks using useAuth.
- Updated login handling in PostDetail to navigate to the login page instead of setting localStorage directly.
- Simplified ProfilePage to check for member presence instead of token.
- Removed token dependency from InfoTab, PasswordTab, and ContentTab components.
- Adjusted Radar and RadarPost components to utilize context for authentication state.
2026-06-18 08:47:00 +03:30
alireza 4246b3a68a feat: add RadarPost page with membership gate and related sidebar
fix: redirect to archive instead of reports on missing report in ReportDetail

refactor: remove Reports page and its related components

chore: add proxy configuration for API and uploads in Vite
2026-06-18 08:45:02 +03:30
alireza 07239bd811 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) <noreply@anthropic.com>
2026-06-14 17:01:28 +03:30
alireza 238464e073 THU figma redesign 2026-06-11 11:00:17 +03:30
alireza 743888429b Security hardening + navbar restructure
Security fixes:
- JWT_SECRET/ADMIN_PASSWORD fail-fast on missing/weak values
- Switch admin auth from localStorage to httpOnly cookie
- Rate limiting on login (10/15min) and contact form (3/10min)
- CORS whitelist via ALLOWED_ORIGINS env var
- Helmet with CSP, frameguard
- Escape HTML in contact email and admin panel innerHTML
- Remove SVG from upload whitelist
- err.message no longer leaked in API responses
- MAIL_TO moved to env var
- JWT expiry 7d → 24h

Navbar:
- Rename: رادار آینده → آینده‌پژوهی و رصد هوشمند
- Rename: مرز فناوری → فناوری و نوآوری
- Rename: نبض صنعت → بازار و زنجیره فولاد
- Add: پایداری و فولاد سبز (/sustainability)
- Add: ژئوپلیتیک و اقتصاد جهانی (/geopolitics)
- Remove: رویدادها

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 14:37:30 +03:30
alireza c934ee4ab5 Design system rebrand, image slider, contact form, new home sections
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 17:02:46 +03:30
alireza 60bf240cf5 Bilingual site (FA/EN), redesigned sections, new pages
- Full FA/EN toggle via LangContext across all pages and sections
- New pages: Radar, Technology, Pulse, Membership
- Home restructured: Hero → SnapshotBar → 5 chapters
- FactoryBentoSection: Mobarakeh Steel monthly reports (bento grid)
- SteelNewsletterSection: bilingual newsletter + factory list
- Section labels: Persian numerals, editorial rule style
- Header: LTR in EN mode, bilingual nav
- Footer: updated copyright and tagline
- Typography: consistent h2 sizes across sections
- BentoGrid: larger cards (p-8, 18px title)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 11:18:35 +03:30
alireza 09385a0a18 Add admin panel + wire main site to fetch articles from panel API
- panel/: standalone Express + SQLite + JWT admin (server.js, db.js, seed.js,
  vanilla-JS admin UI under public/). CRUD for articles with cover image
  uploads. README documents API, run instructions, and integration steps.
- src/data/reports.ts: appended bootstrapReports() that fetches from
  VITE_PANEL_API (defaults to http://localhost:3001) and mutates the in-memory
  reports array. Static array kept as fallback when panel is offline.
- src/main.tsx: awaits bootstrapReports() before initial render so all
  existing consumers see panel data without per-file changes.
2026-05-26 17:11:04 +03:30