DropComments

Feedback inside your app

DropComments SDK

Take feedback inside the app you’re building with one script tag, one endpoint on your server and a Feedback button of your own. Your team pin a comment, a box or a drawing on the app itself, and the people using it send feedback from a short form. It all lands in your projects here, where you and your AI agent reply.

Install the SDK

Free to start. Your app’s key stays on your server.

Feedback about an app shouldn’t start with a screenshot

When someone testing your app finds something, they take a screenshot, crop it, paste it in a chat and write “the thing at the top, on the second screen”. You go and find that screen, and guess which thing.

With the script in the app, they point at it where it is. The comment arrives with a picture of the screen as it was, the spot marked, and who sent it, ready for you or a coding agent to fix, and the reply shows up in the app.

How it works

  1. 1

    Add your app

    In your account, under Apps: its name, the addresses it runs at, and the projects its feedback goes into, say one for your team and one for your customers. It gets a key.

  2. 2

    Add the script

    Its server keeps the key and gives the page a short-lived token for whoever is signed in, saying whether they’re on your team. The page loads one script tag, and your own Feedback button opens it. Paste what DropComments shows you to the agent building your app and it adds them.

  3. 3

    Feedback comes in

    Your team press Feedback, pin it on the spot and write; they see everyone’s pins on the app and every reply, live. Everyone else gets a short form. Each lands as a Drop’s screen in its project.

Install the SDK

For a web app with a server and people who sign in. There’s no package to install: a key on your server, an endpoint that hands the page a token, a script tag, and a button of your own that opens it.

  1. Add your app in DropComments, under Apps: its name, the addresses it runs at (https, or http on localhost and .test while building), and the projects its feedback goes into. You get its key and each project’s id.

    Add your app

  2. Keep the key on your server, in its environment or secrets:

    DROPCOMMENTS_KEY=dc_app_…

    Never in a page, in code that reaches the browser, or in a commit. DropComments refuses it from a browser.

  3. Add a token endpoint. For whoever is signed in, it asks DropComments for a token and returns its JSON as it is. With nobody signed in, answer 401 and nothing shows.

    // GET /api/feedback-token
    export async function GET(request) {
      const user = await getSignedInUser(request); // your own sign-in
      if (!user) return new Response(null, {status: 401});
    
      const res = await fetch("https://dropcomments.com/api/app/token", {
        method: "POST",
        headers: {
          authorization: `Bearer ${process.env.DROPCOMMENTS_KEY}`,
          "content-type": "application/json",
        },
        body: JSON.stringify({
          project: "YOUR_PROJECT_ID",
          user: {id: user.id, name: user.name},
          team: user.isStaff, // true: pin comments on the app. false: the short form
        }),
      });
      return new Response(res.body, {status: res.status, headers: {"content-type": "application/json"}});
    }

    Written as a Next.js route handler; it’s the same in a Worker, Deno or Bun. In Express, send back the same status and JSON.

  4. Load the script in every page, before </body>:

    <script src="https://dropcomments.com/live.js" data-token-url="/api/feedback-token"></script>

    It draws no button of its own, so nothing shows yet.

  5. Add your own Feedback button, hidden until DropComments.ready says a token came, opening the panel for your team and the short form for everyone else:

    <button id="feedback" hidden>Feedback</button>
    
    const button = document.getElementById("feedback");
    if (await DropComments.ready) {
      button.hidden = false;
      button.addEventListener("click", () => DropComments.open());
    }

    Put it wherever it fits your app: a header, a menu, a settings screen. The panel, the form and the pins are the script’s.

  6. If your pages send a Content-Security-Policy, allow DropComments:

    script-src https://dropcomments.com;
    connect-src https://dropcomments.com wss://dropcomments.com;

Or let your coding agent do it. Adding your app shows a brief with your key and project ids already in; paste it to the agent building your app and it adds the endpoint, the script and the button.

Reference

The token

Your server calls POST https://dropcomments.com/api/app/token with the app’s key as a bearer token. project is required, by id. user is whoever is signed in; leave out the name and the panel asks for one. team decides which tools they get. A token lasts an hour, and the script asks your endpoint for a new one before it runs out.

