Open Referral UK (ORUK) is a comprehensive web platform and ecosystem for the Open Referral UK data standard - an open standard that provides a consistent way to publish, find, and use community services data. This makes it easier for people to find what they need and supports connected local services across the UK.
This platform serves multiple audiences:
- Local Authorities: Resources, templates, and guides to support adoption of the ORUK standard, including business case templates, project initiation documents, and benefits calculators
- Developers: Technical documentation, API specifications, validation tools, and developer resources for implementing ORUK-compliant systems
- Service Providers: Information about publishing service data in ORUK format and joining the verified feed directory
- Community Members: Access to case studies, forums, and collaborative tools for sharing knowledge and best practices
Key Features:
- API Documentation: Complete OpenAPI specifications for ORUK data standard versions (1.0, 3.0)
- Validator Tool: Real-time validation of ORUK API feeds for compliance checking with detailed error reporting
- Dashboard: Live monitoring of verified feed availability and health status with service tables
- Data Model Explorer: Interactive documentation of the ORUK schema with JSON visualization
- Content Management: Markdown-based content system with YAML frontmatter support and dynamic routing
- Case Studies: Real-world implementation examples from councils and organizations across the UK
- Service Registration: Integrated GitHub issue creation workflow for new service feed registration
- Accessibility: Built-in accessibility features with Axe-core testing integration
- Analytics: Vercel Analytics for performance monitoring and usage insights
- Cookie Management: Compliant cookie consent and management system
This is a modern Next.js 16 application built with:
- Framework: Next.js 16.1.6 with App Router and Server Components
- Runtime: React 19.2.4 with enhanced server-side rendering
- Language: TypeScript 5.9 with strict type checking and enhanced compiler options
- Styling: CSS Modules for component-scoped styles
- Database: MongoDB 7.0 for service feed tracking and dashboard data
- Schema Validation: Zod 4.3.6 for runtime type safety and data validation
- Testing: Jest 30 for unit tests, Playwright 1.58 for end-to-end testing with accessibility checks
- Deployment: Vercel with continuous deployment and analytics
- Code Quality: ESLint 9, Prettier 3.8, Husky for Git hooks, and lint-staged for pre-commit checks
- Integrations: GitHub API via Octokit for issue tracking and workflow automation
π Full Technical Documentation: For comprehensive architecture details, development guides, and implementation documentation, visit the project wiki.
- Server Components: Leverages Next.js 16 server components with experimental HMR cache disabled for optimal development
- Dynamic Routing: File-based routing with dynamic segments for content pages and automatic redirects
- Markdown Processing: Custom markdown rendering with
gray-matterfor YAML frontmatter andmarked17.0 for parsing - Component Library: Extensive library of 50+ reusable React components including:
- Documentation components (APIModel, OpenAPIModel, VersionedDocumentation)
- Data visualization (Dashboard, DashboardTable, ServicesTable, PaginatedTable, SortedAndPaginatedTable)
- Form components (ValidatorForm, ValidatorResult, Register)
- Navigation (Header, Menu, Crumbtrail, InPageMenu)
- UI elements (Button, Badge, Banner, Icon, Spinner)
- Content display (ContentHTML, GenericPage, NamedMarkdownPage, PageList)
- Image Optimization: Next.js image optimization with AVIF and WebP support
- Responsive Design: Mobile-first design with device-specific image sizes
- MongoDB Integration: Service repository pattern for data access with Zod 4.3 schema validation and type safety
- API Proxy: Server-side proxy for external API validation and dashboard data fetching
- Server Actions: Next.js server actions for form handling, data mutations, and service validation
- Content Loading: Dynamic content loading from filesystem with versioning support and JSON metadata
- GitHub Integration: Octokit-based integration for automated issue creation and repository management
- Caching: HTTP headers configuration for static asset caching and specification files
- Environment Configuration: Feature flags for cookies, navigation, and warranty notices
- Validator: POST endpoint integration with external validation service for ORUK API compliance
- Dashboard: Real-time monitoring of registered service feeds with status tracking, health checks, and service tables
- API Explorer: Interactive API documentation with request/response examples and JSON viewer
- Schema Browser: Navigable data model documentation with relationship visualization
- Type Safety: Strict TypeScript configuration with noUncheckedIndexedAccess and noImplicitReturns
- Hot Reload: Fast refresh in development with Next.js HMR
- Testing Infrastructure: Comprehensive test setup with Jest and Playwright including accessibility testing
src/
βββ app/ # Next.js app router pages
βββ components/ # Reusable React components
βββ lib/ # MongoDB client and utilities
βββ models/ # Zod schemas for data validation
βββ repositories/ # Data access layer
βββ specifications/ # OpenAPI specs for different versions
βββ utilities/ # Helper functions and utilities
βββ e2e/ # Playwright end-to-end tests
content/ # Markdown content files
βββ about/ # About pages
βββ adopt/ # Council adoption resources
βββ case-studies/ # Implementation case studies
βββ community/ # Community information
βββ developers/ # Technical documentation
βββ info/ # Site information pages
Open Referral UK is built on the foundation of the international Open Referral initiative and the Human Services Data Specification (HSDS).
- Community Forum: Join discussions, ask questions, and share insights at forum.openreferraluk.org
- International Forum: Participate in global Open Referral discussions at forum.openreferral.org
- GitHub Issues: Report bugs, request features, and discuss technical matters on our GitHub issue tracker
- Code Repository: Contribute to the codebase via our public repositories:
This project builds upon the excellent work of the international Open Referral community and the Human Services Data Specification (HSDS). We acknowledge and thank all contributors to the global Open Referral initiative.
Our preferred form of attribution is: "Human Services Data Specification UK: an Open Referral UK resource (https://openreferraluk.org/)"
The standard originates with and the Open Referral UK project is built upon the international Human Services Data Specification: an Open Referral resource (https://openreferral.org/)
This project uses dual licensing:
The Human Services Data Specification UK (HSDS-UK) and associated documentation are licensed under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.
- Full license text: https://creativecommons.org/licenses/by-sa/4.0/
- See LICENSE file for complete terms
Unless otherwise stated, contributions are copyright of the Open Referral UK project.
The application source code in this repository is available under the BSD 3-Clause License terms. This allows you to:
- Use the code commercially
- Modify and distribute
- Use privately
- Include in proprietary software (with attribution)
See the repository license file for full BSD 3-Clause terms.
- Node.js 20+ (LTS recommended)
- Yarn package manager
- MongoDB 7.0+ (local or remote instance)
- Git
-
Clone the repository
git clone https://github.com/tpximpact/oruk-standard-and-website.git cd oruk-standard-and-website -
Install dependencies
yarn install
-
Set up environment variables
cp .env.example .env.local
Edit
.env.localwith your configuration (see Environment Variables section below) -
Start MongoDB (if running locally)
mongod --dbpath /path/to/your/data/directory
-
Run development server
yarn dev
-
Open your browser Navigate to http://localhost:3000
The project uses Husky and lint-staged for pre-commit hooks to ensure code quality. On commit:
- ESLint checks and fixes code issues
- Prettier formats code
- TypeScript type checking runs
- Tests run (if configured)
To manually validate before committing:
yarn validateyarn dev- Start development server with Node.js webstorage disabledyarn dev:ci- Start development server for CI environmentsyarn build- Build for productionyarn start- Start production serveryarn test- Run Jest unit testsyarn test:watch- Run tests in watch modeyarn test:ci- Run tests in CI modeyarn test:coverage- Run tests with coverage reportsyarn e2e- Run Playwright end-to-end testsyarn lint- Lint and fix code with ESLintyarn lint:check- Check code without fixingyarn type-check- Run TypeScript type checking without emitting filesyarn validate- Run all checks (lint, type-check, and tests)yarn tidy- Format code with Prettieryarn upd- Update content frontmatter metadatayarn prepare- Set up Husky Git hooks
Copy .env.example to .env.local and configure the following:
Database Configuration:
MONGODB_URI- MongoDB connection string (default: mongodb://localhost:27017)MONGODB_DB- MongoDB database name (default: oruk_dev)
External Service Endpoints:
OPENAPI_VALIDATOR_ENDPOINT- OpenAPI validator service endpoint
GitHub Integration (for service registration):
GITHUB_CLIENT_ID- GitHub App client IDGITHUB_APP_PRIVATE_KEY- GitHub App private key (PEM format)GITHUB_INSTALLATION_ID- GitHub App installation IDGITHUB_REPO_OWNER- Repository owner/organizationGITHUB_REPO_NAME- Repository name for issue creationGITHUB_ISSUE_ASSIGNEES- Comma-separated list of issue assignees
Feature Flags:
USE_COOKIES- Enable cookie consent banner (default: true)USE_NAV- Enable navigation components (default: true)USE_NOWARRANTY- Display no warranty notice (default: true)
Application Configuration:
NEXTAUTH_URL- Application base URL (default: http://localhost:3000)NODE_ENV- Environment mode (development/production/test)LOG_LEVEL- Logging level (info/debug/error)
For comprehensive technical documentation, including detailed architecture, testing guides, content management, and development workflows, visit:
π Project Wiki
Key documentation sections:
- Architecture - Technical architecture and system design
- Managing Content - Content authoring and management
- Testing - Testing strategies and guidelines
- GitHub Integration - Service verification workflow