Imported from rgrthrthrthjtyj4563-lab/Ctrans-pro (
业务分析与设计准备/AGENTS.md). Install upstream withnpx skills add rgrthrthrthjtyj4563-lab/Ctrans-pro --skill 业务分析与设计准备. Copyright stays with the author.
figma-make-app
React + Vite + Tailwind CSS project running inside Figma Make.
Development Server
A Vite development server is already running on $PORT (default 8443). You don't need to start it manually.
- Preview URL: The user can access the running app through the preview panel
- Hot reload: Changes to source files are reflected immediately
Project Structure
This is the canonical project structure. Start with task-relevant files below. Only follow imports or inspect other files when required, when a documented path is missing, or when the repository contradicts this guide.
src/main.tsx- React entrypoint; importssrc/index.cssand mountssrc/App.tsxinto the#rootelementsrc/App.tsx- Primary application component and the usual starting point for UI worksrc/index.css- Global CSS entrypoint and Tailwind CSS v4 importindex.html- Vite HTML shell containing the#rootelement and loadingsrc/main.tsxpackage.json- Project dependencies and the Vite build, development, preview, and formatting scriptsvite.config.ts- Vite configuration with React, Tailwind CSS v4, and Figma Make plugins plus the@alias forsrc.mise.toml- Toolchain versions for Node.js and pnpm
Dependencies
- Runtime: React 19 and React DOM 19
- Styling: Tailwind CSS v4 with the
@tailwindcss/viteplugin - Build tooling: Vite 8, TypeScript 5.7, and
@vitejs/plugin-react - Formatting: oxfmt
Styling
This project uses Tailwind CSS v4 through the @tailwindcss/vite plugin configured in vite.config.ts. src/index.css imports Tailwind with @import 'tailwindcss';. Use Tailwind utility classes directly in JSX and put global CSS or Tailwind v4 theme customization in src/index.css. This scaffold does not need a Tailwind config file or PostCSS config.
src/main.tsx imports src/index.css, so global font wiring belongs in src/index.css. Keep CSS @import statements first, then add any @font-face rules and font-family defaults there.
UI Rules
Before changing a page, component, or style, read UI_RULES.md and ../UI设计基线与首批页面说明.md.
- Reuse the existing common components and
src/index.csstokens. - Do not add a page-specific font, icon library, button style, or business-status meaning.
- Any necessary exception must be stated in the implementation notes.
Code quality
- Use double quotes for strings containing apostrophes (
"We're here to help"), or escape them in single-quoted strings. An unescaped apostrophe in a single-quoted string breaks the build. - Ensure JSX tags are closed and braces are balanced.
- Export components as default exports.