Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GrowthPilot AI

AI-powered, enterprise-grade marketing and business management SaaS platform.

Built with Next.js 14, React 18, TypeScript, Supabase, PostgreSQL, and OpenAI — designed for agencies, startups, and growing businesses that need CRM, SEO, AI content, analytics, and marketing automation in one unified dashboard.

Next.js TypeScript Supabase PostgreSQL OpenAI Tailwind CSS Playwright License


Screenshots

Dashboard & Analytics

Dashboard Analytics
Dashboard Analytics

AI & Content Studio

AI Content Studio Reports & Intelligence
AI Content Studio Reports

Social Media & Search

Social Media Search Console
Social Media Search Console

CRM & Business

Team Management Invoices & Billing
Team Management Invoices

Integrations & Administration

Integrations Security
Integrations Security
Developer Portal WordPress Manager
Developer Portal WordPress
Shopify Help Center
Shopify Help
Login
Login

Core Modules

Module Description Data Status
Dashboard KPI overview, quick actions, AI assistant Mixed (real user, mock metrics)
CRM Leads, pipeline, tasks, deals ✅ Real Supabase data
Clients Client management, contacts, notes ✅ Real Supabase data
Campaigns / Ads Campaign management, audiences, A/B testing ✅ Real Supabase data
SEO Keywords, audit, backlinks, competitors ✅ Real Supabase data
AI Studio Content generation, prompts, templates, workflows UI complete (requires OpenAI key)
Analytics Traffic, funnels, realtime UI complete (requires Google Analytics)
Search Console Queries, coverage, vitals UI complete (requires GSC credentials)
Social Media Post scheduling, calendar, inbox UI complete (mock data)
Commerce Products, orders, customers UI complete (mock / Shopify API)
Email Campaigns, automation, templates UI complete (mock data)
Reports Executive, scheduled, custom UI complete (mock data)
Billing Subscriptions, invoices, Stripe UI complete (requires Stripe keys)
WordPress Sites, plugins, backups UI complete (requires WP REST API)
Team Members, roles, audit log UI complete (mock data)
Admin User management, feature flags, system health UI complete (mock data)
Integrations Marketplace, API keys, webhooks UI complete (mock data)
Developer API explorer, SDK docs, rate limits UI complete
Monitoring Error tracking, queues, API health UI complete (mock data)
Notifications In-app, email preferences UI complete (mock data)

Technology Stack

Frontend

  • Next.js 14 — App Router, Server Components, Server Actions
  • React 18 — Component architecture
  • TypeScript 5 — Full strict-mode type safety
  • Tailwind CSS — Utility-first styling
  • shadcn/ui + Radix UI — Accessible component library
  • Recharts — Data visualization
  • Zustand — Client state management
  • React Hook Form + Zod — Form handling and validation

Backend

  • Supabase — Auth, database, storage, realtime
  • PostgreSQL — 70+ tables, 38 migrations
  • Row Level Security — Workspace-scoped data isolation
  • Server Actions — 57+ action files with validation
  • REST API — Public endpoints with Bearer auth

AI

  • OpenAI GPT — Content generation, chat, analysis
  • Streaming SSE — Real-time AI responses
  • Whisper — Speech-to-text
  • Prompt library — Reusable templates

Infrastructure

  • Turborepo — Monorepo build system
  • PNPM — Fast package management
  • Docker — Containerized deployment
  • GitHub Actions — CI/CD pipelines
  • Playwright — End-to-end testing

Architecture Overview

┌────────────────────────────────────────────────┐
│                   Browser                       │
└─────────────────────┬──────────────────────────┘
                      │
