Skip to content

Update download script to use HTTP endpoint#116

Merged
bryanchriswhite merged 1 commit intomainfrom
claude/update-download-endpoint-bdF3T
Dec 26, 2025
Merged

Update download script to use HTTP endpoint#116
bryanchriswhite merged 1 commit intomainfrom
claude/update-download-endpoint-bdF3T

Conversation

@bryanchriswhite
Copy link
Contributor

Description

Update the postinstall script to use the https://db.lenr.academy HTTP endpoint for database downloads instead of S3, eliminating the need for AWS CLI or credentials.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Performance improvement
  • Code refactoring (no functional changes)
  • Documentation update
  • Dependency update
  • Other (please describe): Developer experience improvement

Related Issues

N/A

Motivation and Context

The previous postinstall script required AWS CLI for optimal performance and fell back to an incorrect S3 URL (https://db.lenr.academy.s3.amazonaws.com). Since db.lenr.academy is already configured for static website hosting with public access, we can simplify the script to always use the HTTP endpoint, improving developer experience for new contributors who don't have AWS credentials configured.

Changes Made

  • Removed checkAwsCli() function and S3 download code path
  • Added DB_BASE_URL constant pointing to https://db.lenr.academy
  • Simplified download logic to always use curl with the HTTP endpoint
  • Added --progress-bar flag to curl for better visual feedback
  • Updated file header comment to reflect the new approach

Testing

Test Environment

  • Browser(s): N/A (build script)
  • OS: Linux
  • Device: Desktop

Test Cases

  • Manual testing completed
  • Tested on multiple browsers
  • Tested on mobile devices
  • Tested with slow/metered connections (if relevant)
  • Tested database loading and caching (if relevant)

Test Results

  • Script uses correct HTTP endpoint https://db.lenr.academy/latest/parkhomov.db
  • Progress bar displays during download
  • No AWS CLI dependency required

Database Impact

  • No database changes
  • New queries added
  • Query optimization/changes
  • Database schema understanding updated
  • Requires new database version or migration

Performance Impact

  • No performance impact expected
  • Performance improvement (describe below)
  • Potential performance regression (describe mitigation below)

Performance notes: HTTP downloads via CloudFront CDN perform comparably to S3 direct access.

UI/UX Changes

N/A - build script only

Screenshots

N/A

Responsive Design

  • Tested on desktop (1920x1080+)
  • Tested on tablet (768px-1024px)
  • Tested on mobile (320px-767px)
  • Dark mode tested
  • Light mode tested

Documentation

  • Code is self-documenting with clear variable/function names
  • Added/updated code comments for complex logic
  • Updated CLAUDE.md (if architecture/patterns changed)
  • Updated README.md (if user-facing changes)
  • Added JSDoc comments for new functions/components

Code Quality

  • Code follows the existing style and patterns
  • TypeScript types are properly defined (no any unless necessary)
  • No console.log or debugging code left in
  • Removed unused imports and variables
  • npm run lint passes without errors
  • npm run build completes successfully

Deployment Checklist

  • Tested in production build (npm run build && npm run preview)
  • No hardcoded development URLs or API keys
  • Asset paths are correct for CloudFront/S3 deployment
  • Analytics/privacy features work correctly

Breaking Changes

Does this PR introduce breaking changes? No

Rollback Plan

  • Simple git revert
  • Requires database rollback (describe):
  • Requires cache clearing (localStorage/IndexedDB)

Additional Notes

This change aligns the postinstall script behavior with scripts/download-db.sh, which already uses the HTTP endpoint correctly.


Reviewer Checklist

  • Code changes align with LENR Academy's mission and architecture
  • Changes are well-tested and reproducible
  • No obvious performance regressions
  • UI changes are consistent with existing design
  • Documentation is adequate
  • No security concerns (XSS, data leaks, etc.)
  • AGPL-3.0 license compliance maintained

Simplify postinstall script by always using the https://db.lenr.academy
endpoint which requires no credentials. This improves developer experience
as contributors don't need AWS CLI or credentials to get started.

- Remove checkAwsCli() function and S3 download path
- Use DB_BASE_URL constant for clarity
- Add --progress-bar to curl for better feedback
@bryanchriswhite bryanchriswhite marked this pull request as ready for review December 26, 2025 03:00
@bryanchriswhite bryanchriswhite self-assigned this Dec 26, 2025
@bryanchriswhite bryanchriswhite added bug Something isn't working correctly area: deployment Build, deployment, or CI/CD labels Dec 26, 2025
@bryanchriswhite bryanchriswhite moved this from Backlog to In progress in Community Projects Dec 26, 2025
@bryanchriswhite bryanchriswhite moved this from In progress to Done in Community Projects Dec 26, 2025
@bryanchriswhite bryanchriswhite moved this from Done to In review in Community Projects Dec 26, 2025
@bryanchriswhite bryanchriswhite moved this from Backlog to In Progress in LENR Academy Development Dec 26, 2025
@bryanchriswhite bryanchriswhite merged commit 5b6ee20 into main Dec 26, 2025
3 checks passed
@bryanchriswhite bryanchriswhite deleted the claude/update-download-endpoint-bdF3T branch December 26, 2025 03:13
@github-project-automation github-project-automation bot moved this from In Progress to Done in LENR Academy Development Dec 26, 2025
@github-project-automation github-project-automation bot moved this from In review to Done in Community Projects Dec 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: deployment Build, deployment, or CI/CD bug Something isn't working correctly

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants