{"id":29820601,"url":"https://github.com/patkub/mold-inventory","last_synced_at":"2026-03-06T22:11:34.256Z","repository":{"id":306941171,"uuid":"1027362801","full_name":"patkub/mold-inventory","owner":"patkub","description":"Mold inventory management application on Cloudflare Workers using Auth0, Hono, Prisma, D1, Next.js, and an MCP Server","archived":false,"fork":false,"pushed_at":"2026-03-03T20:14:09.000Z","size":4002,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-04T00:30:20.781Z","etag":null,"topics":["auth0","cloudflare-d1","cloudflare-workers","hono","mcp-server","nextjs","nx-workspace","prisma"],"latest_commit_sha":null,"homepage":"https://mold-inventory-app-production.epicpatka.workers.dev/","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/patkub.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":"2025-07-27T21:40:43.000Z","updated_at":"2026-03-03T20:12:04.000Z","dependencies_parsed_at":"2025-08-15T20:17:24.794Z","dependency_job_id":"f64b429f-8e35-43b2-968e-08ec7b63c46b","html_url":"https://github.com/patkub/mold-inventory","commit_stats":null,"previous_names":["patkub/mold-inventory"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/patkub/mold-inventory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patkub%2Fmold-inventory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patkub%2Fmold-inventory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patkub%2Fmold-inventory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patkub%2Fmold-inventory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patkub","download_url":"https://codeload.github.com/patkub/mold-inventory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patkub%2Fmold-inventory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30200758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["auth0","cloudflare-d1","cloudflare-workers","hono","mcp-server","nextjs","nx-workspace","prisma"],"created_at":"2025-07-28T23:01:10.233Z","updated_at":"2026-03-06T22:11:34.237Z","avatar_url":"https://github.com/patkub.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mold Inventory\n\nMold inventory management application\n\nApp: [https://mold-inventory-app-production.epicpatka.workers.dev/](https://mold-inventory-app-production.epicpatka.workers.dev/)\n\nMCP Server: [https://molds-mcp-production.epicpatka.workers.dev/mcp](https://molds-mcp-production.epicpatka.workers.dev/mcp)\n\nA mold inventory management system on Cloudflare Workers using Hono, Prisma ORM, Cloudflare D1, and Next.js, with authentication and authorization handled by Auth0. Includes a Model Context Protocol (MCP) server that allows an LLM to securely access and retrieve mold inventory data on behalf of users with appropriate permissions.\n\n## Architecture\n\nThis is a monorepo powered by [Nx](https://nx.dev/).\n\n### Tech Stack\n\n[Auth0](https://auth0.com/), [Cloudflare D1](https://developers.cloudflare.com/d1/), [Cloudflare Workers](https://developers.cloudflare.com/workers/), [Hono](https://hono.dev/), [Prisma](https://www.prisma.io/), [Next.js](https://nextjs.org/)\n\n### Apps\n\n- [`auth0-tenant`](./apps/auth0-tenant/README.md): [Auth0](https://auth0.com/) tenant configuration\n- [`mold-inventory-api`](./apps/mold-inventory-api/README.md): Cloudflare Worker serving a [Hono](https://hono.dev/) API backend\n- [`mold-inventory-app`](./apps/mold-inventory-app/README.md): Cloudflare Worker serving the [Next.js](https://nextjs.org/) app\n- [`molds-mcp`](./apps/molds-mcp/README.md): Cloudflare Worker Molds MCP server\n\n### Implementation Details\n\n#### auth0-tenant\n\n[`auth0-tenant`](./apps/auth0-tenant/README.md): Deployable [Auth0](https://auth0.com/) tenant configuration for this app.\n\n#### mold-inventory-api\n\n[`mold-inventory-api`](./apps/mold-inventory-api/README.md): Cloudflare Worker [Hono](https://hono.dev/) API backend\n\n- A Cloudflare Worker that serves a [Hono](https://hono.dev/) CRUD API to manage molds.\n- Validates [Auth0](https://auth0.com/) JWT access token scope claim for permissions.\n- Uses [Prisma](https://www.prisma.io/) ORM to manage a [Cloudflare D1](https://developers.cloudflare.com/d1/) database\n\n#### mold-inventory-app\n\n[`mold-inventory-app`](./apps/mold-inventory-app/README.md): Cloudflare Worker serving the [Next.js](https://nextjs.org/) app\n\n- [Auth0](https://auth0.com/) for login\n- [Next.js](https://developers.cloudflare.com/workers/framework-guides/web-apps/nextjs/) as the frontend React Framework\n\n#### molds-mcp\n\n[`molds-mcp`](./apps/molds-mcp/README.md): Cloudflare Worker Molds MCP server\n\n- [Auth0](https://auth0.com/) for login\n- Allows an LLM to receive the list of molds on behalf of the user.\n- User must have `read:molds` permission for the Mold Inventory API.\n\n## UI\n\n![Screenshot of Light UI](./apps/mold-inventory-app/docs/light/home-screen-light.png)\n\n![Screenshot of Dark UI](./apps/mold-inventory-app/docs/dark/home-screen-dark.png)\n\n[See more UI screenshots](./apps/mold-inventory-app/docs/UI.md)\n\nUI generated with [v0.dev](https://v0.dev/)\n\n### MCP Server AI Chat\n\n![AI Chat 1](./apps/molds-mcp/docs/ai-chat-1.png)\n\n[See more AI screenshots](./apps/molds-mcp/docs/mcp-server-ai-chat.md)\n\n## Local Setup\n\n### Install Dependencies\n\nInstall Node.js 22 dependencies.\n\n```bash\npnpm install\n```\n\n### Deploy Development Auth0 Configuration\n\nCopy auth0 config from `apps/auth0-tenant/auth0-config.json.example` to `apps/auth0-tenant/auth0-config-dev.json` and fill out details using Machine to Machine client.\n\nDeploy development Auth0 configuration.\n\n```bash\npnpm nx deploy-dev auth0-tenant\n```\n\n#### Create Users\n\nCreate users in Auth0 dashboard.\n\n- Assign permissions to users for the Mold Inventory API.\n  - Available permissions: `create:molds`, `read:molds`, `update:molds`, and `delete:molds`\n\n#### Configure Actions\n\nDefine secrets for MoldInventoryPostUserRegistration action.\n\n- `DOMAIN` - Auth0 domain\n- `CLIENT_ID` - Molds M2M Client ID\n- `CLIENT_SECRET` - Molds M2M Client Secret\n\n### Run the API locally\n\nCreate mold-inventory-api database in Cloudflare.\n\n```bash\npnpm nx db:create mold-inventory-api\n```\n\nSet up local Cloudflare D1 database for the first time.\n\n```bash\n# set up local Cloudflare D1 database\npnpm nx db:migrate:local mold-inventory-api\npnpm nx db:seed:local mold-inventory-api\n\n# generate prisma database schema\npnpm nx prisma:generate mold-inventory-api\n```\n\nConfigure environment variables in `apps/mold-inventory-app/wrangler.jsonc`.\n\nRun the API locally.\n\n```bash\npnpm nx dev mold-inventory-api\n```\n\n### Run the App locally\n\nConfigure environment variables for development in `apps/mold-inventory-app/wrangler.jsonc`.\n\nThere are two ways to run the app locally, using either the Next.js development server, or the Cloudflare workerd runtime.\n\nRun locally in Node.js using the Next.js development server, with hot-code reloading, error reporting, and more.\n\n```bash\npnpm nx dev mold-inventory-app\n```\n\nRun locally in the Cloudflare workerd runtime, which is more accurate to production.\n\n```bash\npnpm nx preview mold-inventory-app\n```\n\nOpen [http://localhost:3000](http://localhost:3000) in your browser.\n\n## Unit Testing\n\nRun unit tests for API and App\n\n```bash\npnpm nx run-many -t test -p mold-inventory-api mold-inventory-app\n```\n\nRun unit tests for API, App, and Auth0 Actions\n\n```bash\npnpm nx run-many -t test --all\n```\n\n- `pnpm nx test auth0-tenant` - vitest actions single run for Auth0 actions\n- `pnpm nx test:watch auth0-tenant` - vitest actions watch test suites for changes for Auth0 actions\n- `pnpm nx test mold-inventory-api` - vitest single run for API\n- `pnpm nx test:watch mold-inventory-api` - vitest watch test suites for changes for API\n- `pnpm nx test mold-inventory-app` - vitest single run for app\n- `pnpm nx test:watch mold-inventory-app` - vitest watch test suites for changes for app\n\n## Staging Environment\n\nReference [Staging Deploy](./docs/staging.md).\n\n## Production Deploy\n\nReference [Production Deploy](./docs/production.md).\n\n## Changesets\n\n**Create a changeset:** Whenever a change is made that warrants a new release (e.g., bug fixes, new features), run:\n\n```bash\npnpm changeset\npnpm changeset version\n```\n\n## Commands\n\nReference available npm scripts in [commands](./docs/commands.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatkub%2Fmold-inventory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatkub%2Fmold-inventory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatkub%2Fmold-inventory/lists"}