Skip to content

roALAB1/spark-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

87 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

🎯 AudienceLab Vibe Platform

Complete AudienceLab Dashboard Clone - A production-ready platform that replicates the entire AudienceLab dashboard experience, enabling customers to build white-label solutions using AudienceLab's APIs.

TypeScript React tRPC License


πŸš€ Live Demo

Dashboard URL: View Live Demo


πŸ“‹ Overview

AudienceLab Vibe Platform is a complete dashboard clone built using clean room implementation methodology. We've researched and documented every feature of the AudienceLab dashboard at https://build.audiencelab.io and recreated it from scratch using modern web technologies.

🎯 What Makes This Special

  • βœ… Clean Room Implementation - Built by observing the UI/UX, not copying code
  • βœ… One-to-One Feature Parity - Matches AudienceLab's dashboard exactly
  • βœ… Modern Tech Stack - React 19, TypeScript, tRPC, Tailwind CSS 4
  • βœ… Fully Documented - 700+ lines of specifications for audience filters alone
  • βœ… Production Ready - Authentication, database, and deployment configs included
  • βœ… White-Label Ready - Customize branding, domain, and features

🎯 Features

βœ… Implemented Features

1. Spark V2 - Smart Query Assistant

  • Intent Search mode (find people based on interests)
  • B2B Search mode (find companies)
  • Query validation with 7 rules
  • Advanced options (context phrases, lens, granularity)

2. Enrichments - Data Enrichment

  • CSV upload with drag-and-drop
  • Multi-field column mapping (48 AudienceLab fields)
  • OR/AND match logic
  • Real-time job status tracking
  • Results table with all 74 enriched fields
  • CSV download of enriched data

3. Audiences - Audience Management

  • List view with 7-column sortable table
  • Status badges (No Data, Completed, Generating, Failed)
  • Pagination and search
  • Create audience dialog
  • Refresh and delete actions

4. Pixels - Tracking Pixel Management

  • 3-column table (Website Name, URL, Last Sync)
  • Install URLs with copy-to-clipboard
  • Create and delete pixels
  • Action buttons (See Resolutions, Install, Webhook)

🚧 In Progress

5. Vibe Code (Audience Creation) - Filter Builder

  • Phase 1: Research Complete βœ…

    • All 9 filter categories documented
    • 700+ lines of comprehensive specifications
    • TypeScript interfaces for all filter types
  • Phase 2: Basic UI Complete βœ…

    • Create Audience dialog (name-only input)
    • Filter Builder page with 9 category tabs
    • Empty state with "Build Audience" CTA
    • Preview and Generate Audience buttons
  • Phase 3: Filter Modals (Next)

    • Business filters (7 fields with AI keyword generator)
    • Location filters (Cities, States, Zip Codes)
    • Intent filters (Premade, Keyword, Custom methods)
    • Contact filters (5 toggle switches)
    • Personal, Financial, Family, Housing filters

Filter Categories:

  1. Intent - Target by interests and behaviors (3 methods: Premade, Keyword, Custom)
  2. Date - Time-based filters (placeholder)
  3. Business - Job titles, seniority, departments, company info, industries
  4. Financial - Income, net worth, credit rating, investments, occupation
  5. Personal - Age range, gender, ethnicity, language, education, smoker status
  6. Family - Marital status, children, generations in household
  7. Housing - Homeowner status, dwelling type, home value, purchase info
  8. Location - Cities, states, zip codes
  9. Contact - Email and phone verification toggles

πŸ—οΈ Tech Stack

Technology Version Purpose
React 19.1.1 UI library with latest features
TypeScript 5.9.3 Type safety across the stack
tRPC 11.6.0 End-to-end type-safe APIs
React Query 5.90.2 Data fetching and caching
Tailwind CSS 4.0.0 Utility-first styling
shadcn/ui Latest Beautiful, accessible UI components
Wouter Latest Lightweight routing
Drizzle ORM 0.44.5 Type-safe database queries
Vitest Latest Unit testing framework

πŸ“¦ Installation

Prerequisites

  • Node.js 22+ (recommended)
  • pnpm 10.4.1+
  • AudienceLab API key

Setup

# Clone the repository
git clone https://github.com/roALAB1/AudienceVibe.git
cd AudienceVibe

# Install dependencies
pnpm install

# Set up environment variables
cp .env.example .env.local

# Add your AudienceLab API key to .env.local
# AUDIENCELAB_API_KEY=your_api_key_here
# VITE_AUDIENCELAB_API_KEY=your_api_key_here

# Run database migrations (if using database features)
pnpm db:push

# Start development server
pnpm dev

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


πŸ”§ Configuration

Environment Variables

Create a .env.local file with the following:

# AudienceLab API
AUDIENCELAB_API_KEY=your_api_key_here
VITE_AUDIENCELAB_API_KEY=your_api_key_here

# Database (MySQL/TiDB)
DATABASE_URL=mysql://user:password@host:port/database

