Skip to content

gratitude5dee/DeepBookingv1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DeepBooking

Next.js Supabase Groq TypeScript Tailwind CSS

AI-Powered Venue Booking Platform

An intelligent, end-to-end solution for discovering, negotiating, and managing venue bookings for artists and event organizers.

Live Demo β€’ Documentation β€’ API Reference β€’ Contributing

Deploy with Vercel


Overview

DeepBooking revolutionizes the venue booking process through intelligent automation and AI-driven recommendations. Built for artists, event organizers, and venue owners, it provides a comprehensive platform that handles everything from initial venue discovery to contract finalization and payment processing.

The platform leverages cutting-edge AI technologies to provide context-aware venue suggestions, automated negotiation workflows, and intelligent contract managementβ€”all wrapped in a visually stunning interface powered by modern shader technology and responsive design.

✨ Key Features

🧠 AI-Powered Intelligence

  • Smart Venue Recommendations: Context-aware suggestions using Groq AI based on event requirements, budget, and preferences
  • Automated Negotiation: AI-assisted communication workflows for efficient booking negotiations
  • Predictive Analytics: Revenue forecasting, demand analysis, and optimal pricing suggestions

πŸ”„ Complete Booking Lifecycle

  • End-to-End Management: Track bookings from initial inquiry through event completion
  • Contract Automation: Generate, customize, and manage performance contracts with e-signature integration
  • Payment Processing: Automated payment link generation and tracking with multiple gateway support

πŸ“§ Advanced Communication

  • AgentMail Integration: Unique email addresses per booking for streamlined communication
  • Automated Workflows: Template-based email sequences for different booking stages
  • Communication History: Complete audit trail of all booking-related correspondence

πŸ—ΊοΈ Interactive Discovery

  • Mapbox Integration: Geographic visualization of venues with detailed information overlays
  • Advanced Search: Filter by location, capacity, amenities, price range, and availability
  • 360Β° Venue Views: Immersive venue exploration with high-quality imagery

πŸ“Š Comprehensive Analytics

  • Revenue Dashboards: Track booking performance, revenue trends, and growth metrics
  • Venue Analytics: Performance metrics, booking success rates, and market analysis
  • Artist Insights: Audience demographics, market penetration, and tour optimization

🏒 Dual-Sided Platform

  • Artist Dashboard: Booking management, analytics, and revenue tracking
  • Venue Owner Portal: Listing management, booking calendar, and performance analytics

πŸ—οΈ Architecture

graph TD
    A[Next.js Frontend] --> B[Supabase Backend]
    B --> C[PostgreSQL Database]
    B --> D[Authentication & RLS]
    A --> E[Groq AI API]
    A --> F[AgentMail Service]
    A --> G[Mapbox Maps]
    B --> H[Edge Functions]
    H --> I[Email Processing]
    H --> J[Payment Logic]
    H --> K[Contract Generation]
Loading

Core Technologies:

Layer Technology Purpose
Frontend Next.js 15 (App Router) React framework with server components
Language TypeScript 5.x Type safety and developer experience
Styling Tailwind CSS + shadcn/ui Utility-first CSS with component library
Backend Supabase Database, authentication, and edge functions
Database PostgreSQL Relational database with RLS policies
AI Engine Groq Fast AI inference for venue recommendations
Email AgentMail Unique email addresses and workflow automation
Maps Mapbox Interactive venue mapping and geolocation
Animation Framer Motion + Shaders Smooth animations and visual effects
Deployment Vercel Serverless deployment platform

πŸš€ Quick Start

Prerequisites

  • Node.js 18.18+
  • pnpm (recommended) or npm/yarn
  • Supabase account and project
  • Groq API key
  • AgentMail account and configuration
  • Mapbox access token

