{"_id":"@archhypo/plugin-hypo-stage-backend","_rev":"4-ecd764493694442a579d3715921e9883","name":"@archhypo/plugin-hypo-stage-backend","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"@archhypo/plugin-hypo-stage-backend","version":"0.1.0","author":{"url":"https://github.com/ArchHypo","name":"ArchHypo"},"license":"Apache-2.0","_id":"@archhypo/plugin-hypo-stage-backend@0.1.0","maintainers":[{"name":"zeevolution","email":"limajosent@gmail.com"}],"homepage":"https://github.com/ArchHypo/hypo-stage#readme","bugs":{"url":"https://github.com/ArchHypo/hypo-stage/issues"},"dist":{"shasum":"882076ba033a5bf1771ec5edf9eae7db09fb03e4","tarball":"https://registry.npmjs.org/@archhypo/plugin-hypo-stage-backend/-/plugin-hypo-stage-backend-0.1.0.tgz","fileCount":17,"integrity":"sha512-gW/HgLhO3L2a6knmw6t1SIM3ssZ/ufBdo8JB4izfRd73ThhoJWItIr/rxFWW0aOlW4j1YOLeZq8eFFH35hVbIA==","signatures":[{"sig":"MEUCIQChNl98vLXqqqqDSQXqYC+VU1OZgWYwCh6JMrlVNvpOmQIgM4tmd6KJdQzOPilIWiK5Dgk2SyE46M27tpVHLpRyHtw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@archhypo%2fplugin-hypo-stage-backend@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":93063},"main":"src/index.ts","types":"src/index.ts","gitHead":"459c44c151115ccadc79e5097148f25132533e7b","scripts":{"lint":"backstage-cli package lint","seed":"node scripts/seed-standalone.js","test":"backstage-cli package test","build":"backstage-cli package build","clean":"backstage-cli package clean","start":"backstage-cli package start","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack"},"_npmUser":{"name":"zeevolution","email":"limajosent@gmail.com"},"backstage":{"role":"backend-plugin","pluginId":"hypo-stage","pluginPackages":["@archhypo/plugin-hypo-stage","@archhypo/plugin-hypo-stage-backend"]},"repository":{"url":"git+https://github.com/ArchHypo/hypo-stage.git","type":"git","directory":"hypo-stage-backend"},"_npmVersion":"10.8.2","description":"Backend plugin for [HypoStage](https://github.com/ArchHypo/hypo-stage): persistence and API for architectural hypotheses and technical planning. Uses the Backstage database and catalog services.","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"^3.22.4","express":"^4.17.1","@backstage/errors":"^1.2.7","express-promise-router":"^4.1.0","@backstage/catalog-model":"^1.7.5","@backstage/catalog-client":"^1.9.1","@backstage/backend-defaults":"^0.9.0","@backstage/backend-plugin-api":"^1.3.0","@backstage/plugin-catalog-node":"^1.16.3"},"publishConfig":{"main":"dist/index.cjs.js","types":"dist/index.d.ts","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"knex":"^3.1.0","supertest":"^6.2.4","@backstage/cli":"^0.32.0","@types/express":"^4.17.6","@types/supertest":"^2.0.12","@backstage/config-loader":"^1.10.0","@backstage/backend-test-utils":"^1.4.0","@backstage/plugin-auth-backend":"^0.25.0","@backstage/plugin-auth-backend-module-guest-provider":"^0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/plugin-hypo-stage-backend_0.1.0_1771466559448_0.9830178263417919","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@archhypo/plugin-hypo-stage-backend","version":"0.1.1","author":{"url":"https://github.com/ArchHypo","name":"ArchHypo"},"license":"Apache-2.0","_id":"@archhypo/plugin-hypo-stage-backend@0.1.1","maintainers":[{"name":"zeevolution","email":"limajosent@gmail.com"}],"homepage":"https://github.com/ArchHypo/hypo-stage#readme","bugs":{"url":"https://github.com/ArchHypo/hypo-stage/issues"},"dist":{"shasum":"95528da964cab263dcf70b9cc5deda60c57c5b26","tarball":"https://registry.npmjs.org/@archhypo/plugin-hypo-stage-backend/-/plugin-hypo-stage-backend-0.1.1.tgz","fileCount":17,"integrity":"sha512-J55wSUXOu31ctKxEk54IJzOo+Mjx5/aCaJja3TUUv+Nj4WMAHC9YNomuWjVtdUvnTD2hfHpD7eKxbCgvIl2Bqg==","signatures":[{"sig":"MEUCIA6pxPCPXMSlkzfvyY3TEcdbDdTj3gWLvbbi4TJ8grzWAiEA2ZZA6+0eZzJ9jqT4ISLbxmdgxqQVVejdRG3jWla/iwg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@archhypo%2fplugin-hypo-stage-backend@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":93063},"main":"src/index.ts","types":"src/index.ts","gitHead":"5ce9384c53c53270842684d845a95708e00b9681","scripts":{"lint":"backstage-cli package lint","seed":"node scripts/seed-standalone.js","test":"backstage-cli package test","build":"backstage-cli package build","clean":"backstage-cli package clean","start":"backstage-cli package start","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack"},"_npmUser":{"name":"zeevolution","email":"limajosent@gmail.com"},"backstage":{"role":"backend-plugin","pluginId":"hypo-stage","pluginPackages":["@archhypo/plugin-hypo-stage","@archhypo/plugin-hypo-stage-backend"]},"repository":{"url":"git+https://github.com/ArchHypo/hypo-stage.git","type":"git","directory":"hypo-stage-backend"},"_npmVersion":"10.8.2","description":"Backend plugin for [HypoStage](https://github.com/ArchHypo/hypo-stage): persistence and API for architectural hypotheses and technical planning. Uses the Backstage database and catalog services.","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"^3.22.4","express":"^4.17.1","@backstage/errors":"^1.2.7","express-promise-router":"^4.1.0","@backstage/catalog-model":"^1.7.5","@backstage/catalog-client":"^1.9.1","@backstage/backend-defaults":"^0.9.0","@backstage/backend-plugin-api":"^1.3.0","@backstage/plugin-catalog-node":"^1.16.3"},"publishConfig":{"main":"dist/index.cjs.js","types":"dist/index.d.ts","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"knex":"^3.1.0","supertest":"^6.2.4","@backstage/cli":"^0.32.0","@types/express":"^4.17.6","@types/supertest":"^2.0.12","@backstage/config-loader":"^1.10.0","@backstage/backend-test-utils":"^1.4.0","@backstage/plugin-auth-backend":"^0.25.0","@backstage/plugin-auth-backend-module-guest-provider":"^0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/plugin-hypo-stage-backend_0.1.1_1771467401584_0.6017799518078324","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@archhypo/plugin-hypo-stage-backend","version":"0.1.2","author":{"url":"https://github.com/ArchHypo","name":"ArchHypo"},"license":"Apache-2.0","_id":"@archhypo/plugin-hypo-stage-backend@0.1.2","maintainers":[{"name":"zeevolution","email":"limajosent@gmail.com"}],"homepage":"https://github.com/ArchHypo/hypo-stage#readme","bugs":{"url":"https://github.com/ArchHypo/hypo-stage/issues"},"dist":{"shasum":"585565dca1fd28c52ace299736cad84c581d5730","tarball":"https://registry.npmjs.org/@archhypo/plugin-hypo-stage-backend/-/plugin-hypo-stage-backend-0.1.2.tgz","fileCount":17,"integrity":"sha512-HzA/iz0zb5kZqNkF5GLdulLJQWgmIiOsesbsje4IZ/qm+3zbP9FIVW3mrbw+8GvOL6QThEKazNc31WgrJaRsTQ==","signatures":[{"sig":"MEQCICo0UFuiE+mrywDRZkus13xwADUDfuEoQ6wOZsR1AxqsAiAsDA7MrAlcOUKWC0UOTPdjHWAh9Yh7KS3kIJP3BrTF3g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@archhypo%2fplugin-hypo-stage-backend@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":92973},"main":"src/index.ts","types":"src/index.ts","gitHead":"0ba2fa93da2a7dad34fe8a487974098929966820","scripts":{"lint":"backstage-cli package lint","seed":"node scripts/seed-standalone.js","test":"backstage-cli package test","build":"backstage-cli package build","clean":"backstage-cli package clean","start":"backstage-cli package start","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack"},"_npmUser":{"name":"zeevolution","email":"limajosent@gmail.com"},"backstage":{"role":"backend-plugin","pluginId":"hypo-stage","pluginPackages":["@archhypo/plugin-hypo-stage","@archhypo/plugin-hypo-stage-backend"]},"repository":{"url":"git+https://github.com/ArchHypo/hypo-stage.git","type":"git","directory":"hypo-stage-backend"},"_npmVersion":"10.8.2","description":"Backend plugin for [HypoStage](https://github.com/ArchHypo/hypo-stage): REST API, database, and services for architectural hypothesis management in [Backstage](https://backstage.io).","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"^3.22.4","express":"^4.17.1","@backstage/errors":"^1.2.7","express-promise-router":"^4.1.0","@backstage/catalog-model":"^1.7.5","@backstage/catalog-client":"^1.9.1","@backstage/backend-defaults":"^0.9.0","@backstage/backend-plugin-api":"^1.3.0","@backstage/plugin-catalog-node":"^1.16.3"},"publishConfig":{"main":"dist/index.cjs.js","types":"dist/index.d.ts","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"knex":"^3.1.0","supertest":"^6.2.4","@backstage/cli":"^0.32.0","@types/express":"^4.17.6","@types/supertest":"^2.0.12","@backstage/config-loader":"^1.10.0","@backstage/backend-test-utils":"^1.4.0","@backstage/plugin-auth-backend":"^0.25.0","@backstage/plugin-auth-backend-module-guest-provider":"^0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/plugin-hypo-stage-backend_0.1.2_1771467992985_0.34668748269053684","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@archhypo/plugin-hypo-stage-backend","version":"1.0.0","description":"Backstage backend plugin for HypoStage: REST API, database migrations, and hypothesis services.","keywords":["backstage","backstage-plugin","hypothesis","architecture","backend-plugin","express","archhypo"],"license":"Apache-2.0","author":{"name":"ArchHypo","url":"https://github.com/ArchHypo"},"homepage":"https://github.com/ArchHypo/hypo-stage#readme","bugs":{"url":"https://github.com/ArchHypo/hypo-stage/issues"},"repository":{"type":"git","url":"git+https://github.com/ArchHypo/hypo-stage.git","directory":"hypo-stage-backend"},"main":"src/index.ts","types":"src/index.ts","publishConfig":{"access":"public","main":"dist/index.cjs.js","types":"dist/index.d.ts"},"backstage":{"role":"backend-plugin","pluginId":"hypo-stage","pluginPackages":["@archhypo/plugin-hypo-stage","@archhypo/plugin-hypo-stage-backend"]},"scripts":{"start":"backstage-cli package start","build":"backstage-cli package build","seed":"node scripts/seed-standalone.js","lint":"backstage-cli package lint","test":"backstage-cli package test","clean":"backstage-cli package clean","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack"},"dependencies":{"@backstage/backend-defaults":"^0.9.0","@backstage/backend-plugin-api":"^1.3.0","@backstage/catalog-client":"^1.9.1","@backstage/catalog-model":"^1.7.5","@backstage/errors":"^1.2.7","@backstage/plugin-catalog-node":"^1.16.3","express":"^4.17.1","express-promise-router":"^4.1.0","zod":"^3.22.4"},"devDependencies":{"@backstage/backend-test-utils":"^1.4.0","@backstage/cli":"^0.32.0","@backstage/config-loader":"^1.10.0","@backstage/plugin-auth-backend":"^0.25.0","@backstage/plugin-auth-backend-module-guest-provider":"^0.2.0","@types/express":"^4.17.6","@types/supertest":"^2.0.12","knex":"^3.1.0","supertest":"^6.2.4"},"_id":"@archhypo/plugin-hypo-stage-backend@1.0.0","gitHead":"478fdc612d65e1c1b9fd68ea1eeb812beb5706a1","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-jW2sV1vz3dD8IKj4yQNVeXfKKClhrdWG0X969pTWvwI14+4V0m1DV4IcRiVOF3jCJWVpU+Wj2ZA6IArApl6dJQ==","shasum":"f704e9de62880cd354c433c0e4763f95f1f9dad4","tarball":"https://registry.npmjs.org/@archhypo/plugin-hypo-stage-backend/-/plugin-hypo-stage-backend-1.0.0.tgz","fileCount":18,"unpackedSize":106524,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@archhypo%2fplugin-hypo-stage-backend@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDny3Yxgpb3/1DA6gdxpdWhLzjWQ3/GzM1jS8LQ/PbqcQIhAI1UpXC2UILbN4OpjwD2C1rWvcAuvFAp1qskDdEmTiNf"}]},"_npmUser":{"name":"zeevolution","email":"limajosent@gmail.com"},"directories":{},"maintainers":[{"name":"zeevolution","email":"limajosent@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-hypo-stage-backend_1.0.0_1776033151473_0.7992083143468938"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-19T02:02:39.318Z","modified":"2026-04-12T22:32:31.974Z","0.1.0":"2026-02-19T02:02:39.602Z","0.1.1":"2026-02-19T02:16:41.747Z","0.1.2":"2026-02-19T02:26:33.165Z","1.0.0":"2026-04-12T22:32:31.684Z"},"bugs":{"url":"https://github.com/ArchHypo/hypo-stage/issues"},"author":{"name":"ArchHypo","url":"https://github.com/ArchHypo"},"license":"Apache-2.0","homepage":"https://github.com/ArchHypo/hypo-stage#readme","repository":{"type":"git","url":"git+https://github.com/ArchHypo/hypo-stage.git","directory":"hypo-stage-backend"},"description":"Backstage backend plugin for HypoStage: REST API, database migrations, and hypothesis services.","maintainers":[{"name":"zeevolution","email":"limajosent@gmail.com"}],"readme":"# HypoStage Backend Plugin\n\nBackend plugin for [HypoStage](https://github.com/ArchHypo/hypo-stage): REST API, database, and services for architectural hypothesis management in [Backstage](https://backstage.io).\n\n**Package:** `@archhypo/plugin-hypo-stage-backend`\n\n> **Important:** The frontend package `@archhypo/plugin-hypo-stage` must be installed in the same Backstage app to use this backend.\n\n---\n\n## Features\n\n- **HypothesisService** — CRUD for hypotheses and technical planning; uncertainty/impact changes are tied to technical planning actions with dedicated event types (`TECHNICAL_PLANNING_CREATE`, `TECHNICAL_PLANNING_UPDATE`)\n- **REST API** — Full API for the frontend\n- **Database** — Knex migrations; PostgreSQL or SQLite; `hypothesisEvents` tracks evolution with optional `technicalPlanningId` FK\n- **Catalog integration** — Entity refs and team filtering\n\n---\n\n## Compatibility\n\n- **Backstage:** v1.16.0+\n- **Node.js:** 20+\n\n---\n\n## Installation\n\n### 1. Install packages\n\nFrom your Backstage app root:\n\n```bash\nyarn --cwd packages/app add @archhypo/plugin-hypo-stage\nyarn --cwd packages/backend add @archhypo/plugin-hypo-stage-backend\n```\n\n### 2. Register the backend plugin\n\nIn `packages/backend/src/index.ts`:\n\n```ts\nimport { createBackend } from '@backstage/backend-defaults';\n\nconst backend = createBackend();\n// ... other plugins ...\nbackend.add(import('@archhypo/plugin-hypo-stage-backend'));\nbackend.start();\n```\n\n### 3. Configure the database\n\nThe plugin uses Backstage's database. Add to `app-config.yaml`:\n\n**PostgreSQL (recommended):**\n\n```yaml\nbackend:\n  database:\n    client: pg\n    connection:\n      host: ${POSTGRES_HOST}\n      port: ${POSTGRES_PORT}\n      user: ${POSTGRES_USER}\n      password: ${POSTGRES_PASSWORD}\n      database: backstage\n    plugin:\n      hypo-stage:\n        connection:\n          database: backstage_plugin_hypo_stage\n```\n\n**SQLite (dev):**\n\n```yaml\nbackend:\n  database:\n    client: better-sqlite3\n    connection: ':memory:'\n```\n\nMigrations run automatically when the backend starts. No manual step required.\n\n---\n\n## REST API\n\nThe plugin mounts these routes under the Backstage backend:\n\n| Method | Path | Description |\n|--------|------|-------------|\n| `GET` | `/hypotheses` | List hypotheses (query: entityRef, team, focus) |\n| `POST` | `/hypotheses` | Create hypothesis |\n| `GET` | `/hypotheses/:id` | Get hypothesis by ID |\n| `PUT` | `/hypotheses/:id` | Update hypothesis |\n| `DELETE` | `/hypotheses/:id` | Delete hypothesis |\n| `GET` | `/hypotheses/:id/events` | Get evolution events |\n| `GET` | `/hypotheses/entity-refs` | List entity refs for autocomplete |\n| `GET` | `/hypotheses/teams` | List teams for filter |\n| `GET` | `/hypotheses/referenced-entity-refs` | Entity refs referenced by hypotheses |\n| `GET` | `/hypotheses/stats` | Aggregated stats |\n| `POST` | `/hypotheses/:id/technical_plannings` | Add technical planning item |\n| `PUT` | `/technical_plannings/:id` | Update technical planning item |\n| `DELETE` | `/technical_plannings/:id` | Delete technical planning item |\n\n---\n\n## Database\n\n### Migrations\n\nMigrations run automatically on backend startup. Located in `migrations/`:\n\n| Migration | Tables |\n|-----------|--------|\n| `20250716_000001_create_hypothesis.js` | `hypothesis` |\n| `20250827_000002_create_hypothesis_events.js` | `hypothesisEvents` (evolution history) |\n| `20250902_00003_create_technical_planning.js` | `technicalPlanning` |\n| `20260303_000004_add_technical_planning_id_to_events.js` | Adds `technicalPlanningId` FK to `hypothesisEvents` (links events to technical planning) |\n\n### Plugin-specific database\n\nFor production, use a dedicated database per plugin. Configure `backend.database.plugin.hypo-stage.connection` as shown above. The main `backend.database.connection` can point to the default Backstage DB; the plugin uses its own connection when `plugin.hypo-stage` is set.\n\n---\n\n## Frontend configuration\n\nThe frontend must be configured separately. See the [frontend package README](https://www.npmjs.com/package/@archhypo/plugin-hypo-stage) or [repository](https://github.com/ArchHypo/hypo-stage) for:\n\n- Routes and sidebar\n- API registration (`HypoStageApiRef` / `HypoStageApiClient`)\n\n---\n\n## Documentation\n\nFull documentation, Docker, standalone run, and E2E tests: [github.com/ArchHypo/hypo-stage](https://github.com/ArchHypo/hypo-stage)\n","readmeFilename":"README.md","keywords":["backstage","backstage-plugin","hypothesis","architecture","backend-plugin","express","archhypo"]}