# Authentication (Manus OAuth)
JWT_SECRET=your_jwt_secret
OAUTH_SERVER_URL=https://oauth.manus.im
VITE_OAUTH_PORTAL_URL=https://portal.manus.im

# App Configuration
VITE_APP_TITLE=AudienceLab Vibe Platform
VITE_APP_LOGO=/logo.svg

πŸ“š Documentation

Project Documentation

API Documentation


πŸ§ͺ Testing

# Run all tests
pnpm test

# Run tests in watch mode
pnpm test:watch

# Run tests with coverage
pnpm test:coverage

# Type checking
pnpm check

🎨 Development

Project Structure

audiencelab-enrichment/
β”œβ”€β”€ client/                 # Frontend React app
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ pages/         # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ SparkPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ EnrichmentsPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ EnrichmentUploadPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AudiencesPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AudienceFilterBuilderPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PixelsPage.tsx
β”‚   β”‚   β”‚   └── ChangelogPage.tsx
β”‚   β”‚   β”œβ”€β”€ components/    # Reusable UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ audiences/ # Audience-specific components
β”‚   β”‚   β”‚   β”œβ”€β”€ ui/        # shadcn/ui components
β”‚   β”‚   β”‚   └── DashboardLayout.tsx
β”‚   β”‚   β”œβ”€β”€ types/         # TypeScript type definitions
β”‚   β”‚   β”‚   β”œβ”€β”€ audience-filters.ts
β”‚   β”‚   β”‚   └── audience.ts
β”‚   β”‚   β”œβ”€β”€ lib/           # Utilities and helpers
β”‚   β”‚   └── App.tsx        # Main app component
β”œβ”€β”€ server/                # Backend tRPC server
β”‚   β”œβ”€β”€ routers/           # API route handlers
β”‚   β”‚   └── audiencelab.ts # Main AudienceLab API router
β”‚   β”œβ”€β”€ audienceLabRouter.ts # Legacy enrichment router
β”‚   β”œβ”€β”€ db.ts              # Database queries
β”‚   └── _core/             # Core server utilities
β”œβ”€β”€ shared/                # Shared types and constants
β”‚   β”œβ”€β”€ audiencelab-types.ts   # Complete API type definitions
β”‚   └── audiencelab-client.ts  # API client with retry logic
β”œβ”€β”€ drizzle/               # Database schema and migrations
β”œβ”€β”€ tests/                 # Test files
└── docs/                  # Documentation

Available Scripts

pnpm dev          # Start development server
pnpm build        # Build for production
pnpm start        # Start production server
pnpm test         # Run tests
pnpm check        # Type check
pnpm format       # Format code with Prettier
pnpm db:push      # Push database schema changes

πŸš€ Deployment

Manus (Recommended)

This project is optimized for deployment on Manus:

  1. Create a checkpoint: webdev_save_checkpoint
  2. Click "Publish" in the Manus UI
  3. Your app will be live with custom domain support

Vercel

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

Docker

# Build image
docker build -t audiencelab-vibe .

# Run container
docker run -p 3000:3000 --env-file .env.local audiencelab-vibe

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • AudienceLab - For providing the API and platform inspiration
  • Manus - For the development environment and deployment infrastructure
  • shadcn/ui - For beautiful, accessible UI components
  • tRPC - For type-safe API development

πŸ“ž Support

For questions or support:


🎯 Roadmap

Phase 1: Core Features (Complete βœ…)

  • Project setup with React 19 + TypeScript
  • API client with retry logic and error handling
  • Spark V2 - Smart Query Assistant
  • Enrichments - CSV upload and multi-field matching
  • Audiences - List view with search and pagination
  • Pixels - Management with install URLs

Phase 2: Vibe Code (Audience Creation) - In Progress 🚧

  • Complete research on all 9 filter categories
  • TypeScript types for all filters
  • Basic UI (Create dialog + Filter Builder page)
  • Business filters modal
  • Location filters modal
  • Intent filters modal
  • Contact filters modal
  • Personal, Financial, Family, Housing filters
  • Preview functionality (estimate audience size)
  • Generate Audience action
  • API integration

Phase 3: Advanced Features

  • Segments - View and export segment data
  • Workflows - Automation builder
  • Sync - Integrations (Google Sheets, Facebook Ads)
  • Studio - Advanced audience segmentation
  • Team collaboration features
  • Custom reporting and analytics

Phase 4: Production Hardening

  • Error tracking (Sentry)
  • Analytics (PostHog)
  • Rate limiting
  • Database caching
  • Integration tests
  • CI/CD pipeline
  • Performance optimization

πŸ“Š Project Status

Feature Status Completion
Spark V2 βœ… Complete 100%
Enrichments βœ… Complete 100%
Audiences (List) βœ… Complete 100%
Pixels βœ… Complete 100%
Vibe Code (Filters) 🚧 In Progress 30%
Segments ⏳ Planned 0%
Workflows ⏳ Planned 0%
Sync ⏳ Planned 0%
Studio ⏳ Planned 0%

Built with ❀️ for the AudienceLab community

About

Spark V2 - Smart Query Assistant with Quality Checking for AudienceLab

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages