{"id":37667414,"url":"https://github.com/albertov5/node-schema-gen","last_synced_at":"2026-01-16T12:00:09.302Z","repository":{"id":191111095,"uuid":"683922032","full_name":"AlbertoV5/node-schema-gen","owner":"AlbertoV5","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-28T04:52:37.000Z","size":561,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-08-28T06:45:33.944Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlbertoV5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-28T04:26:39.000Z","updated_at":"2023-08-28T06:45:36.366Z","dependencies_parsed_at":"2023-08-28T06:56:25.110Z","dependency_job_id":null,"html_url":"https://github.com/AlbertoV5/node-schema-gen","commit_stats":null,"previous_names":["albertov5/node-schema-gen"],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/AlbertoV5/node-schema-gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertoV5%2Fnode-schema-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertoV5%2Fnode-schema-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertoV5%2Fnode-schema-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertoV5%2Fnode-schema-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlbertoV5","download_url":"https://codeload.github.com/AlbertoV5/node-schema-gen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertoV5%2Fnode-schema-gen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-16T12:00:08.655Z","updated_at":"2026-01-16T12:00:09.222Z","avatar_url":"https://github.com/AlbertoV5.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-schema-gen\n\n## Intro\n\nNode CLI tool to generate JSON schemas from JSON samples and documentation using GPT. \n\n1. Infer base JSON schema from JSON samples as any other JSON schema generator.\n2. Retrieve documentation about the JSON samples using embeddings.\n3. Give GPT the inferred base JSON schema plus documentation.\n4. Add instruction / prompt for guiding GPT. Maybe have intermediary calls from GPT itself (chain) to retrieve the additional data instead of writing that into the code.\n\n### Example:\n\n#### User\nCan you give me a JSON schema for Cart Create event from Shopify?\n\n#### GPT\n*Function calls to retrieve Cart Create samples and Cart Create docs*\n\n#### Node / System\n*Combines the output from function call with altered prompt / instruction*\n\n#### GPT\nSure, here it is a JSON schema for Cart Create:\n\n```json\n{\n    \"type\": \"object\",\n    \"properties\": {\n        \"etc\": {}\n    }\n}\n```\n\n#### Node / System\n\n*Parses output and stores in database*\n\n\n## Flow\n\n![diagram-01](./.github/node-01.png)\n\n\n## Notes\n\nThis is mostly inspired from the need of generating JSON schemas for data validation, but also GPT uses schemas for function calling so this can expand on that and generate schemas not only from JSON samples, but also from different contexts, like file directories or config files.\n\n## Tech Stack\n\n1. Node JS with TypeScript\n2. Zod for validation / schema generation.\n3. Either Postgres or Redis for storage and vector search.\n4. OpenAI SDK.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertov5%2Fnode-schema-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falbertov5%2Fnode-schema-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertov5%2Fnode-schema-gen/lists"}