Skip to content

imlava/sproutcv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

259 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SproutCV Logo

🌱 SproutCV

AI-Powered Resume Optimization Platform

An enterprise-grade resume optimization platform leveraging Google Gemini AI to help job seekers land interviews faster

React TypeScript Supabase Tailwind License

Live Demo β€’ Documentation β€’ Report Bug β€’ Request Feature


πŸ“‹ Table of Contents


πŸ— Architecture Overview

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      β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ† Key Technical Achievements

1. Self-Healing Email Verification System

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

2. Enterprise-Grade Admin Dashboard

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

3. AI-Powered Resume Analysis Engine

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

4. Robust Payment Architecture

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

✨ Core Features

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

πŸ›  Tech Stack

Frontend

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

Backend

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

DevOps & Security

Technology Purpose
GitHub Actions CI/CD automation
hCaptcha Bot protection
Row Level Security Data isolation
Pre-commit Hooks Secret detection

πŸ“ Project Structure

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

πŸš€ Getting Started

Prerequisites

  • 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)

Installation

# 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)

Environment Configuration

# 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

Development

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

# Run linting
npm run lint

πŸ“§ Email Automation System

Architecture

The 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      β”‚               β”‚
β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚
β”‚                                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Components

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

Features

  • βœ… 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

Setup

# 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 status

πŸ‘¨β€πŸ’Ό Admin Dashboard & Support System

Message Center Architecture

The 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)   β”‚                               β”‚
β”‚               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                               β”‚
β”‚                                                                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Admin Features

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

Database Schema (Support System)

-- 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 Implementation

Multi-Layer Security Model

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     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                    β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Security Features

  • 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

⚑ Performance Optimizations

Frontend Performance

  • 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

Build Performance

# Production build with optimizations
npm run build

# Analyze bundle size
npm run build && npx vite-bundle-visualizer

Performance Metrics

  • 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%

Accessibility Standards

  • 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

πŸš€ Deployment

Production Checklist

  • 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

Deployment Commands

# Build production bundle
npm run build

# Deploy to Vercel
vercel --prod

# Deploy Edge Functions
supabase functions deploy --all

🀝 Contributing

Contributions are welcome! Please read our Contributing Guide before submitting PRs.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see LICENSE for details.

πŸ”’ Security

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. 🌱

About

SproutCV - Grow your career, one resume at a time. 🌱

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors