@issue-reporter/fastify
v0.1.9
Published
Fastify routes and adapters for IssueReporter backends
Maintainers
Readme
@issue-reporter/fastify
Experimental Fastify plugin and backend adapters for IssueReporter.
Install
npm install @issue-reporter/fastify @issue-reporter/core fastifySmallest Useful Example
import Fastify from 'fastify';
import {
createGitHubIssueSink,
createS3CompatibleStorage,
issueReporterPlugin,
} from '@issue-reporter/fastify';
const app = Fastify();
await app.register(issueReporterPlugin, {
routePrefix: '/issue-reports',
enabled: true,
issueSink: createGitHubIssueSink({
token: process.env.ISSUE_REPORTER_GITHUB_TOKEN!,
owner: process.env.ISSUE_REPORTER_GITHUB_OWNER!,
repo: process.env.ISSUE_REPORTER_GITHUB_REPO!,
}),
storage: createS3CompatibleStorage({
provider: 's3',
endpoint: process.env.ISSUE_REPORTER_S3_ENDPOINT!,
region: process.env.ISSUE_REPORTER_S3_REGION ?? 'auto',
bucket: process.env.ISSUE_REPORTER_S3_BUCKET!,
accessKeyId: process.env.ISSUE_REPORTER_S3_ACCESS_KEY_ID!,
secretAccessKey: process.env.ISSUE_REPORTER_S3_SECRET_ACCESS_KEY!,
routePrefix: '/issue-reports',
}),
});If your frontend calls /api/issue-reports, either mount the plugin there or
add a proxy/rewrite from /api/issue-reports to /issue-reports.
Limitations
- Experimental
0.xAPI - currently targeted at Fastify only
- production setups still need auth and GitHub configuration
- storage is only required when you want captured or manual image evidence to be uploaded
Status and storage
GET /issue-reports/status returns capability information that the React UI uses to choose
between captured, manual, and no-screenshot flows.
If you omit storage, the plugin can still serve no-screenshot reports, but it will report that image-backed evidence is unavailable.
More
- Detailed setup is documented in the project repository's
docs/fastify-setup.md. - A runnable example lives in the
demo-apiworkspace in the project repository.
