A comprehensive documentation and vocabulary management system for the International Federation of Library Associations (IFLA). This platform serves as the authoritative source for library standards including ISBD, LRM, FRBR, UNIMARC, and other cataloguing standards.
- Multi-Site Documentation: Individual Docusaurus sites for each IFLA standard
- Vocabulary Management: RDF vocabulary generation, validation, and distribution
- Admin Portal: Next.js admin interface with GitHub OAuth authentication
- Cross-Site Navigation: Environment-aware linking between standards
- Automated Testing: Comprehensive build regression and E2E testing
- Role-Based Access: Custom RBAC system with Clerk authentication
- Multi-Environment Support: Local, preview, development, and production deployments
- Build System: Nx monorepo with pnpm workspace
- Frontend: Docusaurus (documentation) + Next.js (admin portal)
- Language: TypeScript with strict configuration
- Testing: Vitest (unit) + Playwright (E2E)
- Authentication: Clerk with GitHub OAuth
- Authorization: Custom RBAC via Clerk publicMetadata
- Data: Google Sheets API + Supabase + File system
standards-dev/
βββ apps/
β βββ admin/ # Next.js admin portal
βββ portal/ # Main documentation portal
β βββ docs/ # developer docs
β βββ developer/ # developer docs
β βββ system-design-docs/ # system design docs
β βββ api/ # OpenAPI specs
β β ββ platform.yaml
β β ββ auth.yaml
β ββ generated/ # (auto-generated MD from specs; the plugin fills this)
βββ standards/ # Individual standard sites
β βββ ISBDM/ # ISBD Manifestation
β βββ LRM/ # Library Reference Model
β βββ FRBR/ # Functional Requirements
β βββ isbd/ # International Standard Bibliographic Description
β βββ muldicat/ # Multilingual Dictionary of Cataloguing Terms
β βββ unimarc/ # UNIMARC formats
βββ packages/
β βββ theme/ # Shared Docusaurus theme
β βββ ui/ # Shared UI components
β βββ standards-cli/ # CLI tools
βββ scripts/ # Build and utility scripts
βββ e2e/ # End-to-end tests
βββ docs/ # Project documentation
βββ developer_notes/ # Development guides and notes
βββ system-design-docs/ # π Authoritative system architecture docs (00-32)
- Node.js >= 18.0
- pnpm >= 10.12.4
- Git
# Clone the repository
git clone https://github.com/iflastandards/platform.git
cd platform
# Install dependencies
pnpm install
# Start Nx daemon for faster builds
pnpm nx:daemon:start
# Run health check
pnpm health# Start all development servers using dev-servers helper
pnpm dev:servers
# Start specific sites only
pnpm dev:servers --sites=portal,admin
# Start in interactive mode with Chrome browser
pnpm dev:interactive
# Start in headless mode (no browser windows)
pnpm dev:headless
# Start specific site (individual approach)
pnpm nx start portal # Main portal
pnpm nx start isbd # ISBD standard
pnpm nx start admin # Admin portal
# Start with port cleanup
pnpm nx run portal:start:robust# Build all sites
pnpm build:all
# Build specific site
pnpm nx build portal
pnpm nx build isbd
pnpm nx build admin
# Test builds
pnpm test:builds:affected| Site | URL (Production) | URL (Preview) | Port |
|---|---|---|---|
| Portal | iflastandards.info | Preview | 3000 |
| ISBDM | isbdm.iflastandards.info | Preview | 3001 |
| LRM | lrm.iflastandards.info | Preview | 3002 |
| FRBR | frbr.iflastandards.info | Preview | 3003 |
| ISBD | isbd.iflastandards.info | Preview | 3004 |
| MulDiCat | muldicat.iflastandards.info | Preview | 3005 |
| UNIMARC | unimarc.iflastandards.info | Preview | 3006 |
| Admin | admin.iflastandards.info | Preview | 3007 |
# Run affected tests (recommended for development)
pnpm test
# Run comprehensive tests (for releases)
pnpm test:comprehensive
# Run E2E tests
pnpm test:e2e
# Run visual regression tests
pnpm test:visual
# Type checking
pnpm typecheck
# Linting
pnpm lint- Unit Tests: Vitest with co-located test files
- Integration Tests: Playwright in
e2e/directory - Build Regression: Automated site build validation
- Visual Regression: Screenshot comparison testing
- Performance: Nx caching and parallel execution
- AI Testing Guide: See
developer_notes/test-first-implementation-guide.mdfor comprehensive AI assistant testing patterns
- Create feature branch from
preview - Write tests first (TDD approach)
- Implement feature with TypeScript
- Run affected tests:
pnpm test - Validate builds:
pnpm test:builds:affected - Create PR to
previewbranch
# Scaffold new site
pnpm tsx scripts/scaffold-site.ts --siteKey=newsite --title="New Standard" --tagline="A new IFLA standard"
# Generate complete site structure with all necessary files
pnpm tsx scripts/page-template-generator.ts --namespace=newsite
# Or use the vocabulary site generator
npx tsx scripts/generate-vocabulary-sites.ts --sites new-namespace
# Validate file structure
pnpm tsx scripts/validate-sidebar-references.ts standards/newsiteThe enhanced vocabulary site scaffolding system ensures that all files referenced in the navigation sidebar exist, preventing "document ids do not exist" build errors. See Vocabulary Site Scaffolding Guide for details.
# Optimize Nx configuration
pnpm nx:optimize
# Clear cache for fresh builds
pnpm nx:cache:clear
# View dependency graph
pnpm nx:graph
# Kill development ports
pnpm ports:killThe platform uses TypeScript configuration instead of .env files:
- DOCS_ENV: Environment setting (local|preview|development|production)
- NODE_ENV: Node environment (development|production)
Configuration is centralized in packages/theme/src/config/siteConfig.ts.
- Configure Clerk in the admin portal
- Set up GitHub OAuth application
- Configure user roles in Clerk publicMetadata
- Add test users for development (see testing documentation)
- Complete Architecture: See
system-design-docs/for comprehensive system design - Numbered Sequence: Documents are numbered 00-32 for reading order
- Key Documents:
00-executive-summary.md- High-level overview01-system-architecture-overview.md- Core architecture10-implementation-strategy.md- Implementation roadmap31-spreadsheet-export-import-comprehensive-guide.md- Import/export workflows32-phase1-import-export-implementation-plan.md- Phase 1 integration approach
- Developer Notes: Comprehensive guides in
developer_notes/ - API Documentation: Generated from TypeScript interfaces
- Architecture Decisions: Documented in
docs/ - Testing Strategy: See
docs/testing-strategy.md - Deployment Guide: See
docs/deployment.md - Vocabulary Site Scaffolding: See
docs/vocabulary-site-scaffolding-guide.md - Quick Reference: See
docs/vocabulary-site-scaffolding-quick-reference.md - Current Scaffolding Plan: See
developer_notes/current-scaffolding-plan.md
- Development: Feature branches
- Preview:
previewbranch β GitHub Pages atiflastandards.github.io/platform/ - Production:
mainbranch β GitHub Pages atwww.iflastandards.info
- Preview: https://iflastandards.github.io/platform/
- Production: https://www.iflastandards.info/
- Admin Preview: https://admin-iflastandards-preview.onrender.com
For detailed contributing guidelines, please refer to our CONTRIBUTING.md document.
- Build Performance: Nx Cloud dashboard
- Site Performance: Lighthouse CI reports
- Error Tracking: Integrated error monitoring
- Usage Analytics: Privacy-compliant analytics
# Slow builds
pnpm nx:optimize
pnpm nx:daemon:start
# Cache issues
pnpm nx:cache:clear
# Dependency conflicts
pnpm fresh
# Port conflicts
pnpm ports:kill
# System health check
pnpm health- Check
developer_notes/for detailed guides - Review test output for specific errors
- Use
pnpm healthto diagnose system issues - Check GitHub Issues for known problems
This project is licensed under the MIT License - see the LICENSE file for details.
- International Federation of Library Associations (IFLA)
- IFLA Standards Committee
- Library community contributors
- Open source maintainers
Maintained by: IFLA Standards Team
Documentation: docs.iflastandards.info
Support: GitHub Issues# Test commit