A web-based JSON Schema Validator with a Node.js/Express backend that supports both local deployment and AWS Lambda. Validate JSON data against JSON Schema definitions, save validations, and share them via unique URLs.
Goal: This project serves as a debug tool for verifying JSON schema mismatches. By storing validation results via the API, developers can easily share and troubleshoot schema validation issues with their team.
This app was vibe-coded using Claude Code.
Try it out at: https://json-validator.codemine.be
- Real-time JSON validation against JSON Schema
- Save and share validations via unique URLs
- 1-day TTL for saved validations (production)
- API documentation with Swagger UI (available at
/api-docs
)
This tool can be used programmatically to store debug information from your application. Use the POST /api/save
endpoint to save JSON schema validation failures directly from your code, then share the generated URL with your team for troubleshooting.
Example:
const response = await fetch('<host>/api/save', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
schema: { type: 'object', properties: { name: { type: 'string' } } },
json: { name: 123 }
})
});
const { id } = await response.json();
console.log(`View validation: <host>/${id}`);
See /api-docs
for full API documentation.
- Node.js (v14 or higher)
- npm
-
Clone the repository
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to:
http://localhost:3000
The application supports two database providers:
- SQLite (default): Used for local development, no cleanup/TTL
- DynamoDB: Used for production AWS Lambda deployment with 1-day TTL
DB_PROVIDER
- Database provider:sqlite
(default) ordynamodb
DYNAMODB_TABLE_NAME
- DynamoDB table name (required when using DynamoDB)AWS_REGION
- AWS region for DynamoDB (optional, defaults to SDK default)
The demo at https://json-validator.codemine.be is deployed using AWS Lambda with DynamoDB. This repository includes both build and deploy scripts to streamline the deployment process.
-
Create a DynamoDB table:
- Table name: Choose a name
- Partition key:
PK
(String) - Enable TTL: Set TTL attribute name to
ttl
-
Configure Lambda environment variables:
DB_PROVIDER=dynamodb DYNAMODB_TABLE_NAME=<table-name>
-
Build and package the application:
npm run package
-
Deploy to AWS Lambda:
npm run deploy
Note: Ensure AWS credentials are configured in
~/.aws/credentials
and update the function name inpackage.json
if needed.
npm run dev
- Start local development servernpm run build
- Build for productionnpm run package
- Create deployment package (deployment.zip)npm run deploy
- Build, package, and deploy to AWS Lambda
MIT License
Copyright (c) 2025
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.