@bootstrapware/rfq
v0.1.5
Published
Embeddable buyer–supplier requests for quote. Local, BYO, or Bootstrapware Hosted.
Maintainers
Readme
@bootstrapware/rfq
Embeddable buyer–supplier requests for quote. Local, bring-your-own persistence, or Bootstrapware Hosted.
Local mode is free. BYO is $9.99 / month (you store RFQ records). Hosted is $19.99 / month (Bootstrapware stores them). Test keys are free. The widget never mints author tokens.
pnpm add @bootstrapware/rfqPeer dependencies: react and react-dom (>= 18).
"use client";
import { RfqRequester, createLocalAdapter } from "@bootstrapware/rfq";
import "@bootstrapware/rfq/styles.css";
<RfqRequester
scope={{ appId: "rqa_local", tenantKey: workspace.id }}
actor={{ id: session.user.id, permissions: ["buyer_read", "buyer_edit"] }}
adapter={createLocalAdapter({ storageKey: "demo-rfq" })}
/>RfqSupplier and RfqComparison use the same props with surface omitted. Omit theme and the shell stays light: no data-theme, and no prefers-color-scheme.
Local
import { createLocalAdapter } from "@bootstrapware/rfq";
import "@bootstrapware/rfq/styles.css";
const adapter = createLocalAdapter({ storageKey: "demo-rfq" });Saved JSON that cannot be read shows: Saved RFQs could not be read. Showing an empty in-memory RFQ.
Hosted
Publishable keys may appear in the browser. Secret keys stay on your server.
import { createHostedAdapter } from "@bootstrapware/rfq";
const adapter = createHostedAdapter({
appId: "rqa_...",
publishableKey: process.env.NEXT_PUBLIC_BSW_RFQ_PUBLISHABLE_KEY!,
scope: { tenantKey: workspace.id },
authorToken,
});Optional apiBaseUrl defaults to https://rfq.bootstrapware.co. Pass authorToken and renewAuthorToken on the widget so Hosted requests refresh before expiry.
BYO ($9.99): pass an RfqAdapter, or wrap one with createByoAdapter. A Postgres reference lives in examples/rfq-nextjs.
Attachment bytes stay on the host. Selection records intent only.
Since 0.1.1, a supplier bid can include an optional lead time: a whole number from 0 to 9999, in hours, days, or weeks, starting at award. A blank amount is omitted. A missing lead time reads "Not given". Since 0.1.3, comparison lists each quoted line's lead time when they differ. Since 0.1.1, comparison can rescind a recorded selection with a reason. That clears the intent and returns the request to closed. Since 0.1.3, comparison also shows each line's unit price. A no-bid reads "No bid". An alternative is labeled "Alt". Since 0.1.4, those amounts use the request currency, a blank unit price does not submit, and comparison can download a CSV built in the browser. Since 0.1.5, a negative amount keeps the minus in front of the symbol, that CSV starts with a UTF-8 BOM, and the requester accepts pasted CSV or TSV line items.
