This is a generic project which allow to create a catalogue for your GitHub organization using the GitHub API.
Example:
- https://www.azerothcore.org/catalogue.html (the default version of the catalogue)
- https://unict-dmi.github.io/git-catalogue/#/home (fork by another open-source community)
- Dual Data Source Mode: Switch between real-time GitHub API calls and pre-generated static files
- Local Configuration: Easy setup without modifying tracked files
- Automatic Caching: Local storage caching to reduce API calls
- GitHub Actions Integration: Automated repository data generation and deployment
- Configurable Topics: Support for multiple organizations and topic filtering
- Performance Optimized: Reduce API rate limits with pre-generated data
- Clone the repository
- Configure for your organization:
cp src/assets/config.default.json src/assets/config.json
- Edit
src/assets/config.json
with your organization settings:{ "preGeneratedFileUrl": "https://your-org.github.io/data/catalogue.json", "tabs": { "All Modules": { "topic": "your-project-module", "org": "your-org", "path": "/module" } } }
- Install and run:
npm install NODE_OPTIONS="--openssl-legacy-provider" npm run start
📝 Note: The
config.json
file is git-ignored, so your local configuration won't conflict with upstream updates.
This project is written with the Angular framework, to run it locally you can run:
npm install
NODE_OPTIONS="--openssl-legacy-provider" npm run start
It should work smootly using:
node v14.15.1
npm 6.14.8
The catalogue supports two data source modes:
- Fetches repository data directly from GitHub API
- Real-time updates but subject to API rate limits
- Configure in
src/environments/environment.ts
:
export const environment = {
production: false,
usePreGeneratedFile: false
};
- Uses periodically updated static JSON file
- Better performance and no API rate limits
- Configure in
src/environments/environment.prod.ts
:
export const environment = {
production: true,
usePreGeneratedFile: true
};
You can also configure the data source in your local configuration file (src/assets/config.json
):
{
"usePreGeneratedFile": true,
"preGeneratedFileUrl": "https://<your-org>.github.io/data/catalogue.json"
}
This project uses a configuration system that prevents conflicts with upstream updates:
src/assets/config.default.json
(tracked) - Default configurationsrc/assets/config.json
(git-ignored) - Your local configurationsrc/assets/config.example.json
(tracked) - Template for local configuration
- The app first tries to load
config.json
(your local config) - If not found, falls back to
config.default.json
- Your local
config.json
is never committed, avoiding merge conflicts
cp src/assets/config.example.json src/assets/config.json
# Edit config.json with your settings
Add the workflow .github/workflows/update-catalogue-data.yml
to automatically update repository data:
name: Update Repository Catalogue Data
on:
schedule:
- cron: '*/30 * * * *' # Every 30 minutes
workflow_dispatch:
jobs:
update-catalogue:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: <your-org>/git-catalogue/.github/actions/fetch-repositories@master
with:
organizations: '["<your-org>"]'
topics: '{"<your-org>": ["module", "tools"]}'
output-path: 'data/catalogue.json'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and push
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add data/catalogue.json
git commit -m "Update catalogue data" || exit 0
git push
- Runtime Switching: Users can toggle between data sources in the "How to" page
- Environment-based: Set
usePreGeneratedFile
in environment files - Config-based: Configure in
default.json
for runtime flexibility
Feel free to use it and create your fork, don't forget to create a PR about it.
- make it more customizable, let any developer to change some specific page content without creating any git conflict
- ✅ add github action to verify the build (added comprehensive GitHub Actions)
- upgrade to last angular version and make this project compatible with node20
- Deku (original author of the previous implementation)
- Helias (author and mantainer of the current catalogue version, contact me on Discord!)