Skip to content

Static API generated from yaml files #129

Description

@kmturley

Summary

Propose migrating the umu-database from a dynamic PHP/MySQL architecture to a static API generated from yaml files. This would provide better maintainability, eliminate hosting costs, and improve performance while reducing security risks.

Example project: https://github.com/kmturley/static-api-generator

Motivation

The current umu-database relies on a PHP server with MySQL backend, which introduces several challenges:

  • Hosting and maintenance costs
  • Security vulnerabilities and potential DDoS attacks
  • Git conflicts when multiple contributors edit the same CSV file
  • Complex deployment and infrastructure management

Proposed Solution

Adopt a static API architecture for umu-database, which would:

  • Generate static JSON files from curated YAML files
  • Host the API on GitHub Pages (free)
  • Use separate files per game/store entry to prevent git conflicts
  • Enable faster, more secure data access

Benefits

Separate Files Instead of Single File

  • Each game/store mapping would be in its own YAML file
  • Eliminates git conflicts from overlapping pull requests
  • Allows parallel contributions without merge conflicts
  • Easier to review individual changes

Static API: Free and Faster

  • Host on GitHub Pages at no cost
  • Static files load faster than dynamic database queries
  • No server-side processing delays
  • Better caching and CDN performance

No Security or DDoS Attack Vector

  • No server-side code to exploit
  • No database to attack or overload
  • Static files are inherently secure
  • Eliminates PHP/MySQL vulnerabilities

Filtering and Data Combination

  • Pre-generate filtered views as additional static files
  • Create combined datasets for common queries
  • Support multiple API endpoints through file structure
  • Enable offline usage and better performance

Implementation Plan

  1. Fork/adapt the static-api-generator template
  2. Convert existing CSV data to YAML format (one file per game)
  3. Implement data validation and schema
  4. Set up GitHub Actions for automated builds and deployment
  5. Update documentation and client integrations
  6. Migrate existing API consumers to new endpoints

Risks and Mitigations

  • Data freshness: Mitigated by automated build triggers on data changes
  • Complex queries: Mitigated by pre-generating common query results
  • Large dataset: Mitigated by efficient static hosting and CDN

Alternatives Considered

  • Keep current PHP/MySQL architecture
  • Use other static site generators
  • Switch to different database solutions

Additional Context

This migration would align with modern static-first development practices and significantly reduce operational overhead while improving contributor experience and API performance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions