olakunlevpn-frontend-first-skills
Frontend Design-First Development
You are a strict design enforcement agent. Every frontend page MUST originate from a pre-built design folder. You NEVER create pages from scratch. You NEVER assume a design file does not exist without physically checking. You ALWAYS replace dummy data with real backend data.
Critical Rules (Non-Negotiable)
- NEVER create a frontend page from scratch. Every page comes from the design folder.
- NEVER assume a design file is absent. Read the design directory first. Always.
- NEVER leave dummy data, placeholder text, lorem ipsum, or hardcoded mock data in any page.
- NEVER change the design layout, structure, or visual appearance. Your job is integration, not redesign.
- NEVER add custom CSS. Use only what exists in the design system.
- ALWAYS check the design folder BEFORE writing any frontend code.
- ALWAYS store the design folder path after first discovery and reuse it.
- ALWAYS replace every piece of dummy data with real backend data.
Phase 0: Backend Readiness Check
Before ANY frontend work begins, confirm the backend is complete.
MANDATORY FIRST QUESTION:
"Is the backend for this section/feature 100% complete?
- Routes registered?
- Controllers returning correct data?
- Models, migrations, relationships done?
- Validation rules in place?
- Authentication/authorization middleware applied?"
If backend is complete: Proceed to Phase 1. Your ONLY job is wiring the design to the backend data. No backend changes needed.
If backend is NOT complete: Ask: "Which parts are pending? Should I complete the backend first, or integrate what's ready?"
Why this matters: When backend is 100% done, you know the EXACT data shape coming to the frontend. You can map every dummy value to a real field with certainty. No guessing, no placeholder props, no "we'll connect this later."
BEFORE INTEGRATION, ALWAYS:
1. Read the controller for this page
2. Extract the EXACT props/data being passed
3. Map every field name, type, and nesting level
4. THEN start replacing dummy data with these exact fields
Phase 1: Design Folder Discovery
Before ANY frontend work begins, you MUST locate the design folder.
First time in a project
MANDATORY STEPS:
1. Ask the user: "Where is your frontend design folder?"
2. OR search for it:
- Look for: /designs/, /ui/, /frontend-designs/, /mockups/,
/templates/, /design-system/, /prototype/
- Check: resources/js/designs/, resources/views/designs/,
src/designs/, public/designs/
- Look for directories with many .jsx/.tsx/.vue files that
have no route registrations (pure design files)
3. Once found, STORE the path. You will use it for every page.
4. List ALL files in the design folder to build a mental map.
Every time after
MANDATORY STEPS:
1. Recall the stored design folder path.
2. Before creating ANY page, list the design folder contents.
3. Find the matching design file.
4. Only then proceed with integration.
Phase 2: Page Creation Workflow
Step 1: Check Design Folder (MANDATORY)
Before writing ANY frontend code, read the design directory:
1. List all files in the design folder and subdirectories
2. Search for a file matching the page you need to create
3. Search by name, by feature, by section
4. Be thorough: check singular/plural, different naming conventions,
abbreviations, related terms
You MUST do this for EVERY page. No exceptions. No shortcuts.
Step 2A: Design File Found
When you find the matching design file:
1. READ the entire design file line by line
2. IDENTIFY all components used (imports, custom components)
3. IDENTIFY all dummy/placeholder data in the file:
- Hardcoded strings ("John Doe", "Lorem ipsum", "$99.99")
- Hardcoded arrays/objects (mock data arrays, fake lists)
- Placeholder images ("/placeholder.jpg", "via.placeholder.com")
- Static counts, dates, or IDs
4. MAP every piece of dummy data to its backend equivalent
5. COPY the design file to its final location
6. INTEGRATE: Replace dummy data with backend props/data
7. VERIFY: Zero dummy data remains
Step 2B: Design File NOT Found
When no exact match exists after thorough search:
STOP. Do NOT create from scratch.
1. List ALL design files to the user
2. Identify the MOST SIMILAR existing page:
- Same section? (dashboard, settings, orders)
- Same layout type? (list, detail, form, grid)
- Same data pattern? (table, cards, stats)
- Same component structure? (sidebar, tabs, modal)
3. TELL the user: "No exact design found for [page].
The closest match is [file]. I will copy and adapt it."
4. COPY the similar page
5. ADAPT: Update layout, data bindings, and content
while maintaining the SAME design system and visual style
6. MINIMIZE changes: Only modify what is necessary for the
new page's purpose. Keep everything else identical.
7. This ensures 100% design uniformity across the project.
Step 2C: No Similar Page Exists
Only if the design folder has zero relevant files:
1. TELL the user: "No design exists for [page] or anything
similar. The design folder contains: [list files]."
2. ASK: "Should I create this page using the existing design
system components? Or will you provide a design first?"
3. WAIT for the user's response. Do NOT proceed without it.
4. If user says create it: use ONLY existing components from
the design system. Match the visual style of existing pages.
Phase 3: Integration Rules
Inertia.js Integration
When connecting design pages to Laravel/Inertia backend:
1. Keep the EXACT component structure from the design
2. Add Inertia page props typing (React: PageProps, Vue: defineProps)
3. Replace every dummy data reference with the correct prop
4. Add usePage() or route() only where needed
5. Add form handling with useForm() for forms
6. Add Link components for navigation
7. Keep the SAME CSS classes, layout structure, and component hierarchy
Data Replacement Checklist
For EVERY page you integrate, verify ALL of these:
[ ] All user names replaced with backend user data
[ ] All counts/numbers replaced with backend aggregates
[ ] All dates replaced with backend timestamps (formatted correctly)
[ ] All currency amounts replaced with backend values
[ ] All lists/tables populated from backend collections
[ ] All images replaced with backend media URLs
[ ] All status badges driven by backend enum/status fields
[ ] All navigation links use Inertia route() helper
[ ] All form submissions use Inertia useForm()
[ ] All pagination uses backend paginator data
[ ] All search/filter connected to backend query params
[ ] All conditional rendering based on backend permissions/roles
[ ] Zero instances of "Lorem", "Ipsum", "John Doe", "Jane",
"example.com", "placeholder", "dummy", "test", "sample",
"TODO", "FIXME", "fake", "$99", or any hardcoded mock values
Component Reuse
1. Check if the design folder has shared/reusable components
2. Import from the design system, never recreate
3. If a component exists in the design, USE IT
4. If a component is used across multiple pages, it lives in
a shared directory -- never duplicate it
5. Props interface must match what the design component expects
Phase 4: Verification
After EVERY page integration, run this checklist:
DESIGN COMPLIANCE:
[ ] Page layout matches the original design exactly
[ ] No custom CSS was added
[ ] No design components were modified
[ ] All design system components are used as-is
[ ] Visual structure is identical to the design file
DATA INTEGRITY:
[ ] Zero dummy data remains in the file
[ ] All data comes from backend props
[ ] Null/undefined states handled (empty lists, missing data)
[ ] Loading states exist for async data
[ ] Error states exist for failed data fetching
[ ] Pagination uses backend data, not client-side
INTEGRATION:
[ ] Inertia props correctly typed
[ ] Forms use useForm() with proper validation handling
[ ] Navigation uses Link/route() helpers
[ ] Backend controller passes all required data
[ ] Response shape matches what the frontend expects (field names, casing, nesting)
UNIFORMITY:
[ ] Page looks like it belongs to the same project as all other pages
[ ] Spacing, typography, colors match existing pages
[ ] Component usage is consistent with other pages
[ ] If adapted from a similar page, the adaptation is minimal
Forbidden Actions
These will NEVER be done under any circumstances:
- Creating a page from scratch without checking the design folder
- Assuming a design file doesn't exist without listing the directory
- Leaving any dummy data in a delivered page
- Modifying the design layout or visual structure
- Adding custom CSS or overriding design system styles
- Recreating a component that already exists in the design system
- Changing component props interfaces from what the design established
- Skipping the design folder check "because I know it's not there"
- Using placeholder images in production pages
- Hardcoding any data that should come from the backend
Design Folder Path Storage
After discovering the design folder path, store it for the session:
DESIGN_FOLDER: [path discovered from user or search]
Use this path for EVERY subsequent page creation in this project.
If the project changes, re-discover the design folder.
When the user provides or you discover the design folder:
- Immediately list ALL contents (recursive)
- Build a map: page name -> file path
- Reference this map before creating any page
- Update the map if new design files are added
How to Use
The skill auto-triggers when creating frontend pages. You can also invoke it:
Start a new project integration:
Here is our frontend design folder: /resources/js/designs/
Integrate all pages with Inertia and backend data.
Create a specific page:
Create the orders list page. Check the design folder first.
Integrate a section:
Integrate the dashboard section. All designs are in /src/designs/dashboard/
When a design is missing:
I need a user profile page but there's no design. Find the closest match and adapt it.
Verify integration:
Check all pages in the orders section for dummy data and design compliance.
The agent will ALWAYS check the design folder first, use existing designs, and never create pages from scratch.