near-me-schema
v0.2.2
Published
Shared Zod schemas, enums and taxonomy for the Near-Me local-business service (frontend + backend SSOT).
Maintainers
Readme
near-me-schema
Shared Zod schemas, enums and the managed category/subcategory taxonomy for the
Near-Me local-business directory. Single source of truth (SSOT) consumed by
both reform-backend and jansathi-frontend.
What's inside
- Taxonomy (
taxonomy.ts) —NEAR_ME_CATEGORY->NEAR_ME_SUBCATEGORYtree (NEAR_ME_CATEGORY_SUBCATEGORIES) plussubcategoriesForCategory/isSubcategoryOfCategory. Managed + versioned: growing it = a new publish. - Enums (
enums.ts) — status, managed attribute tags, report reasons, lead type/status, day-of-week. - Helpers (
helpers.ts) —geoJsonPointSchema, phone/url/email/time Zod utils. - Business (
business.schema.ts) — create/update/search bodies + wire types.
Build & publish (npm-first)
npm install
npm run build # tsc -> dist/
npm publish --access publicprepublishOnly runs build + check (type-check + biome) as the publish gate.
--access public is a CLI flag, not a manifest field.
Consume
In reform-backend and jansathi-frontend:
npm install near-me-schema@<version>
# then delete any nested Zod dup so a single Zod instance is used:
rm -rf node_modules/near-me-schema/node_modulesBump the caret pin in each consumer's package.json on every publish (a 0.x
caret locks to the same minor, so npm install won't auto-pick a new minor).
Convention
Mirrors marketplace-schema exactly: pure ESM, tsc-only build, Zod is a
peer dependency (^4.4.0), NodeNext .js import specifiers, const-object
enums fed to z.enum(...).
