Skip to content

Add database ingestion system for custom hymnbook bundles#1

Draft
Copilot wants to merge 6 commits intodevelopfrom
copilot/add-hymnbook-database-ingestion
Draft

Add database ingestion system for custom hymnbook bundles#1
Copilot wants to merge 6 commits intodevelopfrom
copilot/add-hymnbook-database-ingestion

Conversation

Copy link
Copy Markdown

Copilot AI commented Nov 16, 2025

Users needed a way to import their own hymnbook databases without server infrastructure changes.

Changes

Documentation

  • DATABASE_INGESTION.md - Complete JSON schema specification for song bundles with field types, validation requirements, and ABC notation guide
  • QUICK_START_INGESTION.md - Fast-track guide with key field reference and common issues
  • examples/README.md - Tool usage and customization instructions

Core Import Utility

source/logic/songs/customImporter.ts

  • importFromJson() / importFromObject() - Parse and validate bundle data
  • bundleExists() - Duplicate detection
  • Validates: UUID v4 format, required fields, verse index sequencing
  • Integrates with existing SongUpdaterUtils.saveServerSongBundleToDatabase()

Tools

  • create-custom-bundle.{js,py} - Generate properly formatted JSON with sample data
  • validate-bundle.js - Pre-import validation (15+ checks: UUIDs, timestamps, ABC notation, metadata types)

Usage

import { CustomImporter } from './source/logic/songs/customImporter';
import bundle from './assets/custom_hymns.json';

// Validates and imports bundle
await CustomImporter.importFromObject(bundle);

// Check before importing
if (!CustomImporter.bundleExists(bundle.uuid)) {
  await CustomImporter.importFromObject(bundle);
}

Generate and validate bundles:

node examples/create-custom-bundle.js
node examples/validate-bundle.js custom_hymnbook_bundle.json

Bundle Format

{
  "id": 1,
  "abbreviation": "MYHB",
  "name": "My Hymnbook",
  "uuid": "uuid-v4-here",
  "hash": "md5-hash",
  "songs": [{
    "id": 1,
    "name": "Hymn Title",
    "verses": [{
      "id": 1,
      "name": "Verse 1",
      "content": "Line 1\nLine 2",
      "index": 0,
      "uuid": "uuid-v4-here"
    }],
    "abcMelodies": [],  // Optional ABC notation
    "metadata": []       // Optional: Author, Year, Copyright, etc.
  }]
}

Security: CodeQL scan passed (0 alerts)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • static.realm.io
    • Triggering command: /usr/local/bin/node /home/REDACTED/work/hymnbook/hymnbook/node_modules/prebuild-install/bin.js --runtime napi (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

I want to be able to ingest my own hymnbook database into this app, how do i do it.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 5 commits November 16, 2025 07:46
Co-authored-by: Anesu <13661011+Anesu@users.noreply.github.com>
Co-authored-by: Anesu <13661011+Anesu@users.noreply.github.com>
…e index checking

Co-authored-by: Anesu <13661011+Anesu@users.noreply.github.com>
Co-authored-by: Anesu <13661011+Anesu@users.noreply.github.com>
Co-authored-by: Anesu <13661011+Anesu@users.noreply.github.com>
Copilot AI changed the title [WIP] Add ability to ingest hymnbook database Add database ingestion system for custom hymnbook bundles Nov 16, 2025
Copilot AI requested a review from Anesu November 16, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants