How marcelscruz/public-apis works
Purpose and Entry Points
This is a curated public-API catalog, published primarily as a human-readable Markdown directory and machine-consumable JSON database. The catalog content is organized by category, with each API carrying name, description, authentication, CORS, and URL metadata.
• README.md — primary published catalog and contributor-facing content surface.
• API.md — API-oriented consumer documentation.
• db/resources.json — structured API-resource dataset.
• db/categories.json — structured category dataset.
Source-of-Truth Boundary
The repository is data-first rather than an application service: catalog entries are maintained in Markdown, then converted into normalized JSON artifacts. The substantial README category tables are the editorial input/presentation format; db/ is the derived data boundary for consumers.
• README.md
• db/resources.json
• db/categories.json
Database Update Pipeline
The Node.js update entry point parses catalog tables, separates category content, groups row fields, and emits refreshed JSON datasets. scripts/db/update-db.js is the orchestration boundary; utility modules isolate parsing, grouping, formatting, and file output stages.
• scripts/db/update-db.js
• utils/db/separate-tables.js
• utils/db/group-row-content.js
Normalization and Output Stages
Processing is decomposed into resource-specific and category-specific formatting before final JSON serialization and writes. This separation lets schema/presentation cleanup evolve independently from the update orchestrator.
• utils/db/format-resources.js
• utils/db/format-categories.js
• utils/db/format-json.js
• utils/db/write-to-file.js
Automation and Runtime
The project runs on Node.js/npm, as indicated by its package manifests and JavaScript scripts. GitHub Actions automates database refreshes, likely executing the update pipeline and committing or publishing resulting db/ changes; no application server, hosted database, or runtime API implementation is represented in the tree.
• package.json
• package-lock.json
• .github/workflows/update-db.yml
External-Service Model
The repository does not integrate with one operational backend. Its data describes many third-party public APIs, whose links and access characteristics are catalog metadata rather than dependencies called by this codebase. GitHub is the material infrastructure provider for collaboration and scheduled automation.
• README.md
• .github/ISSUE_TEMPLATE.md
• .github/PULL_REQUEST_TEMPLATE.md
Main entry points: update-db.js Database updater · write-to-file.js Dataset writer · README.md Published API catalog · format-json.js JSON serializer
Components 14
Catalog Content
Editorial source and published consumer surfaces.
- Published API catalog · Primary editorial input and human-readable directory.
README.md - Consumer API docs
API.md
JSON Update Pipeline
Node.js conversion stages.
- Database updater · Parses catalog tables and emits normalized datasets.
scripts/db/update-db.js - Table separator
utils/db/separate-tables.js - Row grouper
utils/db/group-row-content.js - Resource formatter
utils/db/format-resources.js - Category formatter
utils/db/format-categories.js - JSON serializer
utils/db/format-json.js - Dataset writer
utils/db/write-to-file.js - Node.js/npm runtime
package.json
Derived Data
Machine-consumable catalog artifacts.
- API resources · Normalized API metadata for machine consumers.
db/resources.json - Categories · Normalized catalog category metadata.
db/categories.json
GitHub Automation
Collaboration and scheduled refresh infrastructure.
- Database refresh workflow · Automates execution of the JSON update pipeline.
.github/workflows/update-db.yml - Contribution templates · Guides catalog collaboration through issues and pull requests.
.github/ISSUE_TEMPLATE.md
Connections 14
- Published API catalog → Consumer API docs: documents catalog access
- Published API catalog → Database updater: editorial source
- Node.js/npm runtime → Database updater: runs
- Database refresh workflow → Database updater: executes
- Table separator → Database updater: separates categories
- Row grouper → Database updater: groups table fields
- Database updater → Resource formatter: normalizes resources
- Database updater → Category formatter: normalizes categories
- Resource formatter → JSON serializer: resource payload
- Category formatter → JSON serializer: category payload
- JSON serializer → Dataset writer: serialized JSON
- Dataset writer → API resources: writes
- Dataset writer → Categories: writes
- Contribution templates → Published API catalog: supports contributions