Skip to content

dialectlabs/feedback-blink

Repository files navigation

Feedback Blink

A Solana Blink application that demonstrates message signing functionality by collecting user feedback and storing it in a database. Built with Next.js, Tailwind CSS, and Prisma for database management.

📺 Watch the Tutorial

Feedback Blink Tutorial

▶️ Watch: Building a Feedback Blink with Message Signing

Overview

This application showcases how to implement message signing in Solana Blinks. Unlike memo-based Blinks that store data on-chain, this project demonstrates how to sign a message and store feedback data in a traditional database. This approach is perfect for applications that need data from users without the cost and permanence of on-chain storage.

Prerequisites

  • Node.js 18+
  • npm, yarn, pnpm, or bun
  • A Solana wallet (no SOL required - message signing is free!)

Getting Started

  1. Clone the repository:
git clone https://github.com/dialectlabs/feedback-blink.git
cd feedback-blink
  1. Install dependencies:
npm install
  1. Set up your environment variables:
cp .env.example .env

Edit the .env file with your configuration:

  • Database URL for Prisma
  • Solana RPC endpoint
  • Any other required environment variables
  1. Set up the database:
npx prisma generate
npx prisma db push
  1. Run the development server:
npm run dev
  1. Open http://localhost:3000 to view the application.

Project Structure

src/
├── app/
│   ├── api/actions/feedback/    # Blink action endpoints
│   ├── components/              # React components
│   ├── mini/                   # Mini app interface
│   └── page.tsx                # Main page
├── lib/
│   └── prisma.ts              # Database client
└── generated/prisma/          # Generated Prisma client

prisma/
├── schema.prisma              # Database schema
└── migrations/                # Database migrations

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint

License

MIT

About

Blink that collects user feedback and saves it in a database. (watch full tutorial: https://docs.dialect.to/blinks/blinks-provider/guides/feedback-blink)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published