Installation

  1. Clone and Install

    git clone https://github.com/gratitude5dee/DeepBookingv1.git
    cd DeepBookingv1
    pnpm install
  2. Environment Setup

    cp .env.local.example .env.local

    Configure your environment variables:

    # Supabase Configuration
    NEXT_PUBLIC_SUPABASE_URL=your-supabase-project-url
    NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
    
    # AI Services
    GROQ_API_KEY=your-groq-api-key
    
    # Email Service
    AGENTMAIL_DOMAIN=your-domain.com
    AGENTMAIL_FROM_NAME=DeepBooking
    AGENTMAIL_BASE_URL=https://api.agentmail.to
    AGENTMAIL_API_KEY=your-agentmail-api-key
    AGENTMAIL_DEV_MODE=true
    
    # Mapping Service
    NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN=your-mapbox-token
  3. Database Setup

    Execute the SQL scripts in your Supabase SQL Editor in order:

    scripts/001_create_booking_schema.sql
    scripts/002_seed_venues.sql
    scripts/003_create_functions.sql
    scripts/004_add_agentmail.sql
    scripts/005_agentmail_alias_id.sql
  4. Start Development

    pnpm dev

    Navigate to http://localhost:3000

πŸ“ Project Structure

deepbooking/
β”œβ”€β”€ app/                      # Next.js App Router
β”‚   β”œβ”€β”€ api/                 # Backend API endpoints
β”‚   β”‚   β”œβ”€β”€ agentmail/       # Email service integration
β”‚   β”‚   β”œβ”€β”€ bookings/        # Booking management
β”‚   β”‚   β”œβ”€β”€ contracts/       # Contract operations
β”‚   β”‚   β”œβ”€β”€ payments/        # Payment processing
β”‚   β”‚   └── groq/           # AI recommendations
β”‚   β”œβ”€β”€ auth/               # Authentication pages
β”‚   └── dashboard/          # Protected dashboard routes
β”œβ”€β”€ components/             # React components
β”‚   β”œβ”€β”€ ui/                # Base UI components (shadcn/ui)
β”‚   β”œβ”€β”€ booking/           # Booking-specific components
β”‚   β”œβ”€β”€ venue/             # Venue management components
β”‚   └── analytics/         # Analytics and charts
β”œβ”€β”€ lib/                   # Core libraries and utilities
β”‚   β”œβ”€β”€ email/            # Email client (AgentMail)
β”‚   β”œβ”€β”€ supabase/         # Database client and middleware
β”‚   └── groq-api-manager.ts # AI service manager
β”œβ”€β”€ scripts/              # Database SQL scripts
β”‚   β”œβ”€β”€ 001_create_booking_schema.sql
β”‚   β”œβ”€β”€ 002_seed_venues.sql
β”‚   └── ...
└── public/              # Static assets

πŸ”Œ API Reference

Booking Management

// Create new booking inquiry
POST /api/bookings
{
  "venueId": "string",
  "eventDate": "ISO date",
  "requirements": "string",
  "budget": "number"
}

// Update booking status
PATCH /api/bookings/[id]
{
  "status": "pending" | "negotiating" | "confirmed" | "completed",
  "notes": "string"
}

AI Recommendations

// Get venue recommendations
POST /api/groq/recommend
{
  "eventType": "string",
  "location": "string",
  "capacity": "number",
  "budget": "number",
  "date": "ISO date"
}

Contract Management

// Generate contract
POST /api/contracts
{
  "bookingId": "string",
  "terms": "ContractTerms",
  "template": "standard" | "premium"
}

// Send contract for signature
POST /api/contracts/send
{
  "contractId": "string",
  "recipient": "email",
  "deadline": "ISO date"
}

Payment Processing

// Create payment link
POST /api/payments
{
  "bookingId": "string",
  "amount": "number",
  "description": "string",
  "dueDate": "ISO date"
}

πŸ—„οΈ Database Schema

Core Tables

venues

  • Comprehensive venue information with amenities, capacity, and pricing
  • Geographic data for mapping integration
  • Availability calendar and booking rules

booking_queries

  • Central booking management with status tracking
  • Integration with email workflows and contracts
  • Revenue and analytics data

contracts

  • Digital contract storage and version control
  • E-signature integration and status tracking
  • Template management system

payment_links

  • Payment processing and status tracking
  • Integration with multiple payment gateways
  • Automated reminder workflows

agentmail_inboxes

  • Unique email address management per booking
  • Email threading and conversation tracking
  • Automated response templates

