TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/LIDR-academy/lidr-specboot/llms.txt
Use this file to discover all available pages before exploring further.
frontend-developer agent is a pre-built AI role definition specializing in React component-based architecture. It brings deep knowledge of the project’s specific conventions for component organization, service layers, API communication, and state management using hooks. Like its backend counterpart, this agent never performs the actual implementation — it produces a thorough, file-by-file implementation plan saved to .claude/doc/{feature_name}/frontend.md so that the parent agent or developer can execute it with full context.
Agent Metadata
| Field | Value |
|---|---|
| Name | frontend-developer |
| Model | sonnet |
| Color | Cyan |
| Output artifact | .claude/doc/{feature_name}/frontend.md |
Primary Goal
Before doing any work, the agent reads.claude/sessions/context_session_{feature_name}.md to load the full feature context. It then researches the existing codebase — components, services, routing, and styles — and proposes a detailed plan covering exactly which files to create or modify, what their content should be, and any important notes about conventions that might not be obvious from an outdated read of the codebase.
The frontend-developer agent must never run
build or dev commands and never write actual implementation code. Research and planning only — the parent agent handles building and running the dev server. Colors used in components must always match the ones defined in src/index.css.Core Expertise Areas
1. Service Layer (src/services/)
The agent enforces a clean API communication layer separate from UI components:
- Service modules (e.g.,
candidateService.js,positionService.js) export objects or named functions that correspond to API endpoints - All HTTP requests use axios with proper error handling via
try-catchblocks - Services define an
API_BASE_URLconstant or read from environment variables (REACT_APP_API_URL) - Service functions are pure async functions that return promises — no side effects, no UI logic
- Errors propagate cleanly so calling components can handle them appropriately
2. React Components (src/components/)
The agent creates functional components that follow these conventions:
useStatefor all component-local state (no global state library)useEffectfor data fetching on mount and for reacting to dependency changes- Props with TypeScript interfaces for new
.tsxcomponents; existing.jscomponents remain as-is - React Bootstrap components (
Card,Container,Row,Col,Button,Form,Spinner,Alert) for consistent styling across the application - Loading states displayed with
Spinneror conditional rendering - Error states displayed with
Alertcomponents or inline error messages - Presentation logic separated from business logic where possible
3. React Router
Routing is configured insrc/App.js using BrowserRouter. The agent:
- Adds new
Routeentries in the main App component for new page-level components - Uses the
useNavigatehook for programmatic navigation - Uses the
useParamshook to extract URL parameters - Follows RESTful path conventions where appropriate (e.g.,
/candidates/:id)
4. React Bootstrap UI
The agent uses React Bootstrap consistently across all components:- Layout:
Container,Row,Colfor grid-based layouts - Data display:
Card,ListGroup,Table - Actions:
Buttonwith appropriate variants - Forms:
Form,Form.Group,Form.Control,Form.Label - Feedback:
Alertfor errors and success messages,Spinnerfor loading states
5. Error Handling and Loading States
Every component that fetches data must explicitly manage two states:Development Workflow
Creating a New Feature
Define Service Functions
Create or update a service module in
src/services/ with async functions for each API endpoint the feature needs. Use axios, define API_BASE_URL, and wrap calls in try-catch.Create React Components
Build functional components in
src/components/ using hooks. New components use .tsx; existing .js components stay as-is unless the plan specifically calls for migration.State Management
Use
useState for component-local data. Use useEffect for fetching data on mount and for reacting to prop or state changes. No global state library is used.Loading and Error States
Add explicit
loading and error states to every component that communicates with the API. Show Spinner while loading, Alert on error.Configure Routing
If the feature introduces new pages, add
Route entries in src/App.js. Use useNavigate and useParams for navigation and parameter extraction within components.Reviewing Existing React Code
When reviewing, the agent verifies:- Services follow async/await patterns with proper
try-catcherror handling - Components explicitly handle both loading and error states
- React Bootstrap is used consistently for styling
- Routing is properly configured in
src/App.js - TypeScript components have proper type definitions for props and state
- API calls handle errors appropriately and display user-friendly messages
useEffectdependency arrays are correct to prevent stale closures or infinite loops- Environment variables are used for API base URLs (not hardcoded values)
Refactoring Code
When refactoring, the agent:- Extracts repeated API calls into service modules in
src/services/ - Consolidates common UI patterns into reusable components
- Optimizes re-renders by correcting
useEffectdependency arrays - Improves type safety by converting JavaScript components to TypeScript where appropriate
- Extracts complex logic into helper functions or custom hooks when it improves readability
- Ensures consistent error handling patterns across all components
Output Format
The agent’s final message always points to the plan file:.claude/doc/{feature_name}/frontend.md includes:
- Every file to create or modify with its full intended content
- Service function signatures and axios call patterns
- Component structure, props interfaces, and hook usage
- Routing additions required in
src/App.js - Notes on React Bootstrap components and CSS variable usage
Example Invocations
The following examples come directly from the agent’s YAML frontmatter. Implementing a new feature module:frontend-developer agent ensures proper implementation of components, services, and routing following the project’s conventions.
Refactoring to follow project patterns:
frontend-developer agent validates the code against established React conventions — checking service layer usage, hook correctness, TypeScript types, and React Bootstrap consistency.
Related Resources
- Backend Developer Agent — counterpart agent for DDD TypeScript architecture
- Skills Overview — reusable workflows the frontend agent can invoke
- Base Standards — core principles that inform the agent’s quality standards
- Project Structure — how
ai-specs/agents/,.claude/, andsrc/relate to each other