A GOV.UK compliant digital service for reporting employee expenses and benefits (P11D forms) to HMRC.
- ✅ GOV.UK Design System - Uses official components and patterns
- ✅ WCAG 2.2 AA Compliant - Fully accessible to all users
- ✅ Progressive Enhancement - Works without JavaScript
- ✅ Responsive Design - Mobile-first approach
- ✅ Security Focused - CSRF protection, CSP headers, session management
- ✅ Performance Optimized - Fast loading, efficient codebase
# Install dependencies
npm install
# Build CSS assets
npm run build:css
# Start development server
npm run dev
# Visit http://localhost:3000├── app/
│ ├── routes/ # Express routes and validation
│ ├── views/ # Nunjucks templates
│ │ ├── benefits/ # Benefit-specific form pages
│ │ └── _layout.html # Base template
│ └── assets/sass/ # SCSS source files
├── public/ # Static assets (CSS, JS)
├── tests/ # Test files
└── docs/ # Documentation
- Start page - Service overview and requirements
- Employee details - Capture employee and employer information
- Benefit selection - Choose which benefits were provided
- Benefit details - Enter specific details for each benefit type
- Check answers - Review all information
- Confirmation - Success page with reference number
- Node.js & Express - Server framework
- Nunjucks - Templating engine
- GOV.UK Frontend - Design system components
- Express Validator - Form validation
- Helmet - Security headers
- SASS - CSS preprocessing
This service meets WCAG 2.2 AA standards:
- Screen reader compatible
- Keyboard navigation throughout
- High contrast mode support
- Descriptive error messages
- Semantic HTML structure
- Progressive enhancement
See ACCESSIBILITY_CHECKLIST.md for detailed testing requirements.
- Content Security Policy headers
- CSRF protection ready (commented for demo)
- Secure session management
- Input validation and sanitization
- Timeout warnings
- No sensitive data logging
npm testnpm run build:css # Compile SCSS to CSS
npm run dev # Watch mode for development- Follow GOV.UK Service Manual guidelines
- Use semantic HTML5
- Progressive enhancement approach
- Accessibility-first development
See DEPLOYMENT_GUIDE.md for production deployment instructions.
Key requirements:
- Node.js 18+
- HTTPS/SSL certificate
- Session storage (Redis recommended)
- Environment variables configured
For production use, integrate with HMRC APIs:
// Example HMRC API call
const submitP11D = async (formData) => {
const response = await fetch(`${process.env.HMRC_API_ENDPOINT}/p11d`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(formData)
})
return response.json()
}Supports all browsers listed in GOV.UK Service Manual:
- Chrome (latest 2 versions)
- Firefox (latest 2 versions)
- Safari (latest 2 versions)
- Edge (latest 2 versions)
- Internet Explorer 11 (where required)
- Follow GOV.UK Design System patterns
- Ensure WCAG 2.2 AA compliance
- Test with assistive technologies
- Write semantic, accessible HTML
- Include proper error handling
MIT License - see LICENSE file for details.
For technical support or questions about implementation:
- Check the GOV.UK Design System
- Review HMRC Developer Hub
- Consult accessibility guidance at WebAIM
Built with ❤️ following GOV.UK Service Standards