{"_id":"@abdulmuiz44/clientpad-server","_rev":"2-1112b025f16273ee136e0d68c2afffe5","name":"@abdulmuiz44/clientpad-server","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@abdulmuiz44/clientpad-server","version":"0.1.0","keywords":["clientpad","server","business-infrastructure","postgresql","api-keys","fetch"],"license":"MIT","_id":"@abdulmuiz44/clientpad-server@0.1.0","maintainers":[{"name":"abdulmuiz44","email":"abdulmuizproject@gmail.com"}],"dist":{"shasum":"87462aad48ba3b7222be234a338b138af0809d91","tarball":"https://registry.npmjs.org/@abdulmuiz44/clientpad-server/-/clientpad-server-0.1.0.tgz","fileCount":6,"integrity":"sha512-wQ0rvOPHfjN+lQeFAR7Pfco5opUKOFHy5iDr4UqmOgs90TnU9Boqrm7fdgRz0xelETXh9ijSPfHWDcvxuE/beQ==","signatures":[{"sig":"MEUCIHY/DyJFry5ooMHdpfOCpfCI588nTwMlwoUIoroTq+oaAiEAkOUR70bMXMlgM/vl1MABUIMj0u9N6QfN6zsoAXhNkXU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27349},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18"},"gitHead":"5bea15f12b556946d96cdf84530c119525df300b","scripts":{"test":"pnpm --filter @abdulmuiz44/clientpad-core build && npm run build && node test/server.test.mjs","build":"tsc -p tsconfig.json","prepack":"npm run build","typecheck":"pnpm --filter @abdulmuiz44/clientpad-core build && tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"abdulmuiz44","email":"abdulmuizproject@gmail.com"},"_npmVersion":"10.9.3","description":"Fetch-standard ClientPad public API server for PostgreSQL-backed apps.","directories":{},"_nodeVersion":"22.18.0","dependencies":{"pg":"^8.13.3","@abdulmuiz44/clientpad-core":"workspace:*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"^8.11.10"},"_npmOperationalInternal":{"tmp":"tmp/clientpad-server_0.1.0_1778249509940_0.11644820879011841","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@abdulmuiz44/clientpad-server","version":"0.2.0","description":"Fetch-standard ClientPad public API server for PostgreSQL-backed apps.","license":"MIT","type":"module","main":"dist/index.js","types":"dist/index.d.ts","keywords":["clientpad","server","business-infrastructure","postgresql","api-keys","fetch"],"scripts":{"build":"tsc -p tsconfig.json","typecheck":"pnpm --filter @abdulmuiz44/clientpad-core build && tsc -p tsconfig.json --noEmit","test":"pnpm --filter @abdulmuiz44/clientpad-core build && npm run build && node test/server.test.mjs","prepack":"npm run build"},"dependencies":{"@abdulmuiz44/clientpad-core":"workspace:*","pg":"^8.13.3"},"devDependencies":{"@types/pg":"^8.11.10"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@abdulmuiz44/clientpad-server@0.2.0","gitHead":"f2d5f2e2cfc05cc89b2dc516f675f50b140bba80","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-iG2e7pUd1bH/NiTrbyhr6igwkzLurZt4gUDHzq/lGhfN2+amnwI97dhpiKS5Iq4R+eGF+oU3LhpvE3E+zXRZeQ==","shasum":"c9362d2453c162d4847cb5c3d0e9e05086339062","tarball":"https://registry.npmjs.org/@abdulmuiz44/clientpad-server/-/clientpad-server-0.2.0.tgz","fileCount":6,"unpackedSize":38993,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEMCIEu1xwXJHLpaia0ToNtOEBi6tSKF1Tsmvo9Dliko2mKcAh9DHx2+D7vRtWWeUkmdfSiix1AL/QVpLAkowzrjJHcr"}]},"_npmUser":{"name":"abdulmuiz44","email":"abdulmuizproject@gmail.com"},"directories":{},"maintainers":[{"name":"abdulmuiz44","email":"abdulmuizproject@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/clientpad-server_0.2.0_1778252464836_0.058801654161199535"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-08T14:11:49.845Z","modified":"2026-05-08T15:01:05.104Z","0.1.0":"2026-05-08T14:11:50.123Z","0.2.0":"2026-05-08T15:01:04.990Z"},"license":"MIT","keywords":["clientpad","server","business-infrastructure","postgresql","api-keys","fetch"],"description":"Fetch-standard ClientPad public API server for PostgreSQL-backed apps.","maintainers":[{"name":"abdulmuiz44","email":"abdulmuizproject@gmail.com"}],"readme":"# ClientPad Server\n\nFetch-standard server handlers for ClientPad public APIs.\n\n## Install\n\n```bash\npnpm add @abdulmuiz44/clientpad-server\n```\n\n## Basic Usage\n\n```ts\nimport { createClientPadHandler } from \"@abdulmuiz44/clientpad-server\";\n\nexport const handler = createClientPadHandler({\n  databaseUrl: process.env.DATABASE_URL!,\n  apiKeyPepper: process.env.API_KEY_PEPPER!,\n});\n```\n\nThe handler accepts a standard `Request` and returns a standard `Response`.\n\n## Next.js Route Handler\n\n```ts\nimport { createClientPadHandler } from \"@abdulmuiz44/clientpad-server\";\n\nconst handler = createClientPadHandler({\n  databaseUrl: process.env.DATABASE_URL!,\n  apiKeyPepper: process.env.API_KEY_PEPPER!,\n});\n\nexport const GET = handler;\nexport const POST = handler;\n```\n\nMount it under routes that forward to:\n\n```text\n/api/public/v1/leads\n/api/public/v1/clients\n/api/public/v1/usage\n```\n\n## Supported Routes\n\n- `GET /leads`\n- `POST /leads`\n- `GET /clients`\n- `POST /clients`\n- `GET /usage`\n\nThe handler also accepts full public API paths such as `/api/public/v1/leads`.\n\n## Usage Metering\n\nThe server records API key usage in PostgreSQL and enforces optional limits:\n\n- `monthly_request_limit`\n- `rate_limit_per_minute`\n- `billing_mode`\n\nLeaving limits empty keeps self-hosted deployments unlimited. Hosted ClientPad Cloud deployments can set limits on API keys and return `429` when a key exceeds quota.\n","readmeFilename":"README.md"}