AI-powered Instagram automation for lead management and sales β built for creators, entrepreneurs, and social media managers to automate responses, manage contacts, and streamline deals.
Pilot is an Instagram automation and deal management platform designed to help creators, entrepreneurs, small businesses, and social media managers transform their Instagram presence into a powerful lead generation and sales engine.
The platform features an AI-powered "Sidekick" that acts as a personalized assistant for managing deals, tracking progress, and providing intelligent recommendations. Users can automate responses to Instagram reels and interactions (e.g., replying 'YES' to receive resources or packages in their inbox), manage contacts with advanced scoring and filtering, and create custom automation workflows for repetitive tasks.
Built with modern web technologies, Pilot emphasizes AI-driven personalization, seamless Instagram integration, and user-friendly automations to streamline social commerce workflows. The platform is currently in active development and focuses on transparency through open-source practices.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Node.js (v18 or higher)
- pnpm package manager
- PostgreSQL database (or compatible like Neon)
- Instagram Developer Account (for API features)
-
Clone the repository
git clone https://github.com/pilot-ops-crm/app.git cd app -
Install dependencies
pnpm install
-
Set up environment variables Copy
.env.exampleto.env.localand configure. -
Set up the database
# Generate and run migrations pnpm db:generate pnpm db:migrate # Optional: Open Drizzle Studio for database inspection pnpm db:studio
-
Start the development server
# Basic development server pnpm dev # Or run all services together (includes Inngest and database studio) pnpm dev:all
The application will be available at http://localhost:3000.
Currently, the project uses manual testing and user acceptance testing. Automated testing setup is planned for future releases.
-
Development Testing
- Run the development server with
pnpm dev - Test core features: Instagram login, contact management, automation creation, sidekick interactions
- Verify database operations and API endpoints
- Run the development server with
-
Integration Testing
- Test Instagram API connections
- Verify webhook functionality
- Test real-time features and chat integration
-
User Journey Testing
- Complete onboarding flow
- Create and test automations
- Manage contacts and view analytics
Run linting and type checking:
# Lint the codebase
pnpm lint
# Type checking
pnpm typecheck-
Instagram Integration
- Connect your Instagram account via OAuth
- Set up automated responses to reels and stories
- Configure lead capture from direct messages
-
Contact Management
- View and organize Instagram contacts in a centralized table
- Score contacts based on engagement and relevance
- Add custom tags and notes for better organization
- Filter and search through your contact database
-
Automation Workflows
- Create custom automation templates
- Set up triggers based on Instagram interactions
- Configure automated responses and follow-ups
- Monitor automation performance and logs
-
AI Sidekick
- Set up your personalized AI assistant
- Configure prompts and behavior preferences
- Use for deal management and recommendations
- Track conversation history and insights
-
Dashboard and Analytics
- Monitor key metrics and performance
- View automation success rates
- Track contact engagement and conversion
- Complete the onboarding process
- Connect your Instagram account
- Set up your first automation (e.g., "YES" response to reels)
- Import or start collecting contacts
- Configure your AI Sidekick preferences
- Monitor and optimize your automations
For detailed guides, see the documentation folder.
The project is configured for deployment on Vercel with the following services:
-
Vercel Deployment
- Connect your repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy automatically on pushes to main branch
-
Required Environment Variables
BETTER_AUTH_SECRET="" BETTER_AUTH_URL="" DATABASE_URL="" GOOGLE_CLIENT_ID="" GOOGLE_CLIENT_SECRET="" POLAR_ACCESS_TOKEN="" POLAR_ORG_SLUG="" INSTAGRAM_CLIENT_ID="" INSTAGRAM_CLIENT_SECRET="" NEXT_PUBLIC_APP_URL="" NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="" CLOUDINARY_API_KEY="" CLOUDINARY_API_SECRET="" GOOGLE_GENERATIVE_AI_API_KEY="" NODE_ENV="development" SENTRY_AUTH_TOKEN="" SENTRY_DSN=""
-
Database Setup
- Use Neon PostgreSQL for production database
- Run migrations on deployment:
pnpm db:migrate
- Monitoring and Error Tracking
- Sentry is configured for error tracking and performance monitoring
- Check Sentry dashboard for any production issues
- Domain Configuration
- Configure custom domain in Vercel
- Update NEXTAUTH_URL to match your domain
- Inngest: For data ingestion and workflow automation
- Polar: For payments and subscriptions
- Cloudinary: For image management and optimization
The main app integrates with the marketing website (pilot-ops.vercel.app) through a secure API connection for waitlist functionality.
To connect the marketing site to this app, you need to set the same token in both repositories:
- Generate a secure token (any random string like
your-super-secret-token-12345) - Add to this app (
pilot-ops-crm/app): SetWAITLIST_API_TOKEN=your-token-herein your.env.local - Add to marketing site (
pilot-ops-crm/website): SetWAITLIST_API_TOKEN=your-token-herein their.env.local
The token can be simple - just make sure it's identical in both places and keep it secure in your environment variables.
- The marketing site collects waitlist signups and sends them to this app's
/api/waitlistendpoint - This app verifies the token and processes the waitlist data
- The marketing site gets a response and shows success/error messages to users
This setup keeps the marketing site lightweight while letting the main app handle all the real data processing.
- Next.js - React Framework with App Router
- React - UI Library (v19.1.1)
- TypeScript - Type Safety
- Node.js - Runtime Environment
- Drizzle ORM - Database Toolkit
- PostgreSQL - Primary Database
- Neon - Serverless PostgreSQL
- Better Auth - Authentication System
- NextAuth.js - Authentication Integration
- Tailwind CSS - Utility-First CSS Framework
- shadcn/ui - Modern UI Components
- Radix UI - Headless UI Components
- Lucide React - Icon Library
- Vercel AI SDK - AI Integration
- Google AI - AI Provider
- Instagram API - Social Media Integration
- Vercel - Deployment Platform
- pnpm - Package Manager
- ESLint - Code Linting
- Sentry - Error Tracking & Performance Monitoring
- React Hook Form - Form Management
- TanStack Table - Data Tables
- Motion - Animation Library
- date-fns - Date Utilities
- Zod - Schema Validation
- ArjunCodess - Project development and maintenance
Note: This project embraces open-source values and transparency. We love open source because it keeps us accountable, fosters collaboration, and drives innovation. For collaboration opportunities or questions, please reach out through the appropriate channels.
- Instagram for providing the API that powers our social media integrations
- Vercel for the excellent deployment platform and AI SDK
- Neon for reliable serverless PostgreSQL hosting
- shadcn/ui and Radix UI for beautiful, accessible component libraries
- Drizzle Team for the powerful ORM toolkit
- Open Source Community for the countless libraries and tools that make modern web development possible
Pilot - Transforming Instagram interactions into business opportunities
Built with β€οΈ for creators and entrepreneurs