{
  "project": "YOUR_PROJECT_ID",
  "user": {"id": "u_123", "name": "Sam Lee"},
  "team": true
}
// → {"token": "dct.…", "expiresAt": …, "team": true, "project": {…}}

Script options

data-token-url is your endpoint, fetched with the page’s cookies; it can answer the token’s JSON or the token as plain text. data-ui="none" shows nothing at all, for your own form: send what it collects with DropComments.send(). From a computer, the team’s comments bring a copy of the page beside the picture: in the Drop, the page button shows it, scrolling and with text that can be selected, and an agent reads its words. data-capture="picture" sends the picture only. Phones and tablets always do.

<script src="https://dropcomments.com/live.js"
  data-token-url="/api/feedback-token"
  data-capture="picture"></script>

JavaScript

Everything is on window.DropComments once the script loads. ready says whether a token came, so you show your button only then.

await DropComments.ready; // true once a token came
DropComments.open();  // the team’s panel, or everyone else’s form
DropComments.close();
await DropComments.send({text: "The total is wrong", picture: true});
await DropComments.link(); // the team’s feedback in DropComments, or null

Your app’s look

Your Feedback button is yours to style. Set these on :root and the panel, the form and the pins take them too. The rest: --dc-muted, --dc-line, --dc-soft, --dc-on-accent, --dc-accent-text, --dc-pin, --dc-on-pin and --dc-button-radius.

:root {
  --dc-font: "Inter", sans-serif;
  --dc-surface: #ffffff;
  --dc-text: #111827;
  --dc-accent: #4f46e5;
  --dc-radius: 12px;
}

Keeping things private

A comment carries a picture of the screen, so it shows what’s on it, typed text too (passwords as dots). Mark anything that must never leave your app and it’s a grey box in the picture, and left out of the copy of the page. The copy has no scripts and leaves typed fields blank.

<div data-dc-hide>
  Card ending 4242
</div>

What you get

Your team, testing a build

Pin, box or draw on the app as it runs, on a computer or a phone. Each comment carries a picture of the screen with the spot marked, and from a computer a copy of the page too, so “it’s broken here” is enough.

The people using it

A short form with Point at it and a picture of the screen. They never see anyone else’s feedback, and their picture goes only if they leave it ticked.

Beta testers and clients

Sign in the people you’re trying it with and decide who counts as the team. A client reviewing a staging site leaves notes right on it.

Fixed by an agent

A coding agent connected to DropComments reads each comment and the page it was made on, makes the change, and replies. The reply shows up in the app.

In your app’s look

The people’s form takes your colours, font and corners from a few CSS variables, or use your own form and send it with one call.

Your key stays yours

The key lives on your server, never in a page. Feedback is only taken from your app’s addresses, limited per person, and each project chosen by its id.

Questions

Does it work with any app?

Any web app with a server and people who sign in: the server tells DropComments who each person is. Games and other apps drawn on a canvas work too; the board comes through as a picture.

What does a team comment send?

A picture of the screen as it was, with anything you mark data-dc-hide greyed out. From a computer, a copy of the page beside it too (unless you set data-capture="picture"): its styles and pictures inside and no scripts, with typed fields left blank and anything marked data-dc-hide left out, plus a picture of the spot. The Drop shows the picture, and a desktop can switch to the page. The picture is drawn by the script from the page’s layout, so it’s close but not exact: transforms, filters and ::before or ::after content come out plain. Its screen also keeps where it was made: the page’s address (without its #fragment), its title, the window’s size and the browser.

Can I keep customers’ and the team’s feedback apart?

Yes. An app can send into several projects, and its server says which for each person, so the team’s goes into one and everyone else’s into another.

What does it cost?

It’s on every plan. On the free plan each Drop of feedback is open for a day, and a new one starts after; Pro keeps them open and private.

Keep reading

Try it with your next file.

It takes about ten seconds to get a link.

Drop a file