These standards govern all frontend development in Specboot-managed projects. The frontend is built on React 18 with TypeScript, Bootstrap for styling, and Cypress for end-to-end testing. Every AI agent working within 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/src/ directory should follow these conventions to maintain a consistent, maintainable, and accessible codebase.
Technology Stack
Core Technologies
| Technology | Version | Purpose |
|---|---|---|
| React | 18.3.1 | UI library with functional components and hooks |
| TypeScript | 4.9.5 | Type safety and better development experience |
| Create React App | 5.0.1 | Build tooling and development server |
| React Router DOM | 6.23.1 | Client-side routing and navigation |
UI Framework
- Bootstrap 5.3.3 — CSS framework for responsive design
- React Bootstrap 2.10.2 — Bootstrap components wrapped for React
- React Bootstrap Icons 1.11.4 — Icon library
- React DatePicker 6.9.0 — Date input components
State Management & Data Flow
- React Hooks (
useState,useEffect) — local state management - React Beautiful DND 13.1.1 — drag and drop functionality
- Axios — HTTP client for API communication
Testing Framework
- Cypress 14.4.1 — end-to-end testing
- Jest — unit testing (via Create React App)
- React Testing Library — component testing utilities
Project Structure
Coding Standards
Naming Conventions
| Artifact | Convention | Example |
|---|---|---|
| React components | PascalCase | CandidateCard, RecruiterDashboard |
| Variables & functions | camelCase | candidateId, handleSubmit, fetchPositions |
| Constants | UPPER_SNAKE_CASE | MAX_CANDIDATES_PER_PAGE, API_BASE_URL |
| Types & interfaces | PascalCase | CandidateData, PositionProps, ICandidateService |
| Component files | PascalCase | CandidateCard.tsx, PositionDetails.tsx |
| Utility files | camelCase | candidateService.js, apiUtils.ts |
| CSS classes | kebab-case | candidate-card, position-details |
| Custom hooks | camelCase, use prefix | useCandidate, useFormValidation |
Component Conventions
New components should be written in TypeScript. Existing JavaScript components are kept until a planned migration pass.Component Props
Define TypeScript interfaces for all props, use destructuring, and include default values where appropriate:State Management
Local State with Hooks
UseuseState for component-level state and useEffect for side effects and data fetching. Extract custom hooks for logic that needs to be shared across components.
Loading and Error States
Service Layer Architecture
Centralize all API calls in service files. Use axios, export service objects with grouped methods, and handle errors at the service level when appropriate.UI/UX Standards
Bootstrap Integration
Use React Bootstrap components rather than plain Bootstrap HTML. Import Bootstrap CSS in the main App component and follow the responsive grid system.Form Handling
Navigation Patterns
Use React Router for all navigation. Implement breadcrumbs and back-navigation links. Use theuseNavigate hook for programmatic navigation.
Accessibility
- Include
aria-labelattributes for interactive elements - Use semantic HTML elements (
<nav>,<main>,<section>, etc.) - Ensure keyboard navigation support
- Provide alternative text for all images
Testing Standards
End-to-End Testing with Cypress
Test user workflows rather than implementation details. Usedata-testid attributes for reliable element selection. Organize test files by feature (candidates.cy.ts, positions.cy.ts). Include both UI and API testing.
Test Organization
- Group related tests with
describeblocks - Use descriptive test names that explain expected behavior
- Test both success and error scenarios
- Include edge cases and input validation tests
Configuration Standards
TypeScript Configuration
Enable strict mode, configure path mapping for clean imports, and include both Cypress and Node types:Environment Configuration
Use environment variables for API URLs, maintain separate configs for development and production, and configure Cypress with environment-specific settings:Performance Best Practices
Component Optimization
- Lazy load components when appropriate
- Memoize expensive calculations with
useMemo - Avoid unnecessary re-renders with
useCallback - Extract reusable logic into custom hooks
Bundle Optimization
- Tree shaking is enabled through Create React App
- Apply code splitting at the route level
- Optimize images and static assets
- Monitor bundle size with build tools
API Efficiency
- Implement proper error handling for all network requests
- Cache API responses where appropriate
- Use loading states to improve perceived performance
- Batch API calls when possible
Development Workflow
Git Workflow
- Feature branches — use the
-frontendsuffix (e.g.,feature/candidate-filter-frontend) to enable parallel frontend/backend work and avoid merge conflicts - Descriptive commit messages in English
- Code review before merging
- Small, focused branches — one feature or fix per branch
Development Scripts
Code Quality Gates
Before deploying: ESLint passes, TypeScript compiles without errors, all tests pass.Migration Strategy
TypeScript Migration
The project is migrating gradually from JavaScript to TypeScript:- All new components must be written in TypeScript
- Existing JavaScript components are maintained until a planned refactor
- Types are added incrementally to existing code
Component Modernization
- Use functional components over class components
- Use hooks instead of lifecycle methods
- Use React Bootstrap components for consistency
- Apply responsive design principles throughout