This is a modern, responsive user-friendly Skip Hire service web application built with React, TypeScript, and a combination of Material-UI and Ant Design components for booking skip hire services. The application provides a streamlined, multi-step booking process with a focus on user experience, accessibility, and clean design.
This documentation provides an overview of the project's architecture, implementation approach, and design decisions. The codebase demonstrates a focus on maintainability, scalability, and user experience through careful component organization and modern development practices.
- Frontend Framework: React with TypeScript
- UI Libraries:
- Material-UI (MUI)
- Ant Design (antd)
- Styled-components
- Build Tool: Vite
- Package Manager: pnpm
- Type Checking: TypeScript
- Code Quality/Stactic Code Analysis: ESLint
The application follows a modular component architecture:
src/
components/
search-bar.tsx # Address search component
address-form.tsx # Address details form
wast-type-selector.tsx # Waste type selection
progress-tracker.tsx # Step progress indicator
styled/
index.ts # Shared styled components
skeleton.tsx # Shared skeleton loading effect component
modals/
heavy-waste-modal.tsx # Heavy Waste modal compoent
heavy-waste-percentage-modal.tsx # Heavy Waste Percentage modal compoent
no-heavy-waste-modal.tsx # No Heavy Waste modal compoent
payment-modal.tsx # Payment modal compoent
plasterboard-percentage-modal.tsx # Plasterboard Percentage modal compoent
private-road-modal.tsx # Private Property modal compoent
public-road-modal.tsx # Public Road modal compoent
mock/
address-data.ts # Mock address data
waste-types.ts # Mock waste type data
1a. Component Tree
graph TD;
App-->Search-Component;
App-->Address-Confirmation-Component;
App-->Waste-Type-Selector-Component;
App-->Select-Skip-Component;
App-->Permit-Check-Component;
App-->Schedule-Component;
App-->Payment-Component;
The application implements a multi-step booking process:
- Address Search
- Address Form
- Waste Type Selection
- Skip Size Selection
- Permit Check
- Date Selection
- Payment
-
Uses React's useState for local state management
-
Maintains form state between steps
-
Implements step navigation with state preservation
-
- Enhanced visibility
- Reduced eye strain
- Modern aesthetic
-
- Backdrop filters
- Subtle transparencies
- Modern visual appeal
-
- Step-by-step form progression
- Clear visual feedback
- Reduced cognitive load
-
- Mobile-first approach
- Flexible layouts
- Adaptive components
- Autocomplete functionality
- Real-time filtering
- Clear visual feedback
- Location-based results
- Memoized search results for performance
const filteredOptions = useMemo(() => {
if (!searchText) return [];
return addressSuggestions.filter(...)
}, [searchText]);-
- Modular component structure
- Clear separation of concerns
- Type safety with TypeScript
- Consistent styling patterns
-
- Memoized computations
- Optimized rendering
- Lazy loading potential
-
- Easy to add new steps
- Modular component architecture
- Reusable styled components
- Consistent pattern usage
-
- Smooth animations
- Responsive design
- Clear visual feedback
- Intuitive progress tracking