Security & Privacy

  • Row Level Security (RLS): User-specific data access controls
  • API Rate Limiting: Prevents abuse and ensures fair usage
  • Data Encryption: End-to-end encryption for sensitive information
  • Audit Logging: Complete audit trail for compliance

πŸ§ͺ Testing

# Run all tests
pnpm test

# Run with coverage
pnpm test:coverage

# Run specific test suite
pnpm test booking

# Run E2E tests
pnpm test:e2e

# Test API endpoints
pnpm test:api

πŸš€ Deployment

Production Deployment

  1. Vercel Deployment

    # Connect to Vercel
    vercel link
    
    # Set environment variables
    vercel env add GROQ_API_KEY
    vercel env add AGENTMAIL_API_KEY
    # ... add all production variables
    
    # Deploy
    vercel --prod
  2. Supabase Production

    # Link production project
    supabase link --project-ref your-prod-ref
    
    # Push schema
    supabase db push
    
    # Deploy edge functions
    supabase functions deploy
  3. Domain Configuration

    • Configure custom domain in Vercel
    • Update CORS settings in Supabase
    • Configure AgentMail domain settings

Environment Variables (Production)

NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-production-anon-key
GROQ_API_KEY=your-production-groq-key
AGENTMAIL_DOMAIN=bookings.yourdomain.com
AGENTMAIL_API_KEY=your-production-agentmail-key
AGENTMAIL_DEV_MODE=false
NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN=your-production-mapbox-token

πŸ“Š Performance & Monitoring

  • Core Web Vitals: Optimized for 90+ Lighthouse scores
  • Database Performance: Query optimization with proper indexing
  • Caching Strategy: Edge caching for static content, smart API caching
  • Error Tracking: Comprehensive error monitoring and alerting
  • Analytics Integration: User behavior and conversion tracking

πŸ” Security Features

  • Authentication: Supabase Auth with social login support
  • Authorization: Fine-grained RLS policies
  • Input Validation: Comprehensive request validation
  • Rate Limiting: API abuse prevention
  • Data Privacy: GDPR and CCPA compliant data handling

🀝 Contributing

We welcome contributions from the community! Please read our Contributing Guidelines for details.

Development Workflow

  1. Fork the Repository

    git clone https://github.com/your-username/DeepBookingv1.git
    cd DeepBookingv1
  2. Create Feature Branch

    git checkout -b feature/amazing-feature
  3. Development Setup

    pnpm install
    pnpm dev
  4. Make Changes

    • Follow TypeScript best practices
    • Add tests for new functionality
    • Update documentation as needed
  5. Test Your Changes

    pnpm test
    pnpm lint
    pnpm type-check
  6. Submit Pull Request

    • Use conventional commit messages
    • Include detailed description of changes
    • Reference related issues

Code Standards

  • TypeScript: Strict mode enabled with comprehensive typing
  • ESLint: Enforced code style and best practices
  • Prettier: Consistent code formatting
  • Conventional Commits: Standardized commit messages

πŸ“– Documentation

🚧 Roadmap

Q1 2025

  • Mobile Application: React Native app for iOS and Android
  • Advanced Analytics: Machine learning-powered insights
  • Multi-language Support: Internationalization framework

Q2 2025

  • Event Management: Comprehensive event planning tools
  • Vendor Marketplace: Integrated service provider network
  • Advanced Contracts: Smart contract automation

Q3 2025

  • White-label Solutions: Custom branding for enterprise clients
  • API Marketplace: Third-party integration platform
  • Advanced Reporting: Custom analytics and reporting tools

πŸ“„ License

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

πŸ™ Acknowledgments

  • Supabase: For their incredible open-source backend platform
  • Groq: For lightning-fast AI inference capabilities
  • shadcn/ui: For the beautiful, accessible component library
  • Vercel: For seamless deployment and hosting
  • AgentMail: For innovative email workflow solutions

Ready to revolutionize your booking process?
Get Started Today β€’ Contact Sales

About

Built for YC Hack '25, judged by Jared F. | DeepBooking revolutionizes venue booking process through intelligent automation and AI-driven recommendations. Built for artists, event organizers, and venue owners, it provides a comprehensive platform that handles everything from initial venue discovery to contract finalization and payment processing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages