A comprehensive AI-powered writing assistant built with React, TypeScript, and Supabase.
- AI Paraphrasing: Multiple writing styles (standard, formal, creative, shorten, expand)
- Text Summarization: Comprehensive, executive, academic, bullet points, and quick summaries
- Translation: Multi-language translation with auto-detection
- Grammar Checking: Advanced grammar and style analysis
- Document Transcription: AI-powered text extraction from PDF, DOC, DOCX files
- AI Content Detection: Detect and humanize AI-generated content
- Plagiarism Detection: Advanced plagiarism analysis
- Chat Assistant: Interactive AI writing assistant
- History Management: Track and manage all your writing activities
- Premium Subscriptions: Stripe-powered subscription management
- Create a new Supabase project
- Copy your project URL and anon key to
.env - CRITICAL: Set your Site URL in Supabase Dashboard → Authentication → URL Configuration:
- Development:
http://localhost:3000 - Production:
https://your-domain.com
- Development:
For Google Sign-In to work properly:
-
Google Cloud Console Setup:
- Go to Google Cloud Console
- Create/select your project
- Enable Google+ API
- Create OAuth 2.0 credentials
- CRITICAL: Add the correct redirect URI:
https://YOUR_SUPABASE_PROJECT_ID.supabase.co/auth/v1/callback
-
Supabase Configuration:
- Go to Supabase Dashboard → Authentication → Providers
- Enable Google provider
- Add your Google OAuth Client ID and Secret
-
Environment Variables:
VITE_GOOGLE_CLIENT_ID=your_google_client_id_here
The development server runs on port 3000 to match Supabase configuration:
npm run dev # Runs on http://localhost:3000Problem: "Invalid Refresh Token: Refresh Token Not Found" Solution:
- Check that your Google Cloud Console redirect URI matches exactly:
https://YOUR_SUPABASE_PROJECT_ID.supabase.co/auth/v1/callback - Ensure Supabase Site URL is set to
http://localhost:3000for development
Problem: "ERR_CONNECTION_REFUSED" Solution:
- Ensure the dev server is running:
npm run dev - Check that the server is running on port 3000
Problem: Stuck on redirect after Google login Solution:
- Verify port configuration matches between Supabase and Vite
- Clear browser cache and localStorage
- Check browser console for authentication errors
The app handles authentication through these steps:
- User initiates Google OAuth
- Redirected to Google for authentication
- Google redirects to Supabase callback URL
- Supabase processes the authentication
- User redirected to
/auth/callbackin the app - App processes the session and redirects to main interface
# Install dependencies
npm install
# Start development server (runs on port 3000)
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewCreate a .env file with:
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key
VITE_GEMINI_API_KEY=your-gemini-api-key
VITE_GOOGLE_CLIENT_ID=your-google-client-idThe app uses Supabase with the following main tables:
user_profiles- User profile informationparaphrase_history- Paraphrasing activity historysummary_history- Summarization activity historytranslation_history- Translation activity historyuser_usage- Daily usage trackingstripe_customers- Stripe customer datastripe_subscriptions- Subscription managementstripe_orders- Order tracking
The app is configured for deployment on Netlify with automatic builds from the main branch.
For configuration issues:
- Check the browser console for detailed error messages
- Verify all environment variables are set correctly
- Ensure Supabase and Google Cloud Console configurations match
- Clear browser cache and localStorage if experiencing auth issues