┌─────────────────────▼──────────────────────────┐
│              Next.js 14 App Router              │
│  ┌──────────┐  ┌──────────┐  ┌──────────────┐ │
│  │  Server  │  │  Client  │  │  API Routes  │ │
│  │Components│  │Components│  │  /api/*      │ │
│  └────┬─────┘  └──────────┘  └──────┬───────┘ │
│       │                              │         │
│  ┌────▼──────────────────────────────▼───────┐ │
│  │         Server Actions (57+ files)        │ │
│  │   Validation (Zod) → Auth → Query → RLS  │ │
│  └────────────────────┬──────────────────────┘ │
└───────────────────────┼────────────────────────┘
                        │
┌───────────────────────▼────────────────────────┐
│               Supabase Platform                 │
│  ┌──────┐  ┌──────────┐  ┌────────┐  ┌─────┐ │
│  │ Auth │  │PostgreSQL │  │Storage │  │ RT  │ │
│  │ JWT  │  │  70+ tbl  │  │ Files  │  │ WS  │ │
│  └──────┘  └──────────┘  └────────┘  └─────┘ │
└────────────────────────────────────────────────┘

AI Capabilities

Feature Engine Status
AI Chat Assistant OpenAI GPT-4 Implemented (requires API key)
Content Generator OpenAI GPT Implemented
Blog Writer OpenAI GPT Implemented
Email Writer OpenAI GPT Implemented
Prompt Library Local DB Implemented
AI Templates Local DB Implemented
AI Workflows Visual builder UI complete
Speech-to-Text Whisper Implemented
Text-to-Speech OpenAI TTS Implemented

Note: AI features require OPENAI_API_KEY in environment variables. Without it, the platform shows a configuration message.


Authentication & Workspace Isolation

  • Auth methods: Email/password, Google OAuth, GitHub OAuth, magic link
  • Session: Supabase JWT with secure httpOnly cookies
  • Middleware: Route protection with auth checks on every request
  • Multi-workspace: Users can belong to multiple workspaces
  • Workspace resolution: Automatic from workspace_members table (never client-provided)
  • Row Level Security: Enforced at PostgreSQL level on all data tables
  • RBAC: 11 roles, 35+ permissions, role-based UI rendering

Testing

Check Result
Playwright E2E 58/58 pass
TypeScript (tsc --noEmit) ✅ Pass
ESLint (next lint) ✅ Pass (zero warnings)
Next.js Build ✅ Pass (104 routes)

Test coverage includes:

  • Authentication flows (redirect, login page, register)
  • All sidebar navigation (19 routes verified)
  • Nested sub-routes (11 routes verified)
  • Public marketing pages (6 pages)
  • API endpoints (health, OpenAPI, auth guards)
  • SEO module pages (15 dedicated tests)

Project Documentation

Document Path
System Architecture docs/ARCHITECTURE.md
System Design docs/SYSTEM_DESIGN.md
API Documentation docs/API.md
Security docs/SECURITY.md
Monitoring docs/MONITORING.md
Backup & Recovery docs/BACKUP.md
Contributing docs/CONTRIBUTING.md
Roadmap docs/ROADMAP.md
Database Design docs/database/DATABASE_DESIGN.md
Requirements docs/requirements/GROWTHPILOT_AI_REQUIREMENTS.md
UI Design System docs/ui/UI_DESIGN_SYSTEM.md
Plugin SDK docs/sdk/PLUGIN_SDK.md
Milestones docs/planning/MILESTONES_AND_ROADMAP.md

Local Development Setup

Prerequisites

  • Node.js 20+
  • PNPM 8+
  • Supabase account (or local Supabase CLI)

Installation

# Clone
git clone https://github.com/sivaprakashtech/GrowthPilot-AI.git
cd GrowthPilot-AI

# Install dependencies
pnpm install

# Set up environment
cp apps/web/.env.example apps/web/.env.local
# Edit .env.local with your Supabase credentials

# Run development server
cd apps/web
pnpm dev
# Opens at http://localhost:3000

# Run tests
pnpm exec playwright test

Environment Variables

Variable Required Purpose
NEXT_PUBLIC_SUPABASE_URL Yes Supabase project URL
NEXT_PUBLIC_SUPABASE_ANON_KEY Yes Supabase public key
SUPABASE_SERVICE_ROLE_KEY Yes Server-side admin operations
OPENAI_API_KEY For AI AI content generation
STRIPE_SECRET_KEY For billing Payment processing
STRIPE_WEBHOOK_SECRET For billing Stripe event handling
GOOGLE_CLIENT_ID For analytics Google OAuth + Analytics
GOOGLE_CLIENT_SECRET For analytics Google OAuth
META_APP_ID For ads Meta/Facebook Ads
RESEND_API_KEY For email Email delivery
CRON_SECRET For jobs Background job auth

See apps/web/.env.example for the full template.


Project Structure

GrowthPilot-AI/
├── apps/
│   ├── web/                    # Next.js 14 main application
│   │   ├── src/
│   │   │   ├── app/           # App Router (100+ pages)
│   │   │   │   ├── (auth)/    # Login, register, reset
│   │   │   │   ├── (dashboard)/ # All authenticated routes
│   │   │   │   └── api/       # REST API endpoints
│   │   │   ├── components/    # Shared UI components
│   │   │   ├── lib/           # Actions, auth, utils
│   │   │   └── types/         # TypeScript definitions
│   │   ├── tests/e2e/         # Playwright tests
│   │   └── supabase/          # Migrations & config
│   └── mobile/                # React Native scaffold
├── docs/                       # Architecture & design docs
│   └── Screenshots/           # UI screenshots
├── supabase/                   # Supabase project config
├── turbo.json                  # Turborepo config
├── pnpm-workspace.yaml         # Monorepo workspace
└── docker-compose.yml          # Docker deployment

Current Implementation Status

Verified Real-Data Modules (Supabase + RLS)

Module CRUD Workspace Isolation Playwright Tested
Clients Create, Read, Delete
CRM Leads Create, Read, Delete
CRM Pipeline Read, Move deals
CRM Tasks Create, Read, Complete
Campaigns Create, Read, Delete
SEO Dashboard Read
SEO Keywords Read, Search
SEO Audit Read
SEO Backlinks Read
SEO Competitors Read

UI-Complete Modules (Mock Data / External API Required)

Analytics, Search Console, Social Media, Commerce, Email, Reports, Billing, WordPress, Team, Admin, Integrations, Developer, Monitoring, Notifications

These modules have full UI implementations and server action stubs ready for integration once external API credentials are provided.


Roadmap

  • Social Media module → real data
  • Analytics → Google Analytics API integration
  • Search Console → GSC API integration
  • Billing → Stripe live integration
  • Email → Resend/SendGrid integration
  • Commerce → Shopify API integration
  • Real-time notifications via Supabase Realtime
  • Mobile app (React Native) completion
  • Plugin marketplace launch
  • Multi-language support

Author

Siva Prakash
Full-stack developer specializing in enterprise SaaS platforms, AI integration, and modern web architecture.


License

MIT

About

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages