{"id":42132576,"url":"https://github.com/falcondev-oss/trpc-typed-form-data","last_synced_at":"2026-02-16T16:01:48.244Z","repository":{"id":333021051,"uuid":"1135963953","full_name":"falcondev-oss/trpc-typed-form-data","owner":"falcondev-oss","description":"Type-safe integration of FormData with tRPC using Standard Schema.","archived":false,"fork":false,"pushed_at":"2026-01-26T14:34:04.000Z","size":79,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-27T03:11:15.348Z","etag":null,"topics":["formdata","standard-schema","standardschema","trpc","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/falcondev-oss.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,"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":"2026-01-16T21:05:18.000Z","updated_at":"2026-01-26T14:34:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/falcondev-oss/trpc-typed-form-data","commit_stats":null,"previous_names":["falcondev-oss/trpc-typed-form-data"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/falcondev-oss/trpc-typed-form-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcondev-oss%2Ftrpc-typed-form-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcondev-oss%2Ftrpc-typed-form-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcondev-oss%2Ftrpc-typed-form-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcondev-oss%2Ftrpc-typed-form-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/falcondev-oss","download_url":"https://codeload.github.com/falcondev-oss/trpc-typed-form-data/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcondev-oss%2Ftrpc-typed-form-data/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29509469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"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":["formdata","standard-schema","standardschema","trpc","typescript"],"created_at":"2026-01-26T16:01:29.410Z","updated_at":"2026-02-16T16:01:48.238Z","avatar_url":"https://github.com/falcondev-oss.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @falcondev-oss/trpc-typed-form-data\n\nType-safe integration of FormData with tRPC using Standard Schema.\n\n## Installation\n\n```bash\nnpm install @falcondev-oss/trpc-typed-form-data\n```\n\n## Usage\n\n### Server\n\n```ts\nimport { typedFormData, typedFormDataMiddleware } from '@falcondev-oss/trpc-typed-formdata/server'\nimport { initTRPC } from '@trpc/server'\nimport { z } from 'zod'\n\nconst trpc = initTRPC.create()\nconst typedFormDataPlugin = createTypedFormDataPlugin(trpc) // 👈 create plugin instance\n\nconst procedure = trpc.procedure.concat(typedFormDataPlugin.middleware) // 👈 add middleware to procedure\n\nconst router = trpc.router({\n  upload: procedure\n    .input(\n      // 👇 use any standard schema wrapped with `typedFormData`\n      typedFormData(\n        z.object({\n          file: z.instanceof(File),\n          userId: z.string(),\n        }),\n      ),\n    )\n    .mutation(async ({ input }) =\u003e {\n      const { file, userId } = input // input is now properly typed\n\n      await file.arrayBuffer() // works as expected\n    }),\n})\n```\n\n### Client\n\n```ts\nimport { createTypedFormData, typedFormDataLink } from '@falcondev-oss/trpc-typed-formdata/client'\nimport { createTRPCClient, httpLink } from '@trpc/client'\n\nconst trpc = createTRPCClient\u003cAppRouter\u003e({\n  links: [\n    typedFormDataLink(), // 👈 add link\n    httpLink({\n      url: '/api/trpc',\n    }),\n  ],\n})\n\nawait trpc.upload.mutate(\n  createTypedFormData({\n    // input is properly typed here as well\n    userId: '123',\n    file: new File(['file contents'], 'example.txt'),\n  }),\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalcondev-oss%2Ftrpc-typed-form-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffalcondev-oss%2Ftrpc-typed-form-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalcondev-oss%2Ftrpc-typed-form-data/lists"}