Skip to content

mjawaids/autooutreach

Repository files navigation

AutoOutreach - AI-Powered Cold Email Generator

A Progressive Web App (PWA) that generates professional cold emails using AI, designed specifically for freelancers and consultants.

Features

  • 🤖 AI-Powered Email Generation - Uses HuggingFace's free models to create personalized cold emails
  • 🔐 Social Authentication - Google and GitHub login via Supabase Auth
  • 📊 Usage Limits - 5 emails per user per month, global token limits
  • 📱 Progressive Web App - Installable on mobile and desktop
  • 🌙 Dark Mode - Beautiful light and dark themes
  • 💬 Waitlist System - Capture users when limits are reached
  • 🚀 Share Features - Social sharing and referral system
  • 📱 Responsive Design - Works perfectly on all devices

Tech Stack

  • Frontend: React 18 + TypeScript + Tailwind CSS
  • Backend: Supabase (Database + Auth)
  • AI: HuggingFace Inference API
  • PWA: Vite PWA Plugin
  • Hosting: Netlify/Cloudflare Pages (free tier)

Quick Start

1. Clone and Install

git clone <your-repo>
cd autooutreach
npm install

2. Set up Supabase

  1. Create a new project at supabase.com
  2. Go to Settings > API to get your project URL and anon key
  3. Go to Authentication > Providers and enable Google and GitHub OAuth
  4. Run the database migrations in supabase/migrations/

3. Set up HuggingFace

  1. Create a free account at huggingface.co
  2. Go to Settings > Access Tokens and create a new token
  3. The app uses mistralai/Mistral-7B-Instruct-v0.1 model (free tier)

4. Configure Environment

Create a .env file:

cp .env.example .env

Fill in your values:

VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_HUGGINGFACE_TOKEN=your_huggingface_token

5. Run Development Server

npm run dev

Database Schema

The app uses three main tables:

  • user_usage - Tracks per-user email generation limits
  • global_stats - Tracks monthly token usage across all users
  • waitlist - Stores users who hit limits and want paid version

All tables have Row Level Security (RLS) enabled with appropriate policies.

Deployment

Netlify

  1. Build the project: npm run build
  2. Deploy the dist folder to Netlify
  3. Set environment variables in Netlify dashboard
  4. The app will work as a PWA automatically

Cloudflare Pages

  1. Connect your GitHub repo to Cloudflare Pages
  2. Set build command: npm run build
  3. Set output directory: dist
  4. Add environment variables
  5. Deploy!

Usage Limits

  • Per User: 5 email generations per month
  • Global: 30,000 tokens per month across all users
  • Automatic Reset: User limits reset monthly
  • Waitlist: Users are added to waitlist when limits are hit

PWA Features

  • Installable: Users can install the app on their devices
  • Offline Ready: Service worker caches essential resources
  • App-like Experience: Standalone display mode
  • Fast Loading: Optimized for performance

Development

Project Structure

src/
├── components/          # Reusable UI components
├── contexts/           # React contexts (Auth, Theme)
├── hooks/              # Custom React hooks
├── lib/                # Utility libraries (Supabase, AI)
├── pages/              # Main pages (Landing, Dashboard)
└── main.tsx           # App entry point

Key Files

  • src/lib/supabase.ts - Supabase client configuration
  • src/lib/ai.ts - HuggingFace AI integration
  • src/contexts/AuthContext.tsx - Authentication state management
  • src/hooks/useUsage.ts - Usage tracking and limits
  • supabase/migrations/ - Database schema and migrations

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details

Support

For issues and questions:

  • Check the GitHub issues
  • Review the documentation
  • Join our community discussions

Built with ❤️ for freelancers and consultants who want to grow their business with AI-powered outreach.