From ba597283d6f3e51773b7025473bc61e94fa92f03 Mon Sep 17 00:00:00 2001 From: Aditya <97450298+1234-ad@users.noreply.github.com> Date: Fri, 3 Oct 2025 22:15:22 +0530 Subject: [PATCH 01/12] Add Privacy Policy Generator agent with comprehensive documentation --- agents/privacy-policy-generator/README.md | 164 ++++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 agents/privacy-policy-generator/README.md diff --git a/agents/privacy-policy-generator/README.md b/agents/privacy-policy-generator/README.md new file mode 100644 index 00000000..ba590804 --- /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/alchemyst) 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 From 390efe4a252d3b350d60efdda602f62f7b20f51b Mon Sep 17 00:00:00 2001 From: Aditya <97450298+1234-ad@users.noreply.github.com> Date: Fri, 3 Oct 2025 22:15:36 +0530 Subject: [PATCH 02/12] Add package.json with Next.js and Alchemyst AI dependencies --- agents/privacy-policy-generator/package.json | 50 ++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 agents/privacy-policy-generator/package.json diff --git a/agents/privacy-policy-generator/package.json b/agents/privacy-policy-generator/package.json new file mode 100644 index 00000000..4f4ce378 --- /dev/null +++ b/agents/privacy-policy-generator/package.json @@ -0,0 +1,50 @@ +{ + "name": "privacy-policy-generator", + "version": "1.0.0", + "description": "AI-powered privacy policy generator using Alchemyst AI Platform", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint", + "type-check": "tsc --noEmit" + }, + "dependencies": { + "@alchemystai/sdk": "^1.0.0", + "next": "14.0.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "typescript": "^5.2.2", + "@types/node": "^20.8.0", + "@types/react": "^18.2.25", + "@types/react-dom": "^18.2.11", + "tailwindcss": "^3.3.5", + "autoprefixer": "^10.4.16", + "postcss": "^8.4.31", + "lucide-react": "^0.288.0", + "class-variance-authority": "^0.7.0", + "clsx": "^2.0.0", + "tailwind-merge": "^1.14.0" + }, + "devDependencies": { + "eslint": "^8.51.0", + "eslint-config-next": "14.0.0" + }, + "keywords": [ + "privacy-policy", + "legal-compliance", + "gdpr", + "ccpa", + "alchemyst-ai", + "nextjs", + "saas" + ], + "author": "Alchemyst AI Community", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Alchemyst-ai/awesome-saas.git", + "directory": "agents/privacy-policy-generator" + } +} \ No newline at end of file From 09a53b4e24c7428280a1416a1a388156ef658f24 Mon Sep 17 00:00:00 2001 From: Aditya <97450298+1234-ad@users.noreply.github.com> Date: Fri, 3 Oct 2025 22:15:44 +0530 Subject: [PATCH 03/12] Add Next.js configuration --- agents/privacy-policy-generator/next.config.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 agents/privacy-policy-generator/next.config.js diff --git a/agents/privacy-policy-generator/next.config.js b/agents/privacy-policy-generator/next.config.js new file mode 100644 index 00000000..8116de8f --- /dev/null +++ b/agents/privacy-policy-generator/next.config.js @@ -0,0 +1,14 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + experimental: { + appDir: true, + }, + images: { + domains: ['images.unsplash.com', 'via.placeholder.com'], + }, + env: { + ALCHEMYST_API_KEY: process.env.ALCHEMYST_API_KEY, + }, +} + +module.exports = nextConfig \ No newline at end of file From 70c3b36c308b6da700085e8d07b536af7a81e3a8 Mon Sep 17 00:00:00 2001 From: Aditya <97450298+1234-ad@users.noreply.github.com> Date: Fri, 3 Oct 2025 22:16:00 +0530 Subject: [PATCH 04/12] Add Tailwind CSS configuration --- .../tailwind.config.js | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 agents/privacy-policy-generator/tailwind.config.js diff --git a/agents/privacy-policy-generator/tailwind.config.js b/agents/privacy-policy-generator/tailwind.config.js new file mode 100644 index 00000000..0122a7d8 --- /dev/null +++ b/agents/privacy-policy-generator/tailwind.config.js @@ -0,0 +1,76 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + darkMode: ["class"], + content: [ + './pages/**/*.{ts,tsx}', + './components/**/*.{ts,tsx}', + './app/**/*.{ts,tsx}', + './src/**/*.{ts,tsx}', + ], + theme: { + container: { + center: true, + padding: "2rem", + screens: { + "2xl": "1400px", + }, + }, + extend: { + colors: { + border: "hsl(var(--border))", + input: "hsl(var(--input))", + ring: "hsl(var(--ring))", + background: "hsl(var(--background))", + foreground: "hsl(var(--foreground))", + primary: { + DEFAULT: "hsl(var(--primary))", + foreground: "hsl(var(--primary-foreground))", + }, + secondary: { + DEFAULT: "hsl(var(--secondary))", + foreground: "hsl(var(--secondary-foreground))", + }, + destructive: { + DEFAULT: "hsl(var(--destructive))", + foreground: "hsl(var(--destructive-foreground))", + }, + muted: { + DEFAULT: "hsl(var(--muted))", + foreground: "hsl(var(--muted-foreground))", + }, + accent: { + DEFAULT: "hsl(var(--accent))", + foreground: "hsl(var(--accent-foreground))", + }, + popover: { + DEFAULT: "hsl(var(--popover))", + foreground: "hsl(var(--popover-foreground))", + }, + card: { + DEFAULT: "hsl(var(--card))", + foreground: "hsl(var(--card-foreground))", + }, + }, + borderRadius: { + lg: "var(--radius)", + md: "calc(var(--radius) - 2px)", + sm: "calc(var(--radius) - 4px)", + }, + keyframes: { + "accordion-down": { + from: { height: 0 }, + to: { height: "var(--radix-accordion-content-height)" }, + }, + "accordion-up": { + from: { height: "var(--radix-accordion-content-height)" }, + to: { height: 0 }, + }, + }, + animation: { + "accordion-down": "accordion-down 0.2s ease-out", + "accordion-up": "accordion-up 0.2s ease-out", + }, + }, + }, + plugins: [require("tailwindcss-animate")], +} \ No newline at end of file From 6d3298a7e0f492cff95ca0e26050737c805af22d Mon Sep 17 00:00:00 2001 From: Aditya <97450298+1234-ad@users.noreply.github.com> Date: Fri, 3 Oct 2025 22:17:08 +0530 Subject: [PATCH 05/12] Add main page component with privacy policy generator form --- agents/privacy-policy-generator/app/page.tsx | 376 +++++++++++++++++++ 1 file changed, 376 insertions(+) create mode 100644 agents/privacy-policy-generator/app/page.tsx 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\" + /> +
+
+ + +
+
+ +
+ +