# PassMaster - Free Offline Secure Password Generator A modern, privacy-first password generator built with Next.js, TypeScript, and TailwindCSS. Generate ultra-secure passwords instantly with client-side encryption - your passwords never leave your device. ## ✨ Features - πŸ”’ **Client-Side Encryption** - All password generation happens locally in your browser - πŸ“± **Progressive Web App (PWA)** - Install as an app and work offline - πŸŒ™ **Dark Mode Support** - Automatic theme switching with system preference detection - 🎯 **Password Strength Meter** - Real-time entropy calculation and time-to-crack estimation - ⚑ **Instant Generation** - Generate passwords in milliseconds with cryptographically secure randomness - πŸ”§ **Customizable Options** - Length, character types, and exclude similar characters - πŸ“‹ **One-Click Copy** - Copy passwords to clipboard with visual feedback - β™Ώ **Accessible** - Full keyboard navigation and screen reader support - πŸ“Š **SEO & AEO Optimized** - Answer Engine Optimization for ChatGPT/Perplexity, structured data, meta tags, and semantic HTML - πŸ” **IndexNow Integration** - Automatic search engine notifications for content updates - πŸ€– **Answer Engine Ready** - Optimized for AI crawlers (GPTBot, PerplexityBot, Claude-Web) ## πŸš€ Getting Started ### Prerequisites - Node.js 18+ - npm or yarn ### Installation 1. Clone the repository: ```bash git clone https://github.com/your-username/passmaster.git cd passmaster ``` 2. Install dependencies: ```bash npm install ``` 3. Run the development server: ```bash npm run dev ``` 4. Open [http://localhost:3000](http://localhost:3000) in your browser. ## πŸ› οΈ Tech Stack - **Framework**: Next.js 14 (App Router) - **Language**: TypeScript - **Styling**: TailwindCSS - **Icons**: Lucide React - **Animations**: Framer Motion - **Theme**: next-themes - **PWA**: next-pwa - **State Management**: React hooks + localStorage ## πŸ“ Project Structure ``` src/ β”œβ”€β”€ app/ # Next.js App Router β”‚ β”œβ”€β”€ layout.tsx # Root layout with metadata β”‚ β”œβ”€β”€ page.tsx # Home page β”‚ β”œβ”€β”€ privacy/ # Privacy policy page β”‚ └── globals.css # Global styles β”œβ”€β”€ components/ # React components β”‚ β”œβ”€β”€ layout/ # Layout components β”‚ β”œβ”€β”€ PasswordGenerator.tsx β”‚ β”œβ”€β”€ FAQ.tsx β”‚ β”œβ”€β”€ FloatingCTA.tsx β”‚ └── theme-provider.tsx └── utils/ # Utility functions └── passwordGenerator.ts ``` ## πŸ”§ Configuration ### Environment Variables Create a `.env.local` file: ```env # Next.js Configuration NEXT_PUBLIC_SITE_URL=https://passmaster.app # IndexNow Configuration INDEXNOW_KEY=your-indexnow-key-here SITE_HOST=passmaster.app # SEO/AEO Configuration ORG_NAME="PassMaster" ORG_LOGO_URL=https://passmaster.app/icons/icon-512.png CONTACT_EMAIL=contact@passmaster.app DEFAULT_AUTHOR_NAME="PassMaster Team" DEFAULT_AUTHOR_URL=https://passmaster.app/about # Social Media LINKEDIN_URL=https://www.linkedin.com/company/passmaster TWITTER_URL=https://twitter.com/passmaster # Feature Flags ENABLE_INDEXNOW=true ENABLE_SCHEMA_VALIDATION=true ``` ### PWA Configuration The PWA is configured in `next.config.js` and `public/manifest.json`. Update the manifest with your app details. ## πŸ“± PWA Features - **Offline Support**: Works without internet connection - **Install Prompt**: Users can install as a native app - **App Shortcuts**: Quick access to password generation - **Splash Screen**: Custom loading screen - **Theme Colors**: Consistent branding ## πŸ€– Answer Engine Optimization (AEO) Setup PassMaster is optimized for AI search engines like ChatGPT, Perplexity, and Claude. Here's how to set it up: ### 1. IndexNow Configuration Get your IndexNow API key from [Microsoft IndexNow](https://www.indexnow.org/) and add it to your environment: ```bash INDEXNOW_KEY=your-unique-key SITE_HOST=passmaster.app ENABLE_INDEXNOW=true ``` The key file will be automatically created at `/public/{INDEXNOW_KEY}.txt`. ### 2. Manual IndexNow Pinging Use the CLI tool to manually notify search engines about updates: ```bash # Test with homepage npx tsx scripts/ping-indexnow.ts --test # Ping specific URLs npx tsx scripts/ping-indexnow.ts https://passmaster.app/offline https://passmaster.app/client-side # Ping all main pages npx tsx scripts/ping-indexnow.ts --all # Check status npx tsx scripts/ping-indexnow.ts --status ``` ### 3. Automatic Pinging IndexNow automatically triggers when: - Pages are updated or published - New content is added - Sitemap is updated Use the API endpoint for programmatic pinging: ```javascript // Queue URLs for IndexNow notification await fetch('/api/indexnow', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ urls: ['https://passmaster.app/new-page'] }) }) ``` ### 4. JSON-LD Schema Usage Add structured data to your pages: ```tsx import { FAQPageJsonLd, HowToJsonLd, ArticleJsonLd } from '@/components/seo/JsonLd' // FAQ Page // How-To Content // Article Content ``` ### 5. Content Metadata Add publication and update dates to your content: ```tsx import { ContentMeta, AuthorBox } from '@/components/seo/ContentMeta' ``` ### 6. Canonical URLs Ensure proper canonical URLs on all pages: ```tsx import { Canonical } from '@/components/seo/Canonical' // Automatic canonical based on current path // Custom canonical URL ``` ## πŸ” AEO Validation ### Robots.txt Validation ```bash curl https://passmaster.app/robots.txt # Should show: User-agent: PerplexityBot, Allow: / # Should show: User-agent: GPTBot, Allow: / ``` ### Schema Validation ```bash # Check JSON-LD on any page curl https://passmaster.app/ | grep -o '' # Validate with structured data testing tool # https://search.google.com/test/rich-results ``` ### Sitemap Validation ```bash curl https://passmaster.app/sitemap.xml | head -20 # Should show proper XML structure with dates ``` ### IndexNow Testing ```bash # Test IndexNow API manually npx tsx scripts/ping-indexnow.ts --test # Check queue status curl http://localhost:3000/api/indexnow ``` ## πŸ€– Answer Engine Features - **PerplexityBot Support**: Explicitly allowed in robots.txt - **GPTBot Support**: Optimized for ChatGPT crawling - **Claude-Web Support**: Compatible with Claude's web search - **FAQ Schema**: Structured Q&A data for answer engines - **HowTo Schema**: Step-by-step instructions for AI responses - **Article Schema**: Rich content metadata for citations - **Updated Dates**: Visible "Zuletzt aktualisiert" timestamps - **Author Information**: Clear attribution for content - **Canonical URLs**: Single source of truth for content - **IndexNow Integration**: Real-time search engine notifications ## 🎨 Customization ### Colors Update the primary color in `tailwind.config.js`: ```js colors: { primary: { 50: '#eff6ff', // ... other shades 900: '#1e3a8a', }, } ``` ### Icons Replace icons in `public/icons/` directory. The app uses multiple sizes for different devices. ## πŸ“Š SEO & Performance - **Lighthouse Score**: Optimized for 95+ Performance, 100 SEO, 95+ Accessibility - **Structured Data**: JSON-LD schemas for FAQ and SoftwareApplication - **Meta Tags**: Open Graph and Twitter Card support - **Performance**: Optimized images, fonts, and bundle size ## πŸ”’ Security - **Cryptographic Randomness**: Uses Web Crypto API's `getRandomValues()` - **No Data Collection**: Zero tracking or analytics - **Client-Side Only**: No server-side password processing - **Open Source**: Transparent code for security review ## πŸ“„ License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ## 🀝 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 ## πŸ“ž Support - **Issues**: [GitHub Issues](https://github.com/your-username/passmaster/issues) - **Email**: privacy@passmaster.app - **Documentation**: [Wiki](https://github.com/your-username/passmaster/wiki) ## πŸ™ Acknowledgments - [Next.js](https://nextjs.org/) for the amazing framework - [TailwindCSS](https://tailwindcss.com/) for the utility-first CSS - [Lucide](https://lucide.dev/) for the beautiful icons - [Framer Motion](https://www.framer.com/motion/) for the smooth animations --- Made with ❀️ for privacy and security