Skip to content

Growthency/Event-Research-Platform-Development-8598

Repository files navigation

FamMap AI Tools Suite

🚀 Quick Setup Guide

API Keys Required

To enable AI functionality, you need to set up API keys in your environment variables:

Required API Keys:

  1. GEMINI_API_KEY - Primary AI service (Google Gemini)
  2. OPENAI_API_KEY - Fallback AI service (OpenAI GPT)

🔧 Platform-Specific Setup

For Vercel Deployment:

  1. Go to your Vercel Dashboard
  2. Select your project
  3. Go to Settings → Environment Variables
  4. Add these variables:
    GEMINI_API_KEY = your_gemini_key_here
    OPENAI_API_KEY = your_openai_key_here
    

For Netlify Deployment:

  1. Go to your Netlify Dashboard
  2. Select your site
  3. Go to Site Settings → Environment Variables
  4. Add these variables:
    GEMINI_API_KEY = your_gemini_key_here
    OPENAI_API_KEY = your_openai_key_here
    

For Local Development:

  1. Create a .env.local file in your project root
  2. Add your API keys:
    GEMINI_API_KEY=your_gemini_key_here
    OPENAI_API_KEY=your_openai_key_here
    

🔑 How to Get API Keys

Gemini API Key (Primary):

  1. Visit: https://makersuite.google.com/app/apikey
  2. Sign in with your Google account
  3. Click "Create API Key"
  4. Copy the generated key

OpenAI API Key (Fallback):

  1. Visit: https://platform.openai.com/api-keys
  2. Sign in to your OpenAI account
  3. Click "Create new secret key"
  4. Copy the generated key

🎯 Which Tools Use Which APIs

Tool Primary API Fallback API Features
FamIdea Gemini OpenAI Swedish content ideas generation
FamiShort Gemini None AI description writer
FamUniversal Gemini (10 keys rotation) None Article generation

⚠️ Important Notes

  • FamIdea uses both APIs with automatic switching
  • FamiShort uses only Gemini API
  • FamUniversal supports up to 10 Gemini API keys for high-volume usage
  • Without API keys, tools will show demo content
  • API keys are never exposed to the frontend

🚀 Deployment Commands

# Install dependencies
npm install

# Run locally
npm run dev

# Build for production
npm run build

# Deploy to Netlify
npm run netlify:build

# Preview production build
npm run preview

🔄 Multi-API System (FamIdea)

FamIdea uses an intelligent dual-API system:

  1. Primary: Gemini API (optimized for Swedish content)
  2. Fallback: OpenAI API (when Gemini fails or rate limited)
  3. Automatic Switching: Seamless transition between APIs
  4. Demo Mode: Works without API keys for testing

📊 API Usage Examples

Environment Variables Setup:

# Vercel/Netlify Dashboard
GEMINI_API_KEY=AIzaSyC1234567890abcdef...
OPENAI_API_KEY=sk-proj-1234567890abcdef...

# Local Development (.env.local)
GEMINI_API_KEY=AIzaSyC1234567890abcdef...
OPENAI_API_KEY=sk-proj-1234567890abcdef...

🛠️ Troubleshooting

Common Issues:

  1. "API key not configured" error

    • Check environment variable names (case-sensitive)
    • Ensure API keys are valid
    • Redeploy after adding keys
  2. "Demo Content" showing

    • API keys not set or invalid
    • Check platform-specific setup instructions
  3. Rate limit errors

    • FamIdea will automatically switch to OpenAI
    • Consider upgrading API plan for higher limits

🎉 Ready to Use!

Once API keys are configured:

  1. Deploy your changes
  2. Visit your site
  3. All AI tools will work with real AI generation
  4. Enjoy the full FamMap AI Tools experience!

Need Help? Check the in-app API Info buttons for real-time status and setup guidance.

Releases

No releases published

Packages

No packages published