A React-based analytics dashboard for tracking funnel conversion rates with AI-powered insights using OpenAI GPT-4 and Supabase backend.
- 📊 Interactive Funnel Analytics - Visualize conversion rates across different stages
- 🤖 AI-Powered Insights - Get intelligent suggestions and analysis using OpenAI GPT-4
- 💬 Interactive Chat Interface - Chat with GPT-4 about your funnel data
- 📅 Date Range Filtering - Analyze data across custom time periods
- 📱 Responsive Design - Works on desktop and mobile devices
- 🔐 User Authentication - Secure login with Supabase Auth
- 📈 Real-time Data - Live updates from Supabase database
- 🎨 Modern UI - Built with Material-UI components
- Frontend: React 18, Material-UI
- Backend: Supabase (PostgreSQL, Auth, Real-time)
- AI: OpenAI GPT-4 API
- Deployment: AWS S3 + CloudFront
- Version Control: Git/GitHub
-
Clone the repository
git clone https://github.com/mohitkhatwani721/my-funnel-dashboard.git cd my-funnel-dashboard -
Install dependencies
npm install
-
Set up environment variables Create a
.envfile in the root directory:REACT_APP_SUPABASE_URL=https://mtykrhxfmgijtehnwfsh.supabase.co REACT_APP_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im10eWtyaHhmbWdpanRlaG53ZnNoIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDgzNzA2MzksImV4cCI6MjA2Mzk0NjYzOX0.9AfW40dpU2wxldFHCWCdEO1AQ5wgv5N4SyvIHuVtg1Y REACT_APP_OPENAI_API_KEY=your_openai_api_key_here
-
Start the development server
npm start
-
Open your browser Navigate to
http://localhost:4000
The app uses Supabase with the following table structure:
CREATE TABLE funnel_events (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
user_id TEXT,
session_id TEXT,
stage TEXT,
event_date DATE
);-
Build the production version:
npm run build
-
Deploy to AWS S3 + CloudFront using the provided script:
./deploy-aws.sh
- Sign Up/Login - Create an account or sign in with existing credentials
- View Dashboard - See your funnel analytics with interactive charts
- Filter Data - Use date picker to analyze specific time periods
- Get AI Insights - Click "Get AI Suggestion" for intelligent analysis
- Chat with AI - Use the chat interface to ask questions about your data
- View Profile - Click "Profile" to see your user information
- Create a new Supabase project
- Enable Row Level Security (RLS)
- Create the
funnel_eventstable - Set up authentication providers
- Get an API key from OpenAI
- Add it to your
.envfile - Ensure you have sufficient credits for API calls
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Mohit Khatwani
- GitHub: @mohitkhatwani721
- Supabase for the backend infrastructure
- OpenAI for AI capabilities
- Material-UI for the component library
- React team for the amazing framework