{"id":24733410,"url":"https://github.com/grll/simpleform","last_synced_at":"2026-04-09T01:31:12.744Z","repository":{"id":271942732,"uuid":"915056314","full_name":"grll/simpleform","owner":"grll","description":"simple declarative form generator from JSON to react","archived":false,"fork":false,"pushed_at":"2025-01-11T12:55:41.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T16:25:10.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grll.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-10T21:44:49.000Z","updated_at":"2025-01-10T21:59:25.000Z","dependencies_parsed_at":"2025-01-10T22:51:19.351Z","dependency_job_id":null,"html_url":"https://github.com/grll/simpleform","commit_stats":null,"previous_names":["grll/simpleform"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/grll/simpleform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grll%2Fsimpleform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grll%2Fsimpleform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grll%2Fsimpleform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grll%2Fsimpleform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grll","download_url":"https://codeload.github.com/grll/simpleform/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grll%2Fsimpleform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31581864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":"2025-01-27T18:15:12.528Z","updated_at":"2026-04-09T01:31:12.718Z","avatar_url":"https://github.com/grll.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Form Generator\n\nA minimalist JSON-to-React form generator with Zod validation and React Hook Form integration.\n\n## Installation\n\n```bash\nnpm install simple-form-generator\n```\n\n## Quick Start\n\n```typescript\nimport { Renderer } from 'simple-form-generator';\n\n// Define your form schema\nconst formSchema = {\n  description: \"Contact Form\",\n  fields: {\n    name: {\n      type: \"text\",\n      label: \"Name\",\n      required: true\n    },\n    email: {\n      type: \"email\",\n      label: \"Email\",\n      required: true\n    }\n  }\n};\n\n// Use in your React component\nfunction MyForm() {\n  const handleSubmit = (data) =\u003e {\n    console.log('Form data:', data);\n  };\n\n  return (\n    \u003cRenderer \n      schema={formSchema}\n      onSubmit={handleSubmit}\n    /\u003e\n  );\n}\n```\n\n## Schema Definition\n\nYour form schema should follow this structure:\n\n```typescript\ninterface FormSchema {\n  description?: string;\n  fields: Record\u003cstring, Field\u003e;\n}\n\ntype Field = TextField | EmailField | PasswordField | NumberField | ArrayField;\n\ninterface BaseField\u003cT\u003e {\n  type: T;\n  label: string;\n  description?: string;\n  required?: boolean;\n  default?: T;\n}\n\n// Example field types\ninterface TextField extends BaseField\u003c\"text\"\u003e {}\ninterface EmailField extends BaseField\u003c\"email\"\u003e {}\ninterface NumberField extends BaseField\u003c\"number\"\u003e {\n  min?: number;\n  max?: number;\n}\ninterface ArrayField\u003cT\u003e extends BaseField\u003c\"array\"\u003e {\n  itemsType: \"text\" | \"email\" | \"password\" | \"number\";\n}\n```\n\n## Features\n\n- 🚀 Simple JSON schema definition\n- ✨ Automatic Zod schema generation\n- 📝 React Hook Form integration\n- 🎨 Tailwind CSS styling included\n- 🔒 Type-safe form handling\n- 📋 Array field support\n- 🔍 Built-in field validation\n\n## Advanced Usage\n\n### Array Fields\n\nYou can create dynamic array fields that allow users to add/remove items:\n\n```typescript\nconst formSchema = {\n  fields: {\n    emails: {\n      type: \"array\",\n      itemsType: \"email\",\n      label: \"Email Addresses\",\n      required: true\n    }\n  }\n};\n```\n\n### Number Validation\n\nNumber fields support min/max validation:\n\n```typescript\nconst formSchema = {\n  fields: {\n    age: {\n      type: \"number\",\n      label: \"Age\",\n      min: 0,\n      max: 120,\n      required: true\n    }\n  }\n};\n```\n\n## Examples\n\nThe package includes a live example application that demonstrates the form generator in action. The example app features:\n\n- A live schema editor with JSON validation\n- Real-time form preview\n- Full working implementation of all field types\n\n### Running the Example\n\n1. Clone the repository\n2. Install dependencies:\n\n## Contributing\n\nContributions are welcome! Please read our contributing guidelines first.\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrll%2Fsimpleform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrll%2Fsimpleform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrll%2Fsimpleform/lists"}