An interactive explorer for the United Nations System, making all UN entities, their leadership, and resources easily discoverable.
This project provides a visual, searchable interface to navigate the UN System Chart. Users can explore entities by principal organ, search by name, and access comprehensive information about each organization.
- Interactive Filtering: Filter entities by UN Principal Organ (General Assembly, Security Council, etc.)
- Full-Text Search: Search across entity name and aliases
- Detailed Entity Cards: View descriptions, leadership, mandates, and organizational links
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Static Site: Deployed to GitHub Pages for fast, reliable access
- https://www.un.org/en/delegate/page/un-system-chart
- https://www.un.org/un80-initiative/en/shifting-paradigms-1
- Framework: Next.js(Static Site Generation)
- Styling: Tailwind CSS v4
- UI Components: shadcn/ui
- Database: Airtable API
- Data Processing: Python (
uvfor package management) - Deployment: GitHub Pages (static export)
├── src/
│ ├── app/ # Next.js app router pages
│ ├── components/ # React components
│ │ └── ui/ # shadcn/ui base components (don't edit directly)
│ ├── lib/
│ │ ├── constants.ts # All configuration and settings
│ │ ├── entities.ts # Entity data loading and filtering
│ │ └── utils.ts # Helper functions
│ └── types/
│ └── entity.ts # TypeScript type definitions
├── public/
│ ├── un-entities.json # Processed entity data
│ └── images/ # Logos and headshots
├── python/ # Data fetching and processing scripts
├── data/ # Raw and processed data files
└── docs/ # Project documentation
Key Files:
src/lib/constants.ts- All configuration and settingssrc/lib/entities.ts- Entity data loading and filteringsrc/lib/utils.ts- Helper functionssrc/types/entity.ts- TypeScript type definitionssrc/app/globals.css- Global styles and theme colors
- Fetch:
python/01-fetch_from_airtable.pyretrieves entity data from Airtable - Process:
python/02-process_entities_data.pycleans and enriches data - Export: Data saved to
public/un-entities.jsonfor static import - Load:
src/lib/entities.tsimports JSON at build time - Render: Components consume entity data through filtering functions
- Global Configuration: All settings centralized in
src/lib/constants.ts - Component Composition: shadcn/ui base components in
components/ui/, custom compositions insrc/components/ - Type Safety: Comprehensive TypeScript types for all entity data
- Static Generation: All pages pre-rendered for optimal performance
- Utility-First: Reusable helper functions in
src/lib/utils.ts
-
Install Dependencies
Run the following command to install all required dependencies:npm install
-
Run Development Server
Start the development server with:npm run dev
The application will be available at
http://localhost:3000. -
Build for Production
To create a production build, use:npm run build
Entity data is fetched from Airtable and processed with Python scripts.
You can run the data update process in VS Code using the built-in task:
- Press
Cmd+Shift+P(Mac) orCtrl+Shift+P(Windows/Linux) - Type "Tasks: Run Task"
- Select "Update Data"
Or run manually from the terminal:
bash update_data.shThis update_data.sh script:
- Fetches latest data from Airtable API
- Processes and enriches entity information
- Downloads headshots for entity leaders
- Exports to JSON format for static site
- Uses
uvfor fast package management - Run scripts with:
uv run python <script_name>.py - Install packages with:
uv add <package_name>
- Daily Data Fetch: Automated data updates at 00:00 UTC
- Continuous Deploy: Automatic deployment to GitHub Pages on push to main
npm run lint
npx eslint . --ext .js,.jsx,.ts,.tsx
npx tsc --noEmit# Check for outdated packages
npm outdated
# Update all dependencies to latest versions
npm update
# Update specific package
npm update <package-name>
# Update to latest major versions (use with caution)
npx npm-check-updates -u
npm installnpx shadcn --version
npx next --version
npx shadcn@latest diffnpm run formatGlobal styles and Tailwind CSS configuration are in src/app/globals.css:
- Custom color palette (UN System colors)
- CSS custom properties for runtime color access
- Animation keyframes
- Global utility styles
We welcome contributions! Please see our Contributing Guide for detailed information on how to get started.
To suggest updates or additions to entity data, use the contribution form or the edit button available on each entity's page. Submissions will be submitted to our Airtable database for peer-review.
- Tailwind CSS: Always use Tailwind v4 syntax (consult https://tailwindcss.com/docs/)
- Colors: Use colors from
src/app/globals.cssintegrated into Tailwind CSS theme - Components: Keep shadcn/ui files in
components/ui/unchanged; compose on top insrc/components/ - Configuration: Add all settings to
src/lib/constants.tsfor easy maintenance - Utilities: Place helper functions in
src/lib/utils.tsfor reuse - Static-First: Remember this deploys as a static site on GitHub Pages
See the Wiki here.