Skip to content
frontend-backend-mapper logo

Frontend-Backend Mapper Workflow

frontend-backend-mapper

Analyzes and maps frontend API calls to backend endpoints. Detects missing endpoints, unused endpoints, and integration gaps. Optional: trace complete data flows to database and design tokens. Related: api-contract-validator for detailed type analysis.

SKILL.md

Full skill instructions

Frontend-Backend Mapper Workflow

This skill analyzes the integration between frontend API services and backend endpoints to ensure complete coverage. It can optionally trace complete data flows including database operations and design token usage.

Workflow Steps

  1. Scan frontend API services:

    • Read all files in frontend/​src/​api/​*.ts
    • Extract API call patterns:
      • Function names (e.g., generateKscResponses)
      • HTTP methods (GET, POST, PUT, DELETE)
      • URL paths (e.g., /​api/​v1/​ksc/​generate)
      • Request/​response TypeScript interfaces
    • Build frontend API inventory
  2. Scan backend endpoints:

    • Read all files in backend/​app/​api/​endpoints/​*.py
    • Extract route definitions:
      • Route decorators (@router.post, @router.get)
      • URL paths
      • Request/​response Pydantic models
      • Function names
    • Build backend endpoint inventory
  3. Perform integration analysis:

    • Match frontend calls to backend endpoints
    • Identify ✅ MAPPED integrations (frontend ↔ backend)
    • Identify ❌ MISSING BACKEND endpoints (frontend calls with no backend)
    • Identify ❌ UNUSED BACKEND endpoints (backend routes with no frontend)
    • Identify ⚠️ TYPE MISMATCHES (field name inconsistencies, type differences)
  4. Analyze Genkit flow integration:

    • Read backend/​app/​genkit_flows/​*.py
    • Map backend endpoints to Genkit flows
    • Track complete data flow: Component → Service → Endpoint → Flow
  5. [OPTIONAL] Trace database operations:

    • Read backend/​app/​core/​firestore_cache.py and Firestore collection usage
    • Map backend endpoints to Firestore collections they read/​write
    • Document data persistence flow: Endpoint → Collection → Cache strategy
    • Identify missing database operations (endpoints without data persistence)
    • Only included when --include-database flag is used
  6. [OPTIONAL] Map design token usage:

    • Read frontend/​src/​theme/​tokens.json and CSS token definitions
    • Scan components in frontend/​src/​components/​**/​*.tsx
    • Identify which components use design tokens vs hardcoded values
    • Document token application flow: Token → CSS Variable → Component
    • Flag components not using the M3 token system
    • Only included when --include-design-tokens flag is used
  7. Generate mapping report:

    • Create docs/​INTEGRATION_MAP.md with:
      • Complete integration matrix
      • Missing endpoint list with priority
      • Unused endpoint list for cleanup
      • Type mismatch warnings
      • Integration health score
      • Recommendations for fixes
      • [OPTIONAL] Database persistence flow (with --include-database)
      • [OPTIONAL] Design token coverage report (with --include-design-tokens)
  8. Generate visual diagrams:

    • Create Mermaid diagram showing:
      • Frontend components → API services
      • API services → Backend endpoints
      • Backend endpoints → Genkit flows
      • Missing connections highlighted
      • [OPTIONAL] Add Firestore collection connections (with --include-database)
      • [OPTIONAL] Add design token flow (with --include-design-tokens)
  9. Report findings:

    • Display summary statistics
    • Show critical issues (missing required endpoints)
    • List improvement opportunities
    • Provide action items

Analysis Output Structure

Integration Map Report

# Frontend-Backend Integration Map

Generated: 2025-01-06T12:00:00Z

## Summary Statistics

- Total Frontend API Functions: 45
- Total Backend Endpoints: 38
- Mapped Integrations: 35 (✅ 77.8%)
- Missing Backend Endpoints: 10 (❌ 22.2%)
- Unused Backend Endpoints: 3 (⚠️ 6.7%)
- Type Mismatches: 5 (⚠️ 11.1%)

## Integration Health Score: 78/​100

### ✅ MAPPED INTEGRATIONS (35)

| Frontend Function        | HTTP Method | Backend Endpoint             | Genkit Flow           |
| ------------------------ | ----------- | ---------------------------- | --------------------- |
| `generateKscResponses()` | POST        | `/​api/​v1/​ksc/​generate`       | `generateKscResponse` |
| `getAtsScore()`          | POST        | `/​api/​v1/​analysis/​ats-score` | `atsScoring`          |
| ...                      |

### ❌ MISSING BACKEND ENDPOINTS (10)

| Frontend Function    | Expected Endpoint            | Priority | Impact         |
| -------------------- | ---------------------------- | -------- | -------------- |
| `sendWelcomeEmail()` | POST `/​api/​v1/​email/​welcome` | HIGH     | Broken feature |
| `getUserAnalytics()` | GET `/​api/​v1/​analytics/​user` | MEDIUM   | Missing data   |
| ...                  |

### ❌ UNUSED BACKEND ENDPOINTS (3)

| Endpoint                           | Last Used | Recommendation       |
| ---------------------------------- | --------- | -------------------- |
| GET `/​api/​v1/​admin/​legacy-reports` | Never     | Consider deprecating |
| ...                                |

### ⚠️ TYPE MISMATCHES (5)

| Integration                     | Issue                                                                              | Fix                |
| ------------------------------- | ---------------------------------------------------------------------------------- | ------------------ |
| `analysisService.getAtsScore()` | Frontend uses `resumeText` (camelCase), backend expects `resume_text` (snake_case) | Standardize casing |
| ...                             |

Visual Diagram

The skill generates a Mermaid flowchart:

graph LR
    A[KscGeneratorPage] -->|calls| B[aiServices.generateKscResponses]
    B -->|POST /​api/​v1/​ksc/​generate| C[ksc/​generate endpoint]
    C -->|invokes| D[generateKscResponse flow]
    D -->|caches via| E[Firestore Cache]

    F[AnalysisPage] -->|calls| G[analysisService.getAtsScore]
    G -.->|MISSING| H[/​api/​v1/​analysis/​ats-score]

    style H fill:#ff6b6b,stroke:#ff0000

Template Variables

  • {{FRONTEND_SERVICES}}: List of frontend API service files
  • {{BACKEND_ENDPOINTS}}: List of backend endpoint files
  • {{MAPPED_COUNT}}: Number of mapped integrations
  • {{MISSING_COUNT}}: Number of missing backend endpoints
  • {{UNUSED_COUNT}}: Number of unused backend endpoints
  • {{MISMATCH_COUNT}}: Number of type mismatches
  • {{HEALTH_SCORE}}: Overall integration health percentage
  • {{DIAGRAM}}: Mermaid diagram code

Usage Tips

  • Run this skill after significant frontend or backend changes
  • Use before major releases to catch integration issues
  • Generate integration map for new team members
  • Track integration health over time
  • Prioritize missing endpoints by usage frequency
  • Use --include-database to trace complete data flows to Firestore
  • Use --include-design-tokens to audit component token compliance
  • Use both flags for comprehensive fullstack documentation

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View