Skip to content

abriscallbowker/feedchat

Repository files navigation

Feedchat

An interactive chatbot to collect better feedback from your users.

Feedchat asks follow-up questions to understand what users actually think.

All feedback is captured and summarized in your private dashboard.

Search, tag, and export feedback. Turning messy user input into actionable insights.

Feedchat can be used for:

  • Bug report workflows
  • Feature request workflows
  • User cancellation flows
  • An alternative to static surveys and forms
dashboard

Your private dashboard overview

chat-light

Example Feedchat in default light UI

chat-dark

Example Feedback in dark mode UI

chat-dark-example

Example conversation between a user and Feedchat

feedback

Search, tag and export feedback

About the code

This code is open source. Use it as a launchpad to create a custom feedback chatbot.

This codebase contains a self-contained workspace: public chat (apps/public), admin dashboard (apps/dashboard), HTTP API (@feedchat/server, mounted under /api on the public app), and shared UI (packages/ui).

Prerequisites

  • Node.js 20+
  • npm 10+

Currently, the code integrates with OpenAI APIs for LLM functionality and Firebase for authentication and data storage.

To integrate with OpenAI, you will need to create an account at https://platform.openai.com and create two API keys: one for powering Feedchat responses and another for chat summarisation and sentiment scoring -> see .env.example

To integrate with Firebase, you will need to create a project at https://console.firebase.google.com/ and create the following apps/tools inside your project:

  • Authentication (add the Sign-in methods: email/password and Google)
  • Firestore (simply follow the instructions to create a production database in the region you desire)
  • Realtime Database (simply follow the instructions to create a production database in the region you desire)

You do not need to mess with rules or any other logic inside Firebase. The server code handles all document logic.

Quick start

  1. Clone/fork repo
  2. Install dependencies at root of project
npm install
  1. Create a local .env file
cp .env.example .env.local
  1. Follow instructions in the file to create keys
  2. Paste required keys into .env.local file
  3. Run development (local) mode
npm run dev

App structure

Environment variables live in the repository root .env.local. Both Next apps load it via loadEnvConfig in their next.config.ts.

Using a remote API

By default, browser calls on both the Public & Dashboard apps use http://localhost:3002/api (Express API at apps/public/api).

You can set the value NEXT_PUBLIC_FEEDCHAT_API_URL in your .env to use a remote API endpoint, allowing you to migrate the server-side code away from Next.js if desired.

CORS in production

The API’s global CORS allowlist is localhost-oriented by default.

For a production dashboard on another origin, set FEEDCHAT_ALLOWED_ORIGIN_REGEX (see .env.example).

Tenant-scoped routes (e.g. feedback.example.com) still validate the browser Origin against your org hostnames.

Scripts

Command Description
npm run dev Turbo dev (all apps)
npm run build Production build
npm run typecheck TypeScript check

Layout

Path Role
apps/public Feedback page
apps/public/api API logic + routes
apps/dashboard Admin dashboard
apps/server Express API implementation (@feedchat/server)
packages/ui Shared React components
packages/api-base Shared resolveFeedchatApiBase() for clients

Licence

This repository includes an MIT LICENSE (see file header). Replace placeholder marketing/legal links in the dashboard UI before publishing your fork if they still point at third-party domains.

About

Interactive chatbot to collect better user feedback. Customize & link anywhere. Current stack: Next.js, Firebase & OpenAI. Open source.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages