diff --git a/agents/privacy-policy-generator/.env.example b/agents/privacy-policy-generator/.env.example new file mode 100644 index 00000000..f7171217 --- /dev/null +++ b/agents/privacy-policy-generator/.env.example @@ -0,0 +1,8 @@ +# Alchemyst AI API Configuration +ALCHEMYST_API_KEY=your_alchemyst_api_key_here + +# Application Configuration +NEXT_PUBLIC_APP_URL=http://localhost:3000 + +# Optional: For production deployment +# NEXT_PUBLIC_APP_URL=https://your-domain.com \ No newline at end of file diff --git a/agents/privacy-policy-generator/README.md b/agents/privacy-policy-generator/README.md new file mode 100644 index 00000000..a797410c --- /dev/null +++ b/agents/privacy-policy-generator/README.md @@ -0,0 +1,164 @@ +# 🔒 Privacy Policy Generator + +A comprehensive privacy policy generator built with the Alchemyst AI Platform that creates customized privacy policies for SaaS applications and websites. + +## 🎯 What it does + +This agent generates professional, legally-compliant privacy policies tailored to your specific business needs. It covers: + +- Data collection and usage +- Cookie policies +- Third-party integrations +- User rights (GDPR, CCPA compliance) +- Contact information +- Data retention policies + +## 🚀 Features + +- **AI-Powered Generation**: Uses Alchemyst AI to create contextual privacy policies +- **Compliance Ready**: Covers GDPR, CCPA, and other privacy regulations +- **Customizable**: Adapts to different business types and data practices +- **Professional Format**: Clean, readable HTML and Markdown output +- **Interactive Web Interface**: Easy-to-use form for policy generation + +## 🛠️ Tech Stack + +- **Frontend**: Next.js 14 with TypeScript +- **AI Platform**: [Alchemyst AI SDK](https://www.npmjs.com/package/@alchemystai/sdk) +- **Styling**: Tailwind CSS +- **Components**: Shadcn/ui +- **Deployment**: Vercel-ready + +## 📦 Installation + +1. Clone the repository: +```bash +git clone +cd agents/privacy-policy-generator +``` + +2. Install dependencies: +```bash +npm install +``` + +3. Set up environment variables: +```bash +cp .env.example .env.local +``` + +Add your Alchemyst AI API key: +```env +ALCHEMYST_API_KEY=your_api_key_here +NEXT_PUBLIC_APP_URL=http://localhost:3000 +``` + +4. Run the development server: +```bash +npm run dev +``` + +Visit `http://localhost:3000` to see the application. + +## 🎮 Usage + +1. **Fill out the form** with your business details: + - Company name and contact information + - Type of data you collect + - Third-party services you use + - Geographic regions you serve + +2. **Generate Policy**: Click "Generate Privacy Policy" to create your custom policy + +3. **Review & Download**: Review the generated policy and download in your preferred format + +4. **Implement**: Add the policy to your website or application + +## 📋 Example Usage + +```javascript +import { generatePrivacyPolicy } from './lib/privacy-generator'; + +const businessInfo = { + companyName: "Awesome SaaS Inc.", + contactEmail: "privacy@awesomesaas.com", + website: "https://awesomesaas.com", + dataTypes: ["email", "usage_analytics", "cookies"], + thirdPartyServices: ["Google Analytics", "Stripe", "SendGrid"], + regions: ["US", "EU"] +}; + +const policy = await generatePrivacyPolicy(businessInfo); +console.log(policy); +``` + +## 🔧 Configuration + +The agent can be customized through the `config/privacy-templates.js` file: + +```javascript +export const privacyTemplates = { + saas: { + sections: ["data_collection", "usage", "sharing", "security", "rights"], + compliance: ["GDPR", "CCPA"] + }, + ecommerce: { + sections: ["data_collection", "payment", "shipping", "marketing"], + compliance: ["GDPR", "CCPA", "PCI_DSS"] + } +}; +``` + +## 🏷️ Tags + +`alchemyst-awesome-saas`, `alchemyst-awesome-saas-privacy-policy`, `privacy-policy`, `legal-compliance`, `gdpr`, `ccpa` + +## 📄 Generated Policy Features + +- **Data Collection**: What data is collected and how +- **Usage Purpose**: How collected data is used +- **Data Sharing**: When and with whom data is shared +- **User Rights**: How users can access, modify, or delete their data +- **Security Measures**: How data is protected +- **Cookie Policy**: Detailed cookie usage information +- **Contact Information**: How to reach the privacy officer +- **Updates**: How policy changes are communicated + +## 🌐 Deployment + +Deploy to Vercel with one click: + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/your-repo/privacy-policy-generator) + +Or deploy manually: + +```bash +npm run build +npm run start +``` + +## 🤝 Contributing + +1. Fork the repository +2. Create a feature branch: `git checkout -b feature/amazing-feature` +3. Commit your changes: `git commit -m 'Add amazing feature'` +4. Push to the branch: `git push origin feature/amazing-feature` +5. Open a Pull Request + +## 📜 License + +This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details. + +## 🆘 Support + +If you encounter any issues or have questions: + +1. Check the [Issues](https://github.com/Alchemyst-ai/awesome-saas/issues) page +2. Create a new issue with detailed information +3. Join our [Discord community](https://discord.gg/Sz35cthy) for real-time support + +## 🎉 Acknowledgments + +- Built with [Alchemyst AI Platform](https://platform.getalchemystai.com) +- Inspired by the need for accessible legal compliance tools +- Thanks to the open-source community for feedback and contributions \ No newline at end of file diff --git a/agents/privacy-policy-generator/app/globals.css b/agents/privacy-policy-generator/app/globals.css new file mode 100644 index 00000000..a2841a1c --- /dev/null +++ b/agents/privacy-policy-generator/app/globals.css @@ -0,0 +1,76 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 222.2 84% 4.9%; + + --card: 0 0% 100%; + --card-foreground: 222.2 84% 4.9%; + + --popover: 0 0% 100%; + --popover-foreground: 222.2 84% 4.9%; + + --primary: 222.2 47.4% 11.2%; + --primary-foreground: 210 40% 98%; + + --secondary: 210 40% 96%; + --secondary-foreground: 222.2 47.4% 11.2%; + + --muted: 210 40% 96%; + --muted-foreground: 215.4 16.3% 46.9%; + + --accent: 210 40% 96%; + --accent-foreground: 222.2 47.4% 11.2%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 210 40% 98%; + + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + --ring: 222.2 84% 4.9%; + + --radius: 0.5rem; + } + + .dark { + --background: 222.2 84% 4.9%; + --foreground: 210 40% 98%; + + --card: 222.2 84% 4.9%; + --card-foreground: 210 40% 98%; + + --popover: 222.2 84% 4.9%; + --popover-foreground: 210 40% 98%; + + --primary: 210 40% 98%; + --primary-foreground: 222.2 47.4% 11.2%; + + --secondary: 217.2 32.6% 17.5%; + --secondary-foreground: 210 40% 98%; + + --muted: 217.2 32.6% 17.5%; + --muted-foreground: 215 20.2% 65.1%; + + --accent: 217.2 32.6% 17.5%; + --accent-foreground: 210 40% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 210 40% 98%; + + --border: 217.2 32.6% 17.5%; + --input: 217.2 32.6% 17.5%; + --ring: 212.7 26.8% 83.9%; + } +} + +@layer base { + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + } +} \ No newline at end of file diff --git a/agents/privacy-policy-generator/app/layout.tsx b/agents/privacy-policy-generator/app/layout.tsx new file mode 100644 index 00000000..edb981b9 --- /dev/null +++ b/agents/privacy-policy-generator/app/layout.tsx @@ -0,0 +1,34 @@ +import type { Metadata } from 'next' +import { Inter } from 'next/font/google' +import './globals.css' + +const inter = Inter({ subsets: ['latin'] }) + +export const metadata: Metadata = { + title: 'Privacy Policy Generator | Alchemyst AI', + description: 'Generate professional, GDPR & CCPA compliant privacy policies for your SaaS application using AI', + keywords: ['privacy policy', 'GDPR', 'CCPA', 'legal compliance', 'AI generator', 'SaaS'], + authors: [{ name: 'Alchemyst AI Community' }], + openGraph: { + title: 'Privacy Policy Generator | Alchemyst AI', + description: 'Generate professional, GDPR & CCPA compliant privacy policies for your SaaS application using AI', + type: 'website', + }, + twitter: { + card: 'summary_large_image', + title: 'Privacy Policy Generator | Alchemyst AI', + description: 'Generate professional, GDPR & CCPA compliant privacy policies for your SaaS application using AI', + }, +} + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}) { + return ( + + {children} + + ) +} \ No newline at end of file diff --git a/agents/privacy-policy-generator/app/page.tsx b/agents/privacy-policy-generator/app/page.tsx new file mode 100644 index 00000000..c1cecdab --- /dev/null +++ b/agents/privacy-policy-generator/app/page.tsx @@ -0,0 +1,376 @@ +'use client'; + +import { useState } from 'react'; +import { Shield, Download, FileText, CheckCircle, AlertCircle } from 'lucide-react'; +import { generatePrivacyPolicy } from '../lib/privacy-generator'; + +interface BusinessInfo { + companyName: string; + contactEmail: string; + website: string; + address: string; + dataTypes: string[]; + thirdPartyServices: string[]; + regions: string[]; + businessType: string; +} + +export default function PrivacyPolicyGenerator() { + const [businessInfo, setBusinessInfo] = useState({ + companyName: '', + contactEmail: '', + website: '', + address: '', + dataTypes: [], + thirdPartyServices: [], + regions: [], + businessType: 'saas' + }); + + const [generatedPolicy, setGeneratedPolicy] = useState(''); + const [isGenerating, setIsGenerating] = useState(false); + const [error, setError] = useState(''); + + const dataTypeOptions = [ + 'Email addresses', + 'Names and contact information', + 'Usage analytics', + 'Cookies and tracking data', + 'Payment information', + 'Location data', + 'Device information', + 'User-generated content' + ]; + + const serviceOptions = [ + 'Google Analytics', + 'Stripe', + 'SendGrid', + 'Mailchimp', + 'Intercom', + 'Hotjar', + 'Mixpanel', + 'AWS', + 'Cloudflare' + ]; + + const regionOptions = [ + 'United States', + 'European Union', + 'United Kingdom', + 'Canada', + 'Australia', + 'Global' + ]; + + const handleDataTypeChange = (dataType: string, checked: boolean) => { + if (checked) { + setBusinessInfo(prev => ({ + ...prev, + dataTypes: [...prev.dataTypes, dataType] + })); + } else { + setBusinessInfo(prev => ({ + ...prev, + dataTypes: prev.dataTypes.filter(type => type !== dataType) + })); + } + }; + + const handleServiceChange = (service: string, checked: boolean) => { + if (checked) { + setBusinessInfo(prev => ({ + ...prev, + thirdPartyServices: [...prev.thirdPartyServices, service] + })); + } else { + setBusinessInfo(prev => ({ + ...prev, + thirdPartyServices: prev.thirdPartyServices.filter(s => s !== service) + })); + } + }; + + const handleRegionChange = (region: string, checked: boolean) => { + if (checked) { + setBusinessInfo(prev => ({ + ...prev, + regions: [...prev.regions, region] + })); + } else { + setBusinessInfo(prev => ({ + ...prev, + regions: prev.regions.filter(r => r !== region) + })); + } + }; + + const handleGenerate = async () => { + setIsGenerating(true); + setError(''); + + try { + const policy = await generatePrivacyPolicy(businessInfo); + setGeneratedPolicy(policy); + } catch (err) { + setError('Failed to generate privacy policy. Please try again.'); + console.error(err); + } finally { + setIsGenerating(false); + } + }; + + const downloadPolicy = () => { + const blob = new Blob([generatedPolicy], { type: 'text/html' }); + const url = URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${businessInfo.companyName.replace(/\s+/g, '-').toLowerCase()}-privacy-policy.html`; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + URL.revokeObjectURL(url); + }; + + return ( +
+
+ {/* Header */} +
+
+ +
+

+ Privacy Policy Generator +

+

+ Generate professional, GDPR & CCPA compliant privacy policies for your SaaS application using AI +

+
+ +
+ {/* Form Section */} +
+

+ + Business Information +

+ +
+ {/* Basic Info */} +
+
+ + setBusinessInfo(prev => ({ ...prev, companyName: e.target.value }))} + className=\"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\" + placeholder=\"Your Company Inc.\" + /> +
+
+ + setBusinessInfo(prev => ({ ...prev, contactEmail: e.target.value }))} + className=\"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\" + placeholder=\"privacy@company.com\" + /> +
+
+ +
+
+ + setBusinessInfo(prev => ({ ...prev, website: e.target.value }))} + className=\"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\" + placeholder=\"https://yourcompany.com\" + /> +
+
+ + +
+
+ +
+ +