Initial commit: JMESPath Testing Tool

- React-based web application for testing JMESPath expressions
- macOS-first containerization with Apple container command
- Bootstrap UI with real-time evaluation
- GitHub Actions CI/CD pipeline
- Docker fallback support
- Comprehensive documentation and development scripts
This commit is contained in:
2026-01-18 13:19:07 +01:00
commit c09e545637
26 changed files with 19427 additions and 0 deletions

32
.github/copilot-instructions.md vendored Normal file
View File

@@ -0,0 +1,32 @@
---
description: Instructions for using the JMESPath Testing Tool repository.
applyTo: "**/*.md,**/.js"
---
# AI Agent Instructions for JMESPath Testing Tool
The tool in this repository is designed to help users validate and test JMESPath expressions against JSON data. It is a React-based web application that provides an interactive interface for entering JMESPath queries and viewing the results.
The application is single page. The page is divided into three sections:
- Top section: Title and description of the tool.
- Middle section: Input area for JMESPath expressions
- Bottom left section: Input area for JSON data
- Bottom right section: Output are for JMESPath query results
The main components of the application are located in the `src` directory and target Node 24 LTS environment.
Framework to be used:
- React for building the user interface.
- JavaScript (ES6+) for scripting.
- Bootstrap for styling and layout.
## Containerization
The application should be prepared for deployment using containerization. It should extend minimal Node 24 LTS container image.
Do not assume the Docker is installed on the development machine.
The development machine is a MacOS system with Apple `container` command from @github/apple/container.
Build scripts should target MacOS with the above toolset as first class environment. Docker should be used only as secondary option.

98
.github/workflows/build-container.yml vendored Normal file
View File

@@ -0,0 +1,98 @@
name: Build Container
on:
push:
branches: [ main, develop ]
paths:
- 'src/**'
- 'public/**'
- 'package*.json'
- 'Dockerfile'
- 'Containerfile'
pull_request:
branches: [ main ]
paths:
- 'src/**'
- 'public/**'
- 'package*.json'
- 'Dockerfile'
- 'Containerfile'
env:
IMAGE_NAME: jmespath-playground
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js 24 LTS
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test -- --coverage --watchAll=false
- name: Build React application
run: npm run build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build container image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: false
tags: ${{ env.IMAGE_NAME }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Test container
run: |
docker run --rm -d -p 3000:3000 --name test-container ${{ env.IMAGE_NAME }}:latest
sleep 10
# Test if the container is responding
curl -f http://localhost:3000 || exit 1
docker stop test-container
- name: Upload build artifacts
uses: actions/upload-artifact@v4
if: success()
with:
name: build-output
path: build/
retention-days: 7
# Optional: Build with multi-platform support for production
build-multiplatform:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build multi-platform image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: false
tags: ${{ env.IMAGE_NAME }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max