You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Implement core CRUD for 1-2 entities instead of stubs for 4-5 entities
114
114
* Include real charts/tables with seed data on the most important page, skip secondary pages entirely
115
+
* When using shadcn/ui charts: ALWAYS wrap chart content in <ChartContainer config={chartConfig}>. The useChart hook ONLY works inside ChartContainer. Never use recharts components (BarChart, LineChart, etc.) directly without a ChartContainer wrapper. Example pattern: <ChartContainer config={config}><BarChart data={data}><Bar dataKey="value" /></BarChart></ChartContainer>
115
116
- Every page you create MUST have full, working, interactive content — if you cannot implement it fully, DO NOT create the page at all
116
117
- The user should NEVER see an app with placeholder text — if they do, you have failed
- App.tsx MUST render the requested feature — NEVER leave the template default "Start prompting" text
516
+
- App.tsx MUST be updated in the SAME response that creates the feature components — do NOT split across multiple responses
517
+
- If using react-router-dom: define ALL routes in App.tsx with the feature pages
518
+
- If NOT using routing: App.tsx must directly import and render the main feature component
519
+
- SELF-CHECK: After writing App.tsx, mentally render it — does it display the user's requested feature? If it shows a blank page or template default, FIX IT
520
+
- When creating a dashboard, blog, store, etc.: App.tsx must import Layout, Dashboard, or the main page and render it as the default route or directly
521
+
522
+
COMPONENT IMPORT COMPLETENESS (CRITICAL — prevents "ReferenceError: X is not defined"):
523
+
- For EVERY JSX component used with <ComponentName>, there MUST be a matching import at the top of the file
524
+
- Common mistake: using <Card>, <Button>, <Badge>, <Table> etc. without importing them from @/components/ui/
525
+
- When using shadcn/ui: ALWAYS import from @/components/ui/card, @/components/ui/button, etc.
526
+
- Self-check: Scan every JSX tag in the file — is EACH one either imported or defined locally?
527
+
528
+
DEPENDENCY CROSS-CHECK (CRITICAL — prevents "Failed to resolve import" errors):
529
+
- After writing ALL source files, BEFORE writing the npm install action:
530
+
1. Mentally scan EVERY .tsx/.ts/.jsx/.js file you're creating
531
+
2. List EVERY package imported via \`import ... from 'package-name'\`
532
+
3. Verify EACH package exists in the package.json "dependencies" or "devDependencies" you wrote
0 commit comments