npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

feedget-widget

v1.0.1

Published

Feedget feedback widget for React and Angular applications

Downloads

11

Readme

Feedget Widget

Widget de feedback integrado à API Feedget para coleta de feedback de usuários em aplicações web.

🚀 Funcionalidades

  • Autenticação via API Key: Integração segura com a API Feedget
  • Tipos de Feedback: Suporte para BUG, IDEA e OTHER
  • Screenshots: Captura automática de tela (opcional)
  • Metadata Automática: URL, User Agent, Viewport e dados customizados
  • Tratamento de Erros: Mensagens específicas para diferentes cenários
  • Validação de Entrada: Comentários de 10-1000 caracteres
  • Interface Responsiva: Funciona em desktop e mobile
  • Multi-plataforma: React, Angular, WordPress, Magento

📋 Pré-requisitos

  1. API Key válida: Obtenha no painel Feedget
  2. Assinatura ativa: Necessária para utilizar o widget
  3. Endpoint da API: Por padrão aponta para https://api.feedget.io

📦 Instalação

npm install feedget-widget
# ou
pnpm add feedget-widget
# ou
yarn add feedget-widget

📦 Uso

React

Apenas importe e use - CSS incluído automaticamente:

import { Widget } from 'feedget-widget';

function App() {
  return (
    <Widget apiKey="feedget_pk_live_abc123..." />
  );
}

Com configurações opcionais:

<Widget
  apiKey="feedget_pk_live_abc123..."
  apiUrl="https://api.feedget.io"
  metadata={{
    userId: "user-123",
    version: "1.0.0",
    custom: {
      plan: "premium"
    }
  }}
/>

Angular

1. Configure CUSTOM_ELEMENTS_SCHEMA

No seu app.module.ts:

import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

@NgModule({
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
  // ... outras configurações
})
export class AppModule { }

2. Importe no main.ts

import 'feedget-widget/web';

3. Use no template

<feedget-widget api-key="feedget_pk_live_abc123..."></feedget-widget>

Com configurações opcionais:

<feedget-widget
  api-key="feedget_pk_live_abc123..."
  api-url="https://api.feedget.io"
  metadata='{"userId": "user-123", "version": "1.0.0"}'>
</feedget-widget>

Vanilla JavaScript / HTML

<!DOCTYPE html>
<html>
  <body>
    <feedget-widget api-key="feedget_pk_live_abc123..."></feedget-widget>
    <script type="module" src="https://unpkg.com/feedget-widget/dist/web.es.js"></script>
  </body>
</html>

🔧 API Integration

Endpoint Público

POST /public/feedbacks
X-API-Key: feedget_pk_live_abc123...
Content-Type: application/json

{
  "type": "BUG",
  "comment": "Descrição do problema...",
  "screenshot": "data:image/png;base64,iVBOR...",
  "metadata": {
    "url": "https://exemplo.com/page",
    "userAgent": "Mozilla/5.0...",
    "viewport": { "width": 1920, "height": 1080 },
    "custom": { "userId": "user-123" }
  }
}

Tratamento de Erros

  • 401: API key inválida ou expirada
  • 403: Assinatura necessária
  • 429: Limite de requisições excedido
  • 400: Dados inválidos (comentário muito curto/longo)

📁 Estrutura

src/
├── components/
│   ├── widget.tsx              # Componente principal
│   ├── widget-form/
│   │   ├── index.tsx          # Formulário principal
│   │   ├── steps/
│   │   │   ├── feedback-type-step.tsx    # Seleção de tipo
│   │   │   ├── feedback-content-step.tsx # Envio de feedback
│   │   │   └── feedback-success-step.tsx # Confirmação
│   │   └── screenshot-button.tsx         # Captura de tela
│   ├── close-button.tsx       # Botão fechar
│   └── loading.tsx           # Indicador de carregamento
├── lib/
│   └── api.ts               # Cliente da API Feedget
├── assets/                  # Ícones e imagens
└── global.css              # Estilos globais

🎨 Personalização

Tema

@theme {
  --color-brand-300: #996dff;
  --color-brand-500: #8257e6;
  --radius-md: 4px;
}

Posicionamento

<Widget
  position="bottom-right" // bottom-left, top-right, top-left
  theme="dark"            // light, dark
  borderRadius="16px"
/>

🔒 Segurança

API Keys

  • ✅ Use variáveis de ambiente
  • ✅ Separe chaves dev/prod
  • ✅ Configure expiração adequada
  • ❌ Nunca commit API keys
  • ❌ Não exponha em logs públicos

CSP Headers

Content-Security-Policy: 
  connect-src 'self' https://api.feedget.io;
  img-src 'self' data: https://api.feedget.io;

📊 Monitoramento

Health Check

await feedgetAPI.healthCheck();

Analytics

Feedget.on('feedback:sent', (feedback) => {
  gtag('event', 'feedback_sent', {
    type: feedback.type,
    has_screenshot: !!feedback.screenshot
  });
});

🐛 Troubleshooting

Widget não aparece

  1. Verifique se a API Key está configurada
  2. Confirme se a assinatura está ativa
  3. Verifique o console para erros

Erro 401/403

  1. Valide a API Key
  2. Confirme status da assinatura
  3. Verifique método de pagamento

Performance

  1. Widget carrega em < 2s
  2. API responde em < 500ms
  3. Screenshots são comprimidas automaticamente

📚 Documentação

🤝 Suporte

  • 📧 Email: [email protected]
  • 💬 Chat: https://feedget.io/support
  • 📚 Docs: https://docs.feedget.io
  • 🐛 Issues: https://github.com/feedget/widget/issues

📄 Licença

Este projeto está licenciado sob a Licença MIT.