Deploy Status: Fixed and ready for production!
A modern web application that helps painting contractors create professional quotes using AI assistance. Built with Next.js, Supabase, and Google Gemini AI.
- 🤖 AI-powered chat interface for gathering project details
- 💰 Dynamic markup adjustment for flexible pricing
- 📄 Professional PDF quote generation
- 🎨 Warm, professional design theme
- 📱 Mobile-responsive interface
- 🔐 Secure Google OAuth authentication
- 💾 Cloud-based storage with Supabase
- Frontend: Next.js 14 (App Router), Tailwind CSS, shadcn/ui
- Backend: Next.js API Routes
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth with Google OAuth
- AI: Google Gemini 2.0 Flash
- PDF Generation: React PDF
- Hosting: Vercel
- Node.js 18+ installed
- A Supabase account
- A Google Cloud Console account (for OAuth and Gemini API)
- A Vercel account (for deployment)
cd /Users/sepg/Desktop/painting-quote-app
npm install- Create a new project at supabase.com
- Go to the SQL Editor and run the contents of
supabase/schema.sql - Go to Authentication > Providers and enable Google OAuth
- Copy your project URL and anon key
- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google+ API
- Create OAuth 2.0 credentials:
- Authorized redirect URIs:
https://YOUR_SUPABASE_PROJECT.supabase.co/auth/v1/callback
- Authorized redirect URIs:
- Copy the Client ID and Client Secret
- Go to Google AI Studio
- Create a new API key
- Copy the API key
Copy .env.local.example to .env.local and fill in your values:
cp .env.local.example .env.localEdit .env.local:
# Google Gemini API
GEMINI_API_KEY=your_gemini_api_key_here
# Supabase
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key_here
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here
# App Config
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Google OAuth (add these to Supabase dashboard, not here)
# GOOGLE_CLIENT_ID=your_client_id
# GOOGLE_CLIENT_SECRET=your_client_secret
- In Supabase Dashboard, go to Authentication > Providers
- Enable Google
- Add your Google Client ID and Secret
- Set the redirect URL in Google Console to match Supabase's callback URL
npm run devOpen http://localhost:3000 to see the app.
- Sign In: Use Google OAuth to sign in
- First Time Setup: Enter your company name
- Configure Costs: Go to Settings to set your labor and paint costs
- Create Quote:
- Click "New Quote"
- Chat with the AI to provide project details
- Review calculated costs
- Select markup percentage
- Generate and download PDF
/painting-quote-app
├── /app # Next.js app directory
│ ├── /api # API routes
│ ├── /(auth) # Authentication pages
│ ├── /(dashboard) # Protected app pages
│ └── /chat/[projectId] # Chat interface
├── /components # Reusable components
├── /lib # Utilities & configs
├── /hooks # Custom React hooks
├── /types # TypeScript types
├── /public # Static assets
└── /supabase # Database schema
- Select from quick options (10%, 15%, 20%, 25%, 30%)
- Or enter a custom markup percentage
- See real-time price updates
- View profit calculations
- Set your actual costs for:
- Labor (per hour)
- Paint (Good/Better/Best tiers)
- Base supplies
- Costs are private to your account
- Natural conversation flow
- Gathers all necessary project details
- Calculates paint needed based on square footage
- Estimates labor hours automatically
- Professional PDF format
- Includes all project details
- Shows itemized pricing
- 30-day validity period
- Custom filename with address and markup
- Push your code to GitHub
- Connect your GitHub repo to Vercel
- Add environment variables in Vercel dashboard
- Deploy!
-
Google OAuth not working
- Ensure redirect URIs match exactly
- Check that Google+ API is enabled
- Verify client ID and secret are correct
-
Gemini API errors
- Check API key is valid
- Ensure you have API quota remaining
- Try using
gemini-1.5-flashif 2.0 isn't available
-
Database errors
- Run the schema.sql file completely
- Check Row Level Security policies
- Ensure service role key is correct
For issues or questions:
- Check the Supabase logs for database errors
- Check browser console for frontend errors
- Verify all environment variables are set correctly
- Email quote delivery
- Customer management system
- Quote templates
- Team collaboration
- Invoice generation
- Payment processing
- Mobile app
This project is private and proprietary.
Built with ❤️ for painting contractors