AI-Powered Resume Optimization Platform
An enterprise-grade resume optimization platform leveraging Google Gemini AI to help job seekers land interviews faster
Live Demo β’ Documentation β’ Report Bug β’ Request Feature
- Architecture Overview
- Key Technical Achievements
- Core Features
- System Architecture
- Tech Stack
- Project Structure
- Getting Started
- Email Automation System
- Admin Dashboard & Support System
- Security Implementation
- Deployment
- Contributing
SproutCV demonstrates production-ready full-stack architecture with emphasis on:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLIENT LAYER β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββ β
β β React 18 β β TypeScript β β Tailwind + β β Real-time State β β
β β + Vite β β Strict β β shadcn/ui β β Management β β
β ββββββββ¬βββββββ ββββββββ¬βββββββ ββββββββ¬βββββββ ββββββββββββ¬βββββββββββ β
βββββββββββΌβββββββββββββββββΌβββββββββββββββββΌβββββββ-βββββββββββββΌβββββββββββββ
β β β β
βΌ βΌ βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β API & BUSINESS LOGIC β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β 80+ Supabase Edge Functions β β
β β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββββββ β β
β β β Gemini β β Payment β β Email β β Admin β β β
β β β Analyzer β β Processor β β Automation β β Functions β β β
β β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββββββ β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β β β
βΌ βΌ βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DATA & SERVICES β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββ β
β β PostgreSQL β β Google β β Dodo β β Resend β β
β β + RLS β β Gemini β β Payments β β Email Service β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Designed and implemented a zero-intervention email verification system that:
- Automatically creates user profiles on signup with database triggers
- Implements retry logic with exponential backoff
- Auto-verifies users after 24 hours if email delivery fails
- Self-heals broken user states every 5 minutes via cron automation
- Processes edge cases like orphaned auth users
Built a comprehensive admin system featuring:
- Enhanced Message Center with threaded conversations
- User Management with activity tracking and role-based access
- Payment Management with refund processing
- Referral System tracking and analytics
- System Health Monitoring dashboard
Integrated Google Gemini API for intelligent resume analysis:
- Multi-dimensional scoring (ATS, keywords, skills alignment)
- Interactive insights with actionable recommendations
- Cover letter generation with personalization
- Competitive market positioning analysis
Implemented secure payment flow with:
- Webhook-based transaction verification
- Credit system with audit logging
- Automatic email notifications for all payment events
- Dispute and refund handling workflows
| Feature | Description | Implementation |
|---|---|---|
| π§ AI Resume Analysis | Comprehensive resume scoring against job descriptions | Google Gemini 1.5 Flash + Custom prompts |
| π ATS Optimization | Ensure resumes pass Applicant Tracking Systems | Pattern matching + keyword extraction |
| π¬ Real-time Feedback | Instant suggestions during resume editing | Edge Functions + WebSocket |
| π§ Email Automation | Fully automated verification and notifications | Resend API + Cron automation |
| π³ Credit System | Pay-as-you-go with audit trail | PostgreSQL triggers + RLS |
| π« Support Tickets | Threaded conversations with email notifications | Custom message center |
| π₯ User Management | Complete admin controls with activity logs | Role-based access control |
| π Security | Multi-layer protection | hCaptcha + RLS + 2FA ready |
| Technology | Purpose | Why Chosen |
|---|---|---|
| React 18 | UI Framework | Concurrent rendering, Suspense support |
| TypeScript 5.5 | Type Safety | Strict mode for reliability |
| Vite | Build Tool | Lightning-fast HMR, optimized builds |
| Tailwind CSS | Styling | Utility-first, rapid development |
| shadcn/ui | Components | Accessible, customizable primitives |
| TanStack Query | Data Fetching | Caching, optimistic updates |
| Technology | Purpose | Why Chosen |
|---|---|---|
| Supabase | BaaS Platform | Auth, Database, Edge Functions |
| PostgreSQL | Database | ACID compliance, RLS support |
| Edge Functions | Serverless API | Deno runtime, global distribution |
| Google Gemini | AI Engine | State-of-the-art LLM |
| Resend | Email Service | Developer-friendly API |
| Dodo Payments | Payment Processing | Modern checkout experience |
| Technology | Purpose |
|---|---|
| GitHub Actions | CI/CD automation |
| hCaptcha | Bot protection |
| Row Level Security | Data isolation |
| Pre-commit Hooks | Secret detection |
sproutcv/
βββ π src/
β βββ π components/
β β βββ π admin/ # Admin dashboard components
β β β βββ AdminDashboard.tsx # Main admin panel
β β β βββ EnhancedMessageCenter.tsx # Support ticket system
β β β βββ EnhancedUserManagement.tsx # User CRUD operations
β β β βββ MasterAdminDashboard.tsx # Super admin features
β β βββ π analysis/ # Resume analysis components
β β β βββ UnifiedResumeAnalyzer.tsx # Main analyzer flow
β β β βββ InteractiveResumeAnalyzer.tsx
β β βββ π auth/ # Authentication components
β β βββ π payments/ # Payment UI components
β β βββ π ui/ # shadcn/ui components
β βββ π contexts/ # React Context providers
β β βββ AuthContext.tsx # Authentication state
β βββ π hooks/ # Custom React hooks
β βββ π services/ # Business logic services
β β βββ validation/ # Input validation
β βββ π integrations/ # Third-party integrations
β β βββ supabase/ # Supabase client & types
β βββ π pages/ # Route components
β
βββ π supabase/
β βββ π functions/ # 80+ Edge Functions
β βββ gemini-resume-analyzer/ # AI analysis engine
β βββ robust-email-verification/ # Self-healing verification
β βββ auto-verify-processor/ # Cron-based automation
β βββ admin-message-reply/ # Support system
β βββ payment-notification/ # Payment emails
β βββ dodo-webhook/ # Payment webhooks
β βββ ...
β
βββ π docs/ # Documentation
β βββ ROBUST_EMAIL_VERIFICATION_SYSTEM.md
β βββ COMPREHENSIVE_PAYMENT_SYSTEM.md
β βββ ...
β
βββ π scripts/ # Automation scripts
β βββ setup-automation.sh # Email system setup
β
βββ π database/ # Database scripts
β βββ scripts/ # Migration scripts
β
βββ π env/ # Environment configuration
βββ .env.example # Template
- Node.js 18+ or Bun
- Supabase account (supabase.com)
- Google Cloud account with Gemini API enabled
- Dodo Payments account (for payment features)
- Resend account (for email features)
# Clone the repository
git clone https://github.com/imlava/sproutcv.git
cd sproutcv
# Install dependencies
npm install
# or
bun install
# Set up environment
cp env/.env.example env/.env.local
# Configure your environment variables (see below)# Supabase
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
# AI
GEMINI_API_KEY=your_gemini_api_key
# Payments (Edge Functions)
DODO_API_KEY=your_dodo_api_key
DODO_WEBHOOK_SECRET=your_webhook_secret
# Email (Edge Functions)
RESEND_API_KEY=your_resend_api_key
# Security
HCAPTCHA_SITE_KEY=your_hcaptcha_site_key# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Run linting
npm run lintThe email system is designed for 100% autonomous operation with zero manual intervention required.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β EMAIL AUTOMATION FLOW β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββ β
β β User βββββΆβ Database βββββΆβ Edge Function β β
β β Signup β β Trigger β β (Verification) β β
β ββββββββββββ ββββββββββββββββββββ ββββββββββ¬ββββββββββ β
β β β
β ββββββββββββββββββββββββββββ β
β βΌ β
β βββββββββββββββββββββββ β
β β Email Delivery β β
β β Attempt β β
β ββββββββββββ¬βββββββββββ β
β β β
β βββββββββββββββ΄ββββββββββββββ β
β βΌ βΌ β
β ββββββββββββββ-ββββ ββββββββββββββββββ β
β β β
Success β β β Failed β |
β β Mark Verified β β Queue Retry β β
β ββββββββββββββββββ βββββββββ¬βββββββββ β
β β β
β βΌ β
β ββββββββββββββββββββββββββββββ β
β β Auto-Processor (Cron) β β
β β β’ Retry with backoff β β
β β β’ Auto-verify after 24h β β
β β β’ Heal broken states β β
β ββββββββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Component | File | Purpose |
|---|---|---|
| Robust Verification | supabase/functions/robust-email-verification/ |
Main verification logic with fallbacks |
| Auto Processor | supabase/functions/auto-verify-processor/ |
Cron-based healing and retry |
| Setup Script | scripts/setup-automation.sh |
One-command automation setup |
- β Automatic profile creation with welcome credits
- β Exponential backoff for failed deliveries
- β Self-healing for broken user states
- β Auto-verification after 24-hour timeout
- β Comprehensive logging for debugging
- β Zero manual intervention required
# Make script executable
chmod +x scripts/setup-automation.sh
# Run complete setup
./scripts/setup-automation.sh
# Enable cron automation
./scripts/setup-automation.sh cron
# Check system status
./scripts/setup-automation.sh statusThe admin support system implements a threaded conversation model with email integration.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SUPPORT SYSTEM ARCHITECTURE β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββ β
β β User β β Admin Dashboard β β
β β Contact β β ββββββββββββββββββββββββββββββββββββ β β
β β Form ββββββββββΆβ β Enhanced Message Center β β β
β ββββββββββββββ β β ββββββββββββββ¬βββββββββββββββββββ β β
β β β β Inbox β Conversation ββ β β
β ββββββββββββββ β β β β ββ β β
β β Contact βββββββββββ β β β’ Unread β β’ Thread View ββ β β
β β Messages β β β β β’ Read β β’ Reply History ββ β β
β β Table β β β β β’ Replied β β’ Quick Actions ββ β β
β ββββββββββββββ β β β β’ Archived β ββ β β
β β β β ββββββββββββββ΄βββββββββββββββββββ β β
β β β ββββββββββββββββββββββββββββββββββββ β β
β βΌ ββββββββββββββββββββββββββββββββββββββββββ β
β ββββββββββββββ β β
β β Message βββββββββββββββββββββββββββββ β
β β Replies β β
β β Table ββββββββββββ β
β ββββββββββββββ β β
β βΌ β
β βββββββββββββββββββββββ β
β β Edge Function β β
β β admin-message-replyβ β
β ββββββββββββ¬βββββββββββ β
β β β
β βΌ β
β βββββββββββββββββββββββ β
β β Email Notification β β
β β to User (Resend) β β
β βββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Module | Capabilities |
|---|---|
| User Management | View/Edit profiles, Add credits, Suspend/Activate, Activity logs, Export data |
| Message Center | Threaded conversations, Email replies, Status tracking, Search & filter |
| Payment Management | Transaction history, Refund processing, Dispute handling |
| Referral System | Track referrals, Manage rewards, Analytics |
| System Health | Monitor functions, View logs, Check status |
-- Contact messages from users
CREATE TABLE contact_messages (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name TEXT NOT NULL,
email TEXT NOT NULL,
subject TEXT NOT NULL,
message TEXT NOT NULL,
status TEXT DEFAULT 'unread', -- unread, read, replied, archived
admin_notes TEXT,
responded_by UUID REFERENCES profiles(id),
responded_at TIMESTAMPTZ,
created_at TIMESTAMPTZ DEFAULT NOW(),
updated_at TIMESTAMPTZ DEFAULT NOW()
);
-- Admin replies with email tracking
CREATE TABLE message_replies (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
contact_message_id UUID REFERENCES contact_messages(id),
admin_user_id UUID REFERENCES profiles(id),
reply_content TEXT NOT NULL,
is_email_sent BOOLEAN DEFAULT FALSE,
email_status TEXT DEFAULT 'pending',
created_at TIMESTAMPTZ DEFAULT NOW()
);βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SECURITY LAYERS β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Layer 1: Client Protection β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β’ hCaptcha bot protection β β
β β β’ Input sanitization β β
β β β’ XSS prevention β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β Layer 2: Authentication β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β’ Supabase Auth with JWT β β
β β β’ Email verification required β β
β β β’ Failed login attempt tracking β β
β β β’ Account lockout after threshold β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β Layer 3: Authorization β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β’ Row Level Security (RLS) policies β β
β β β’ Role-based access control β β
β β β’ Resource-level permissions β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β Layer 4: Data Protection β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β’ Environment variable encryption β β
β β β’ No hardcoded secrets β β
β β β’ Pre-commit secret detection β β
β β β’ Git history cleaned of credentials β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Pre-commit Hooks: Automatically scan for secrets before commits
- RLS Policies: Users can only access their own data
- Service Role Isolation: Admin functions use service role only server-side
- Audit Logging: Security events logged for monitoring
- Code Splitting: Routes lazy-loaded with React.lazy() and Suspense
- Bundle Optimization: Tree-shaking and dead code elimination
- Component Memoization: Strategic use of React.memo for expensive renders
- Computed Value Caching: useMemo and useCallback for performance-critical operations
- Asset Optimization: Compressed images and optimized fonts
# Production build with optimizations
npm run build
# Analyze bundle size
npm run build && npx vite-bundle-visualizer- First Contentful Paint: < 1.5s
- Time to Interactive: < 3.5s
- Lighthouse Score: 95+ (Performance)
- Bundle Size: ~150KB (gzipped, initial)
- Code Coverage: Lazy loading reduces initial load by ~40%
- WCAG 2.1 AA Compliant: Comprehensive ARIA labels and semantic HTML
- Keyboard Navigation: Full keyboard support for all interactive elements
- Screen Reader Support: Tested with major screen readers
- Color Contrast: AAA level contrast ratios
- Focus Management: Clear visual focus indicators
- Configure all environment variables
- Deploy Supabase Edge Functions
- Set up payment webhooks
- Configure email domain (SPF/DKIM)
- Enable email automation cron
- Set up monitoring alerts
- Configure CDN caching
- Enable SSL/TLS
# Build production bundle
npm run build
# Deploy to Vercel
vercel --prod
# Deploy Edge Functions
supabase functions deploy --allContributions are welcome! Please read our Contributing Guide before submitting PRs.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see LICENSE for details.
For security concerns, please review our Security Policy.
Built with β€οΈ by Lava
π Live App β’ π Docs β’ π Report Bug
SproutCV - Grow your career, one resume at a time. π±