An AI-driven social media automation platform designed to streamline Instagram engagement. Built with a modern serverless architecture on Next.js, AutoReach seamlessly processes Instagram webhooks to trigger intelligent, context-aware direct messages and comment replies powered by OpenAI.
- Intelligent Keyword Matching: Real-time webhook architecture intercepts Instagram comments and direct messages to selectively trigger automated workflows based on target phrases.
- Context-Aware AI Responses: Integrates with OpenAI's GPT-4o models to parse conversation histories and generate highly contextualized, natural language replies.
- Idempotent Webhook Processing: Robust backend routing guarantees reliable message delivery and state synchronization across Meta's Graph API.
- Secure Authentication & Billing: Implements enterprise-grade identity management using Clerk, coupled with a frictionless subscription engine powered by Stripe.
- Type-Safe Data Layer: Leverages Prisma ORM paired with a serverless Neon PostgreSQL database to ensure rigid data integrity and high availability.
- Framework: Next.js 15 (App Router, Server Actions)
- Language: TypeScript (Strict Mode)
- Database: PostgreSQL (Neon Serverless) / Prisma ORM
- Authentication: Clerk
- Payments: Stripe
- AI/LLM: OpenAI API (gpt-4o)
- Styling: Tailwind CSS / Radix UI Primitives
- Deployment: Vercel (Edge Network / CI/CD pipeline integrated)
AutoReach/
├── prisma/ # Schema definitions and database migration state
├── public/ # Static assets and screenshot repository
├── src/
│ ├── actions/ # Server Actions defining core business logic
│ ├── app/ # Next.js App Router (Protected & Public boundaries)
│ │ └── api/ # Stateless route handlers (Webhook ingestion points)
│ ├── components/ # Reusable, accessible UI blocks
│ └── lib/ # SDK initializations (OpenAI, Prisma, Stripe)
├── .github/workflows/ # CI/CD pipelines enforcing static analysis tests
└── .env.example # Security schema documentation
Clone the repository and install dependencies natively via pnpm:
git clone https://github.com/Kk120306/AutoReach.git
cd AutoReach
pnpm install --frozen-lockfileCopy the reference schema and populate it with your localized API keys:
cp .env.example .envEnsure the following critical configurations are provided:
DATABASE_URL(PostgreSQL connection string)NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY&CLERK_SECRET_KEYOPENAI_API_KEYINSTAGRAM_CLIENT_ID&INSTAGRAM_CLIENT_SECRET
Initialize the Prisma schema and synchronize the client bindings:
pnpm prisma generate
pnpm prisma db pushStart the local build environment:
pnpm devNavigate to http://localhost:3000 to access the application.
The repository strictly enforces static analysis via GitHub actions. You can independently verify pipeline readiness prior to commit:
pnpm type-check
pnpm lint
pnpm build