← 返回
数据分析 中文

React Local Business Website

Build complete, modern multi-page React websites for local businesses (landscapers, restaurants, salons, plumbers, gyms, etc.). Use when a user asks to build...
为本地企业(如园林设计师、餐厅、美发店、水管工、健身房等)构建完整的现代化多页面React网站。当用户要求构建网站时使用。
maverick-software
数据分析 clawhub v1.0.0 1 版本 99881.2 Key: 无需
★ 1
Stars
📥 821
下载
💾 28
安装
1
版本
#latest

概述

React Local Business Website

Generates a complete, polished 5-page React site for any local business. No coding agent required — write all files directly.

Stack

ToolPurpose
------
Vite + ReactProject scaffold
Tailwind CSS v3Styling
React Router v6Page routing
Framer MotionScroll animations
Lucide ReactIcons

Quick Workflow

  1. Identify business — name, type, location, brand vibe
  2. Pick color palette — see references/business-types.md
  3. Scaffold project — run setup commands
  4. Write config files — tailwind, CSS, index.html, App.jsx
  5. Write components — Navbar, Footer, ScrollToTop
  6. Write 5 pages — Home, Services, Portfolio/Gallery, About, Contact
  7. Build & verifynpm run build must pass clean

Setup Commands

mkdir -p <project-dir> && cd <project-dir> && git init
npm create vite@latest . -- --template react --force
npm install
npm install -D tailwindcss@3 postcss autoprefixer && npx tailwindcss init -p
npm install react-router-dom framer-motion lucide-react

File Structure

src/
  App.jsx          # BrowserRouter + Routes + Navbar/Footer wrap
  main.jsx         # createRoot entry
  index.css        # @import fonts → @tailwind directives → @layer base/components
  components/
    Navbar.jsx     # Sticky, transparent-on-hero → white-on-scroll, mobile hamburger
    Footer.jsx     # 4-col dark footer: brand, links, services, contact
    ScrollToTop.jsx
  pages/
    Home.jsx       # Hero, stats bar, services preview, why-us, portfolio grid, testimonials, CTA
    Services.jsx   # Service cards grid + how-it-works steps
    Portfolio.jsx  # Filterable gallery + lightbox
    About.jsx      # Story, values, timeline, team, awards
    Contact.jsx    # Form with validation + contact info panel

Design Principles

See references/design-system.md for the full design token system, reusable CSS component classes, and animation patterns.

Pages Reference

See references/page-templates.md for section-by-section structure for each of the 5 pages.

Business Types & Images

See references/business-types.md for per-industry color palettes and curated Unsplash image packs.

Key Patterns

App.jsx

<BrowserRouter>
  <ScrollToTop />
  <div className="flex flex-col min-h-screen">
    <Navbar />
    <main className="flex-1"><Routes>...</Routes></main>
    <Footer />
  </div>
</BrowserRouter>

Framer Motion — Scroll Animations

// Standard fade-up on scroll
<motion.div
  initial={{ opacity: 0, y: 30 }}
  whileInView={{ opacity: 1, y: 0 }}
  viewport={{ once: true }}
  transition={{ delay: index * 0.1 }}
>

Staggered Children

const stagger = { visible: { transition: { staggerChildren: 0.12 } } };
const fadeUp = { hidden: { opacity: 0, y: 30 }, visible: { opacity: 1, y: 0 } };
<motion.div initial="hidden" animate="visible" variants={stagger}>
  <motion.h1 variants={fadeUp}>...</motion.h1>
</motion.div>

Navbar Transparency Logic

const transparent = isHome && !scrolled && !mobileOpen;
// Apply: transparent ? "bg-transparent text-white" : "bg-white/95 backdrop-blur shadow"

Contact Form Validation

const validate = () => {
  const e = {};
  if (!form.name.trim()) e.name = "Required";
  if (!/\S+@\S+\.\S+/.test(form.email)) e.email = "Valid email required";
  if (!form.message.trim()) e.message = "Required";
  return e;
};

Image Strategy

Use Unsplash with size + quality params: ?w=1920&q=80 (hero), ?w=800&q=80 (cards), ?w=600&q=80 (thumbnails). Always add object-cover class. See references/business-types.md for per-industry URL packs.

Build Verification

npm run build   # Must exit 0 with no errors

CSS @import must come before @tailwind directives or PostCSS will warn.

Dev Server

# Keep alive via OpenClaw background exec (not nohup):
# exec(command: "cd <dir> && npx vite --host 0.0.0.0 --port 5173", background: true)
# Access: http://localhost:5173

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 04:51 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 166 📥 60,196
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 199 📥 65,231
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,761