Skip to content

glamboyosa/Pulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pulse

Pulse is a SaaS platform that helps businesses collect authentic voice feedback from customers through simple QR codes. Instead of traditional text surveys, customers scan a QR code and leave voice messages that are automatically transcribed, analyzed for sentiment, and displayed in a real-time dashboard.

🌐 Live at: pulseapp.click

Features

  • 🎀 Voice Feedback Collection - Customers record voice messages via QR code scanning
  • πŸ“ Automatic Transcription - Powered by ElevenLabs Speech-to-Text
  • 😊 Sentiment Analysis - Automatically categorizes feedback as positive, neutral, or negative
  • πŸ“Š Real-Time Dashboard - View all feedback with audio playback and transcripts
  • πŸ”— Unique QR Codes - Each business gets a custom QR code for feedback collection
  • πŸ’³ Credit-Based System - Pay-as-you-go model with Pulse credits
  • πŸ”’ Privacy First - GDPR compliant with encrypted storage
  • πŸ“§ OTP Authentication - Secure email-based login system

Tech Stack

Frontend

Backend

Development Tools

Getting Started

Prerequisites

  • Bun (recommended) or Node.js 18+
  • A Neon database (or PostgreSQL)
  • Cloudflare R2 account (for audio storage)
  • Google Gemini API key
  • Resend API key (for emails)

Installation

  1. Clone the repository:
git clone <repository-url>
cd pulse
  1. Install dependencies:
bun install
  1. Set up environment variables:
cp .env.example .env
  1. Configure your .env file with the required variables (see Environment Variables)

  2. Set up the database:

bun run db:push
  1. Start the development server:
bun run dev

The application will be available at http://localhost:3000

Environment Variables

Create a .env file in the root directory with the following variables:

# Server
SERVER_URL=http://localhost:3000
SESSION_SECRET=your-session-secret-min-32-chars

# Database
DATABASE_URL=your-neon-postgres-connection-string

# Email (Resend)
SERVER_RESEND_API_KEY=your-resend-api-key

# AI (Google Gemini)
SERVER_GEMINI_API_KEY=your-gemini-api-key

# Speech-to-text (ElevenLabs)
ELEVEN_LABS_API_KEY=your-elevenlabs-api-key

# Storage (Cloudflare R2)
CLOUDFLARE_ACCOUNT_ID=your-cloudflare-account-id
CLOUDFLARE_ACCESS_KEY_ID=your-r2-access-key-id
CLOUDFLARE_SECRET_ACCESS_KEY=your-r2-secret-access-key
CLOUDFLARE_R2_BUCKET_NAME=your-bucket-name

# Payments (Polar.sh)
POLAR_API_KEY=your-polar-api-key

# Client
NEXT_PUBLIC_APP_TITLE=Pulse
NEXT_PUBLIC_APP_URL=http://localhost:3000

Database Setup

This project uses Neon (serverless PostgreSQL) with Drizzle ORM.

Database Commands

# Generate migrations
bun run db:generate

# Push schema changes to database
bun run db:push

# Run migrations
bun run db:migrate

# Open Drizzle Studio (database GUI)
bun run db:studio

Neon Setup

Create a Neon Postgres database, copy the connection string into DATABASE_URL, then run bun run db:push to apply the Drizzle schema.

Project Structure

pulse/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/[[...slugs]]/   # Elysia API mounted inside Next.js
β”‚   β”œβ”€β”€ dashboard/          # Business dashboard
β”‚   β”œβ”€β”€ f/[id]/             # Public QR-code feedback page
β”‚   β”œβ”€β”€ login/              # OTP login page
β”‚   └── ...                 # Other App Router routes
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/          # React components
β”‚   β”‚   β”œβ”€β”€ ui/             # Shadcn UI components
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ lib/                # Utility libraries
β”‚   β”‚   β”œβ”€β”€ ai/             # AI integrations (ElevenLabs + Gemini)
β”‚   β”‚   β”œβ”€β”€ storage/        # Storage utilities (R2)
β”‚   β”‚   └── utils/          # Helper utilities
β”‚   β”œβ”€β”€ db/                 # Database schema and migrations
β”‚   β”œβ”€β”€ emails/             # React Email templates
β”‚   β”œβ”€β”€ contexts/           # React contexts (Auth, etc.)
β”‚   └── styles.css          # Global styles
β”œβ”€β”€ public/                 # Static assets
└── package.json

Available Scripts

# Development
bun run dev              # Start dev server on port 3000

# Building
bun run build           # Build for production
bun run start           # Start production server

# Database
bun run db:generate     # Generate migrations
bun run db:push         # Push schema to database
bun run db:migrate      # Run migrations
bun run db:studio       # Open Drizzle Studio

# Code Quality
bun run lint            # Run ESLint
bun run format          # Format with Prettier
bun run check           # Format and lint

# Tunnels
bun run dev:tunnel      # Expose local app with ngrok

Key Features Implementation

Authentication

  • OTP-based email authentication
  • Session management with HTTP-only cookies
  • Protected dashboard routes via server-side auth checks

Voice Feedback

  • Real-time audio streaming (WhatsApp-like experience)
  • Chunks uploaded every 2 seconds during recording
  • Automatic transcription with ElevenLabs Speech-to-Text
  • Sentiment analysis with Google Gemini (positive/neutral/negative)
  • Customer name extraction from transcripts with Google Gemini

Storage

  • Audio files stored in Cloudflare R2
  • Presigned URLs for secure access
  • Unique keys per feedback: feedback/{userId}/{feedbackId}/audio.webm

Payments

  • Credit-based system (Pulses)
  • Integration with Polar.sh for payment processing
  • Packages: 10, 25, 50, 100 pulses

Adding Components

This project uses Shadcn UI. To add new components:

pnpx shadcn@latest add button
pnpx shadcn@latest add card
# etc.

Type Safety

  • Environment Variables: Type-safe with @t3-oss/env-core
  • API Routes: End-to-end type safety with Eden Treaty
  • Database: Type-safe queries with Drizzle ORM
  • Forms: Schema validation with Zod

Learn More

License

Private - All rights reserved


Built with ❀️ by Timothy Osaretin Ogbemudia

About

Pulse is a SaaS platform that helps businesses collect voice feedback from customers through simple QR codes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors